Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do you compile different classlibraries to one dll?

The question explains it all. I have different class libraries but I would like to compile them into one general DLL.

Is this possible?

I'm using .NET 3.5 with visual studio 2008.

like image 900
user29964 Avatar asked Jan 19 '26 00:01

user29964


2 Answers

See whether ilmerge (homepage / download site) does what you want it to:

ILMerge is a utility that can be used to merge multiple .NET assemblies into a single assembly. It is freely available for use from the Tools & Utilities page at the Microsoft .NET Framework Developer Center.

like image 193
Jon Skeet Avatar answered Jan 21 '26 13:01

Jon Skeet


If you're trying to build the one dll without source then ILMerge is the best option. Otherwise you can use the assembly linker with a batch file or MSBuild to build the single assembly.

Here's some background info on this How to: Build a Multifile Assembly - http://msdn.microsoft.com/en-us/library/226t7yxe(VS.90).aspx

Multi-file Assemblies: What and How - http://blogs.msdn.com/grantri/archive/2004/07/07/175745.aspx

like image 44
Sijin Avatar answered Jan 21 '26 13:01

Sijin



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!