views:

183

answers:

5

I have a Visual Studio solution, and this solution contains a few projects. Can I build all the projects from this solution into one dll?

+7  A: 

You can use ILMerge to merge a number of assemblies into one.

There is also a fairly old mono project with similar capabilities - mono.merge.

Oded
Thanks a lot for your answer.
jitm
+3  A: 

Try using ILMerge http://research.microsoft.com/en-us/people/mbarnett/ilmerge.aspx

Longball27
+1  A: 

Since you are talking about projects, you can also compile them as .netmodule and put them in one assembly like this: http://msdn.microsoft.com/en-us/library/226t7yxe(VS.90).aspx

Blub
+1  A: 

No, viusal studio will not combine the source/output from multiple projects into a single dll/application. Your best bet to do this is to set the post-build step of each project to call a third part application (like ILMerge). Just make sure the build order is correct and that the multiple projects are not trying to launch. You also may be able to get away with making another project that statically links to the other dlls.

JMcCarty