为什么与我的Silverlight客户端共享资源文件(resx)如此困难?

Jor*_*dan 6 silverlight resx wcf-ria-services

我正在尝试通过将资源文件链接到我的客户端,从我的Web(RIA服务?Silverlight主机)到客户端(Silverlight)共享资源文件(.resx文件).当我尝试使用该ResourceManager对象访问资源时,我收到以下错误:

System.Resources.MissingManifestResourceException was caught
  Message=Could not find any resources appropriate for the specified culture or the neutral culture.  Make sure "PPCa.Modules.ProjectManager.Client.ViewModels.ResourceStrings.resources" was correctly embedded or linked into assembly "PPCa.Modules.ProjectManager.Client" at compile time, or that all the satellite assemblies required are loadable and fully signed.
  StackTrace:
       at System.Resources.ManifestBasedResourceGroveler.HandleResourceStreamMissing(String fileName)
       at System.Resources.ManifestBasedResourceGroveler.GrovelForResourceSet(CultureInfo culture, Dictionary`2 localResourceSets, Boolean tryParents, Boolean createIfNotExists, StackCrawlMark& stackMark)
       at System.Resources.ResourceManager.InternalGetResourceSet(CultureInfo requestedCulture, Boolean createIfNotExists, Boolean tryParents, StackCrawlMark& stackMark)
       at System.Resources.ResourceManager.InternalGetResourceSet(CultureInfo culture, Boolean createIfNotExists, Boolean tryParents)
       at System.Resources.ResourceManager.GetString(String name, CultureInfo culture)
       at System.Resources.ResourceManager.GetString(String name)
       at PPCa.Modules.ProjectManager.Web.Helpers.ResourceHelper.GetEnumText[TResource](ProjectStatus a_projectStatus)
  InnerException: 
Run Code Online (Sandbox Code Playgroud)

编辑:

当我说我正在链接资源文件时,我的意思是我在将现有resx文件添加到项目时使用"添加为链接"选项.

A.G*_*.G. 2

我目前也在解决这个问题。我已将问题范围缩小到名称空间。对于我来说,我创建了一个 Silverlight 业务应用程序,并且想要重命名该 Web 项目并更改其命名空间。我一这样做,SL 项目就崩溃了。

看一下这个。第 5 步的注释解释了这种情况,但我目前正在尝试找到解决此问题的合适方法。

编辑:这对我有用:http://forums.silverlight.net/forums/p/184013/420509.aspx

  • Silverlight 论坛链接已损坏,导致此答案毫无用处。 (2认同)