gongzixiaobaiV5

导航

C# GetManifestResourceStream 获取项目资源为空解决方案

 

使用System.IO.Stream steam = this.GetType().Assembly.GetManifestResourceStream(localFile) 方法取得程序集中加载的资源文件,返回流为空。

解决方案,设置资源的 属性-->生成操作属性值为“嵌入的资源”。

 

参考:https://blog.csdn.net/eit520/article/details/51025470

posted on 2019-06-19 14:44  gongzixiaobaiV5  阅读(634)  评论(0编辑  收藏  举报