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

Published on Wednesday, November 17, 2010

In Visual Studio 2010, I moved some resources files to another folder, Built OK and ran OK, but some day later I got an error, a control can not get related resource, the error message is:

Could not find any resources appropriate for the specified culture or the neutral culture. Make sure “DynamicCultures.ResTerminal.resources” was correctly embedded or linked into assembly "ClientLib" at compile time, or that all the satellite assemblies required are loadable and fully signed.

I double checked my code, seems everything is ok; I then searched on google, got some information such as change class name, change class positions etc… but nothing worked for my case.

Finally I found the error by myself, please look at the following image:

When you created a resource file in Visual Studio 2010, the resource file attached a “Custom Tool” named "ResXFileCodeGenerator", IF you move you recource file (actually I copied the files directly to the target folder) or rename, you will find your resource file “broken” as the .resx file and .designer file no more "connected", actually the .designer file was generated automatically, when you copy the resource file, you don't need to copy .designer file together, all you need to do is Add “ResXFileCodeGenerator” into the "Custom Tool" property of .resx file. then a new .designer file will be generated , and your code will work again !