I just noticed a download on the Microsoft website that I’ve just got to try out later, it’s called ILMerge and it’s a utility that lets you merge multiple .NET assemblies into a single assembly.
For those not versed in .NET terminology, an “assembly” is a .dll or an .exe containing code and resources. This tool would let you merge several dll’s into one, or even several exes (although only one can be “primary” and launch on execution). Hypothetically this would mean that if you were delivering a .NET application that uses plugins (like ShotGlass) you could provide a web service that would merge the plugins that the user wanted to actually use right into the main executable.
In fact, although ILMerge is a console application, the download page notes that all of it’s functionality is also available programmatically. This means that using the C# compiler’s ability to add executable’s as a reference, you could theoretically build this capability into your main application, such that you could, on-the-fly, compile the plugins the customer selected right into your main application executable. Of course, you’d need to keep the un-combined originals around so you could do it again later with a different mix of plugins, but merging the assemblies like that should make the loading of the application faster, and reduce resource consumption.
Of course, there are a lot of other uses for something like this, it’s hardly limited to plugins You could also use it to tie together assemblies written in different .NET languages, so if you have some code written in VB.NET and some in C# and some in COmega or some other .NET language … you could merge them all together into one assembly.
On the downside, it only works with Microsoft’s .NET (not with Rotor or Mono)
Similar Posts:
- None Found
ILMerge is old news.. It also is known to break alot of dependancies of assemblies.