次の方法で共有


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.

Comments

  • Anonymous
    August 21, 2005
    Does this give me the ablity to access internal variables that are in the other assembly?
  • Anonymous
    August 22, 2005
    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?
  • Anonymous
    August 22, 2005
    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?
  • Anonymous
    August 22, 2005
    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.
  • Anonymous
    August 29, 2005
    (Diesen Artikel hatte ich vor dem offiziellen Launch schon einmal auf theSpoke 2 gebloggt, so dass er...
  • Anonymous
    June 26, 2008
    PingBack from http://quinten.videomarketsite.com/interanal.html