I would like to know how to load string resource from another class library. Here is my structure.
Solution\
CommonLibrary\
EmbeddedResource.resx
MainGUI\
If I get the string on classes of CommonLibrary I just use EmbeddedResource.INFO_START_MSG but when I try to use typed string resource It cannot recognize the resource file. Note that the CommonLibrary is already referenced in the MainGUI.
I usually do it this way.
Solution\
CommonLibrary\
MainGUI\
EmbeddedResource.resx
But I want to use the same resource on both projects.
Add the reference to the library to the main application. Make certain that (on the Resources file) the “Access Modifier” is set to public.
Reference the string like so:
I added the resource file via right clicking, thus the “1” in the name. If you go to the Properties page for the class library and click on the “Resources” tab, you can add the default resources file, which will not have the numeral “1” in the name.
Just make certain your values are public, and that you have the reference in the main project and you should have no issues.