This project has moved and is read-only. For the latest updates, please go here.


Global resource name different from type name


When I try to create ResourceManager instance by resource type, I catch MissingManifestResourceException
I think it`s happend, bacause the global resource name is automatically generated like ".Resource.resx" and resource type name has name like "*_Resource".

ResourceManager RM = new ResourceManager(typeof(SRB_Strings_Resources));

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

file attachments

Closed Jun 28, 2016 at 6:17 PM by DanyR
Not reproducible, though, probably silently fixed in a later release.


DanyR wrote Aug 7, 2015 at 7:46 AM

Oh my, I'm truly sorry that I have not seen your proposal until now (sadly I don't receive notifications from CodePlex).

Is this still an issue or am I "already" too late?

I tried to reproduce it tough I were not able to. As can be seen in the attached image, in VS2015 Premium I created a new Console project, added a string literal, opened StringResourceBuilder2011 (current release), set the option to "global resource file" (default name), "made" the resource, compiled the code and ran it without any issue.

Do you remember which were the steps to reproduce it? Your environment would also be of interest.

I know, it surely is too late but hope never dies ;)

wrote Jun 28, 2016 at 6:17 PM

DanyR wrote Feb 25 at 9:46 AM

OK, I needed to have another look at this.

I did not see, that this example was to use the resource as an external assembly by making the class public rather than internal.
In such a case, please do not instantiate the ResourceManager yourself. Instead make use of the (static) class:
//get the instance
ResourceManager RM = SRB_Strings_Resources.ResourceManager;

//or use the resources directly
string text = SRB_Strings_Resources.MyResource;
Sorry again, that I did not see this issue "on time". But maybe this explanation helps others coming here.