资源文件在解决方案之间共享为外部文件

时间:2010-08-30 20:02:00

标签: c# resources external

我有两个解决方案,一个名为Server的解决方案和一个名为Client的解决方案。服务器包含名为Server.Properties.Resources的资源文件。该文件将作为外部文件添加到客户端解决方案中。

当我在Visual Studio中调试时,一切都运行良好。当我运行部署版本时,我收到错误

System.Resources.MissingManifestResourceException: 
Could not find any resources appropriate for the specified culture or the neutral culture.  
Make sure "Aexeo.DataLayer.Properties.Resources.resources" was correctly embedded or 
linked into assembly "Core" at compile time, or that all the satellite assemblies required 
are loadable and fully signed.

有没有办法解决这个问题,维持外部文件链接的使用?

1 个答案:

答案 0 :(得分:0)

我认为这正是您所寻找的:

http://support.microsoft.com/kb/839861

手动创建附属程序集时会导致此问题。应该以这样的方式命名附属程序集,即可以从应用程序中自动调用它。要解决此问题,可以使用程序集链接器al.exe将程序集正确链接到应用程序。