Welcome to MSDN Blogs Sign in | Join | Help
Merge Multiple .NET Assemblies Into One

Here is a great "power toy" for .NET developers, ILMerge.

ILMerge will allow you to combine multiple .NET assemblies into one.  This allows lots of different possibilities, the most common of which is if you have a project where some of the code was developed by a VB team and others by a C# team.  Using ILMerge you can combine these two assemblies into one to distribute to your customers just like if you had coded them in one solution.

Another possible use, if you have built out your UI in one solution and your business logic in a separate solution you can combine these two assemblies into one.  While there are certain values to leaving these as two assemblies in other situations the benefits of a single assembly is more desirable.

Published Friday, August 19, 2005 9:51 AM by Brad_McCabe

Filed under: ,

Comments

# Merge Assemblies @ Friday, August 19, 2005 1:58 PM

Michael Flanakin's Web Log

# Merge Assemblies @ Friday, August 19, 2005 1:58 PM

Michael Flanakin's Web Log

# What happens to Interanal Variables? @ Monday, August 22, 2005 7:19 AM

Does this give me the ablity to access internal variables that are in the other assembly?

Glenn Johnson

# re: Merge Multiple .NET Assemblies Into One @ Monday, August 22, 2005 9:58 AM

> Does this give me the ablity to access internal variables that are in the other assembly?

How would get the two separate assemblies to build if you had one trying to access internal variables of an assembly that isn't even referenced/merged yet?

Unless you are speaking of using reflection at runtime to find the internal variables. But can't reflection always do that?

Todd Moon

# re: Merge Multiple .NET Assemblies Into One @ Monday, August 22, 2005 11:33 AM

I assume ILMerge has been updated to work with the 2.0 Framework? I've used it in the past for merging 1.1 assemblies and it's been very helpful for cleaning up my bin directories.

How does merging multiple assemblies affect load times? Aren't assemblies generally lazily-loaded? What happens when they're all in one big file? Is there any performance decrease?

Ryan

# Interanal with reflection @ Monday, August 22, 2005 1:09 PM

Reflection doesn't work with Internal because of Internal's physical assembly boundary, but maybe it will here. I might give this a try... If anybody else tries this, please let me know what you find.

Glenn Johnson

# ILMerge - mehrere Assemblies zu einer verlinken @ Tuesday, August 30, 2005 3:58 AM

(Diesen Artikel hatte ich vor dem offiziellen Launch schon einmal auf theSpoke 2 gebloggt, so dass er...

MathiasR

# interanal @ Thursday, June 26, 2008 5:59 PM

PingBack from http://quinten.videomarketsite.com/interanal.html

interanal

New Comments to this post are disabled
© 2009 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker