我尝试使用以下命令在我的应用程序中嵌入一些资源(在 Ubuntu 机器上运行):
resgen2 -usesourcepath testResource.resx testResource.resources
gmcs -out:Test.exe -debug -platform:x86 -target:winexe test.cs
-资源:testResource.resources
编译运行得很好,但是当我在 Windows 下运行该程序时,我得到:
System.Resources.MissingManifestResourceException:找不到适合指定区域性或中性区域性的任何资源。确保“testResource.resources”在编译时正确嵌入或链接到程序集“Test”中,或者确保所需的所有附属程序集均可加载并完全签名。
还有其他人有类似的问题吗?