I'm trying to share a resource file (.resx file) from my web (RIA Service?Silverlight Host) to client (Silverlight) by linking the resource file into my client. When I try to access resources using the ResourceManager
object I get the following error:
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:
Edit:
When I say I was linking the resource file, I mean I am using the 'Add as Link' option when adding the existing resx file to my project.
The . resx resource file format consists of XML entries that specify objects and strings inside XML tags. One advantage of a . resx file is that when opened with a text editor (such as Notepad) it can be written to, parsed, and manipulated.
Navigate to resources from File Structure Open a . resx file in the XML (Text) editor. Press Ctrl+Alt+F or choose ReSharper | Windows | File Structure from the main menu . Alternatively, you can press Ctrl+Shift+A , start typing the command name in the popup, and then choose it there.
Net Resource (. resx) files are a monolingual file format used in Microsoft . Net Applications. The . resx resource file format consists of XML entries, which specify objects and strings inside XML tags.
I'm currently working through this issue at the moment too. I have narrowed down the issue to namespaces. For me, I created a Silverlight Business Application and I wanted to rename the web project and change its namespace. As soon as I did this, the SL project became broken.
Check this out. The notes on step 5 sort of explain the situation, but I'm currently trying to figure out a decent way around this.
EDIT: This worked for me: http://forums.silverlight.net/forums/p/184013/420509.aspx
A (questionable) solution was to:
It worked but I question the feasibility of having separate copies of resx files. Other than having to ensure changes to the web resx files are manually duplicated to the silverlight client resx copies, are there any other potential pitfalls ... or is there an alternative solution.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With