Reputation: 1037
I need to use same resource file for different projects.
My resource file name is named Resource1.resx and I created a .resources extension file by using resgen and I generated a .resources.dll by using al.exe
But then as I try to use the file in my project, I am getting one error, my code is something similar to this:
ResourceManager resmgr = new ResourceManager("Resource1",
Assembly.GetExecutingAssembly());
string msg = resmgr.GetString("name");
MessageBox.Show(msg);
The error message is something like this:
Could not find any resources appropriate for the specified culture or the neutral culture. Make sure "Resource1.resources" was correctly embedded or linked into assembly "WinTest" at compile time, or that all the satellite assemblies required are loadable and fully signed.
How to solve this issue?
Upvotes: 2
Views: 2067
Reputation: 39898
You are loading the Resources from the Executing Assembly but as you mentioned you have defined the resources in a separate assembly.
Instead of the executing assembly you should point it to your resources dll.
Upvotes: 4