MissingManifestResourceException

10/13/10

Permalink 08:54:49 pm, by truewill Email , 184 words, 380 views   English (US)
Categories: Tips, C#, .NET

MissingManifestResourceException

The other day I was creating a WinForms application, and it kept blowing up at runtime on a line that referenced Properties.Resources.SomeExistingResource with:

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

A fellow developer (Phil) and I figured it out, with help from a Stack Overflow article.

There’s a literal string in Resources.Designer.cs (under Properties/Resources.resx in Solution Explorer) that’s automatically updated based on the value of the Default Namespace in the project properties (Application tab) in Visual Studio 2010. Normally the namespace of this auto-generated Resources class is kept synchronized with this value. In my case I was using a custom project template, and apparently they got out of sync.

Timwi and others offer alternate solutions in the Stack Overflow article linked above. In my case I just had to change the Default Namespace to match the namespace in the file.

Comments, Pingbacks:

No Comments/Pingbacks for this post yet...

Leave a comment:

Your email address will not be displayed on this site.
Your URL will be displayed.

Allowed XHTML tags: <p, ul, ol, li, dl, dt, dd, address, blockquote, ins, del, span, bdo, br, em, strong, dfn, code, samp, kdb, var, cite, abbr, acronym, q, sub, sup, tt, i, b, big, small>
(Line breaks become <br />)
(Set cookies for name, email and url)
(Allow users to contact you through a message form (your email will NOT be displayed.))
The name truewill is composed of two other words. What is the SECOND word?

Development Central

Development Central is the blog of Bill Sorensen, a professional software developer. Much of this will relate to C#, .NET, and OOP in general.

Disclaimer
These postings are provided "AS IS" with no warranties and confer no rights.

Search

Categories

Linkblog

b2evolution

contributors

XML Feeds

What is RSS?

Who's Online?

  • Guest Users: 3

powered by b2evolution free blog software