0

I created a .NET class library in C# with some resources for localization and already translated them to different languages and put them into different *.resx-files. But when I compile the assembly, only the default *.resx-files are compiled into the resulting dll and the others are compiled into different dlls in different sub folders.

I know this is the default behavior of Visual Studio but for me this is not very useful, because I do not want to distribute many files in many folders but just one independent dll.

So I need to know what I have to change to compile everything into one dll.

Karsten
  • 1,814
  • 2
  • 17
  • 32

1 Answers1

1

You can use IL Merge to combine multiple assemblies into one .dll file.

Jakub Konecki
  • 45,581
  • 7
  • 87
  • 126
  • I know about this tool, but I thought there had to be an easier way of doing this and I do not want to rely on some external tool but rather use Visual Studio if possible. – Karsten Jun 07 '11 at 14:42
  • Additionally the ´ResourceManager´ does not find resources that are merged with IL Merge – Karsten Jun 07 '11 at 14:49
  • Sorry, I don't know any other way. You can solve the problem with `ResourceManager` fallback as described here: http://stackoverflow.com/questions/1952638/single-assembly-multi-language-windows-forms-deployment-ilmerge-and-satellite-as/1955060#1955060 – Jakub Konecki Jun 07 '11 at 15:08
  • @Karsten: This is probably the easiest way. I doubt having to embed your files **manually** and override Assembly resolving method by your own is easier... – Paweł Dyda Jun 07 '11 at 16:25
  • 1
    Ended up using IL Merge and using it with [this trick](http://www.hanselman.com/blog/MixingLanguagesInASingleAssemblyInVisualStudioSeamlesslyWithILMergeAndMSBuild.aspx) to automate merging in my build process. – Karsten Dec 20 '11 at 13:43