Could not find any resources appropriate for the specified culture or the neutral culture

I just hit this same exception in a WPF project. The issue occurred within an assembly that we recently moved to another namespace (ProblemAssembly.Support to ProblemAssembly.Controls). The exception was happening when trying to access resources from a second resource file that exists in the assembly.

Turns out the additional resource file did not properly move references from the old namespace name to the new namespace name.

In the designer.cs for the resource file, there is a static property to get the ResourceManager. Within that getter, the string was still referring the old namespace. Once correcting it to the new namespace, the problem was resolved:

global::System.Resources.ResourceManager temp = 
     new global::System.Resources.ResourceManager(
          "ProblemAssembly.Support.Properties.Stuff", typeof(Stuff).Assembly);

should have been:

global::System.Resources.ResourceManager temp = 
     new global::System.Resources.ResourceManager(
          "ProblemAssembly.Controls.Properties.Stuff", typeof(Stuff).Assembly);

Hope this helps the next person.

Leave a Comment