Embed a resource file into an existing dll

  • Thread starter Thread starter Kenneth
  • Start date Start date
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
 
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.
 
Back
Top