I found a free program on the web that was .NET 4.0, but had to copy over the code to compile VS2008. I'm thinking the way cultures is handled must be different in the versions of .NET. I'm getting this error:
System.Resources.MissingManifestResourceException: Could not find any resources appropriate for the specified culture or the neutral culture. Make sure "A.B.C.Resources.ExceptionMessage.resources" was correctly embedded or linked into assembly "A.B.C.csproj" at compile time, or that all the satellite assemblies required are loadable and fully signed.
It's a C# .dll (class library), and I'm calling it from a Console Program. It does have a strong-key file assigned to it.
It's blowing up on any statement like this:
return ResourceManager.GetString("XYZ");
It looks like all the resources are in English, and that's the only language I need. I'm just looking for how to avoid the exception.
I've had this difficulty and found that the cause had to do with Assembly name and Default namespace from project properties. It helps to set them both the same, or something to that effect.
When I copied over files, and rebuilt a new VS2008 project, there was no hierarchical relationship in Visual Studio Solution Explorer for the resource file. For example, ExceptionMessage.resx and ExceptionMessage.Designer.cs were at the same level; whereas normally the Designer.cs file is indented under the .resx file. I'm not sure what that happened.
So what I did was create a new .resx file, and carefully copy over using NotePad and filemerge programs, pieces of the .resx file and .cs file. Then it worked fine.
I'm still not absolutely sure what the problem was, but I know this fixed it. Lost about 5 hours today on this issue.
It might be worth to compare the
[assembly: AssemblyCulture("")]
properties in the assemblies from both your version 4 and version 3 solutions.The default is - I think - none.
MSDN documentation:
Perhaps you need to define it explicitly OR it already is defined but should not be?