MissingManifestResourceException

The problem was an odd visual studio 2010 solution that shared some code between a silverlight front end and a full fat .Net server.

The silverlight project with the shared code contained the shared code as references to the files in the original project. It also contained the resources file and the generated designer – the resx was set to be included in the assembly with no code generation.

It worked fine with the code in the Silverlight client project that called it. The issue was when it was called from unit tests. The result was an unglamorous fail with a MissingManifestResourceException on the tests that made use of the resources.

The fix is simple – setting the default namespace in the silverlight project to the same value as the one in the original .Net project that the files were really in.

Makes me think I need to know more about the initialisation of the resources classes.

BTW the stack trace contained a reference to a most excellent Microsoft classname – the resourcegroveller (!)

This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply