views:

47

answers:

2

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

Is this possible?

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

cheers, M

+9  A: 

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.

Jon Skeet
It would be cool to see this tool integrated into Visual Studio. I am envisioning a check box next to a referenced assembly that you can toggle to control whether it gets merged or is left standalone. Or perhaps a new drop down option along side the copy local option in the properties window. Thoughts?
Brian Gideon
+1  A: 

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

Sijin