Difference between IDE and command line compiler when compiling resources

L

Louise Caldicott

Hi all,


I have created a project in Visual Studio which uses satellite assemblies.
I have also written a script to build this project from the command line.
There seems to be a difference in behaviour when I link the resources via
Dev Studio and the command line.



The code which loads the resource needs to be different otherwise the
resource doesn't load successfully and a
System.Resources.MissingManifestResourceException occurs.



For the command line:



resourceManager = new ResourceManager(

"ResourceClassLibrary",

System.Reflection.Assembly.GetExecutingAssembly());



For Visual Studio:



resourceManager = new ResourceManager(

"ResourceClassLibrary.Resources.ResourceClassLibrary",

System.Reflection.Assembly.GetExecutingAssembly());



The project name is ResourceClassLibrary and the resource file is called
ResourceClassLibrary.resources.



Is there any way to load the resource file using the same code which would
work when building in Visual Studio and on the command line?




I would very much appreciate any help with this problem, many thanks in
advance,


Louise Caldicott.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top