Embed a resource file into an existing dll

K

Kenneth

Hello experts!



Is it possible to a culture specific resource file embedded into an existing
dll?



For instance: I have a dll-file called MyApp.dll which automatically holds
the fallback language strings in a resource file called Strings.resx.

Whenever I add resource file called Strings.de.resx, I get another dll -
called MyApp.resources.dll and placed in bin/de/ folder - whenever I compile
the project.



Since I'd like to make sure that the MyApp.dll and all the resource files
always are synchronized I'd like to embed these files into the application
dll. Is that possible? Or is there some other way of achieving this?



Thanks,

Kenneth
 
M

Manoj G [MVP]

Hi,
I suppose, as long as the resource files are in the same project, it should
not be a problem. Everytime you compile your project, new satellite dlls are
automatically created. The synching problem only arises when you are
creating satellite assemblies outside of the project, that is, using
resgen.exe and al.exe.
ResourceManager class automatically probes for culture specific assemblies
in subdirectories and I think this behavior cannot be changed. What you can
do is have all the resources in your assembly and use a custom
ResourceManager-like implementation. But remeber that the ability to build
satellite assemblies outside of the project has many advantages - you can
support a new culture in your application even after the app is built. It
would be hard for you to build this independance yourself.
 

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