Greetings,
I am somewhat puzzled by a difference that occurs when I compile my
web application out of VS.NET or if I compile it through NAnt. The
issue is with how the resources get compiled into the application's
dll file. Using the Reflector application I can see that VS.NET
comiles the default language resource into the main dll while putting
other languages into so-called satellite assemblies to folders which
are named after the specified language.
(e.g.
root/main.dll <- Contains default language German
root/en/main.resources.dll <- Contains the English resources)
NAnt, through the use of the csc compilation task, includes all
resources into the main assembly. I can see both resources (German and
English) through the Reflector app, both having the same name as in
the VS.NET compiled case. It suggests that all should be the same
apart from the missing satellite assembly. This wouldn't be so much of
an issue for me, however, by accessing the resources with the
ResourceManager class, which I construct the following way:
new ResourceManager("main.Resources.locale",
System.Reflection.Assembly.GetExecutingAssembly()) ;
A problem arises: The english resources are not seen by the app when
it is compiled without satellite assemblies, as the default language
will be used under all circumstances. Compiling the VS.NET way, all
works fine and the English language is used as intended without any
modifications to the code.
I don't know where to ask this question really, so I have it in
general now. If anybody also knows of a better forum to ask this,
please let me know. Thanks for any help
Frank