Ankush
Ankush

Reputation: 63

merge dependent dlls in c# application

I have created a backup console application (this is 32bit program running on .net 3.5 on windows 8 64bit) with these dlls:

Delimon.Win32.IO,

SevenZipSharp,

7z(native) dll I have tried to merge them with ilmerge but program still asks dlls( Delimon.Win32.IO not found ) while startup.

Then I tried second solution: add dll's to resources & handle AssemblyResolve event, still same problem.

Any clue what is problem?.

I dont want any commercial solution.

Upvotes: 0

Views: 1053

Answers (1)

Cameron MacFarland
Cameron MacFarland

Reputation: 71946

I'd recommend using Costura.

https://github.com/Fody/Costura

Costura is avaliable on NuGet and is a simple solution for providing a custom AssemblyResolve system. It will take all your projects references and automatically add them at build time.

Also, if you have native or mixed-mode assemblies (like for example 7zip) then you'll need to provide Costura with a bit of configuration. Everything is covered in the readme.

Upvotes: 2

Related Questions