Click here to Skip to main content
Click here to Skip to main content

Gilma - GUI for the ILMerge Application Revised for .NET 4.0

By , 13 Feb 2013
 
Screenshot - Article.gif

Introduction

I saw the beautiful interface made by Tomer Shalev on the SourceForce Web site and thought I could rewrite it in a self-contained way. The original Tomer Shalev's Gilma is a front-end application to ILMerge: Microsoft's command-line utility that can be used to merge multiple .NET assemblies into a single assembly. ILMerge is freely available from Microsoft's Web site.
ILMerge's license does allow commercial usage.
In my implementation, the snapshot of which you can see in the image above, I have referenced the ILMerge executable directly in Visual Studio 2010.

Using the Code

The MSI file contained in the demo installs the application. .NET 4.0 Client profile and the 3.1 Installers are pre-requisites. In the source zip, the entire Visual Studio 201 project is contained.
The only thing to point out is the presence of the possibility to use a strong key in the preferred *.snk format to digitally sign the assembly.

Points of Interest

  • The implementation is fairly trivial. The code is derived from the ILMerging interface help found on the Microsoft Web site.
  • Added support for file names Drag and Drop as suggested.

History

  • Updated to contain the ZeroPeKind option checkbox
  • This is version 3.0 considering   2.0 the one for .net 2.0 and 1.0 the one for .NET 1.1 in the Tomer Shalev SourceForce site (Added Drag and Drop Support for file names)

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

About the Author

tuscano
Engineer
Italy Italy
Member
No Biography provided

Sign Up to vote   Poor Excellent
Add a reason or comment to your vote: x
Votes of 3 or less require a comment

Comments and Discussions

 
You must Sign In to use this message board.
Search this forum  
    Spacing  Noise  Layout  Per page   
QuestionConsider updating to 4.0, source is flagging mising assembliesmemberwknopf17 Oct '11 - 19:02 
All of my code is using .NET 4.0. I downloaded the source and it won't compile in VS2010 because of missing assemblies.
The istalled version barfes at all of my code (newer version).
This looks like a good project, so spending extra time to upgrade it seems worthwile.
You can get a 1 or a 5 from me pending if you fix that.
Ciao,
Walter
GeneralMy vote of 4memberSergio Andrés Gutiérrez Rojas11 Oct '11 - 21:01 
Nice Work!!
GeneralQuestion about errorsmemberCodeMasterMike24 Feb '09 - 20:20 
Hi!
 
I was just gonna ask, because it seems I cant merge any DLL's at all.
Ive tried my own and random DLL's located on my computer.
Now, I dont think its any issue with the application since its working for other people.
 
Error Msg: "Could not load assembly from the location 'c:\......'. Skipping and processing rest of arguments"
 
I cant find any answer or reason to this error message, more than it doesnt accept the DLL.
But I have tried so many different ones, so it would be strange if all DLL's on my computer is not
acceptable.
 
So I thought it could be I am going at it all in the wrong way when trying to merge files.
So I was just wondering if there is a simple step-by-step instructions to this application?
I've not found any for ILMerge except how to write the inparameters.
 
What confuses me, is couple of things...
Does it matter which DLL files I use as Primary Assembly, or do I have to do it in a certain way?
I write in a DLL name as output, does it need to exist, or will it be created automaticly?
 
What I wanted to do, is to merge 2-3 DLL files into a already created DLL file.
I set a existing DLL file (which I want to have as the only one) or I just put in a new name.
I then put in one of the DLL's in the Primary Assembly, and add the second one to the Other Assemblies.
 
I dont use strong key, and I have target type as DLL. When clicking the merge button, the error above
comes up. Same issue if I try to merge it into a *.exe file.
GeneralVS2008 Add_Inmembertuscano20 Nov '08 - 3:17 
Answering to your question an Add_In to merge different assemblies into one in VS2008 is feasible.
 
I will look into this and come up with the code asap.
 
RGDs Andrea Wink | ;)
GeneralYou know what would be really nice...memberchaiguy133714 Nov '08 - 13:15 
Is if we could build a Visual Studio add-in that allowed all of a project's dependent assemblies to be automatically ILMerged into a single output assembly.
 
Think that would even be possible?
 
“It behooves every man to remember that the work of the critic, is of altogether secondary importance, and that, in the end, progress is accomplished by the man who does things.”
–Theodore Roosevelt
 
{o,o}.oO( Check out my blog! )
|)””’)          http://pihole.org/
-”-”-

GeneralAha!memberchaiguy133714 Nov '08 - 15:08 
Found the next best thing:
 
http://blogs.msdn.com/jomo_fisher/archive/2006/03/05/544144.aspx[^]
 
It's a quick hack that allows a project to be compiled and merged to a single assembly, based on dependent assemblies that have CopyTo true.
 
It would be nice if someone could make this into an actual add-in so it could be enabled with a simple flag right in the IDE, but this will abate me for now.
 
“It behooves every man to remember that the work of the critic, is of altogether secondary importance, and that, in the end, progress is accomplished by the man who does things.”
–Theodore Roosevelt
 
{o,o}.oO( Check out my blog! )
|)””’)          http://pihole.org/
-”-”-

GeneralSaving/Loading Configuration does not workmembermasschel12 Nov '08 - 1:27 
Is it me, or is the saving and loading of configurations not working correctly?
GeneralRe: Saving/Loading Configuration does not workmembermasschel12 Nov '08 - 1:29 
Update: When saving, an xml file is created, but the tags are empty. So the problem is the saving, not the loading
GeneralVery nice work!!membersykiemikey30 Aug '07 - 6:37 
I went looking for an update to Gilma which I have used for quite a while and ran across your version here. My main complaint about the original was the results message box which you added a scrollbar to...THANKS!!!! Love it!
QuestionMerge it with the sourceforge project!memberSimone Busoli1 May '07 - 2:20 
Why don't you merge your implementation with the sourceforge project? It would be cool to have all the stuff in a single place, and sourceforge provides a great hosting for open source projects, too.
 
Simone Busoli

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Permalink | Advertise | Privacy | Mobile
Web04 | 2.6.130516.1 | Last Updated 13 Feb 2013
Article Copyright 2007 by tuscano
Everything else Copyright © CodeProject, 1999-2013
Terms of Use
Layout: fixed | fluid