Merge exe and dll's into a single exe

Wizard for Windows Forms Forum

Posted 17 years ago by Logicway
Version: 3.0.0125
Avatar
I tried to merge the exe that my project created with the neccessary dll's (ActiproSoftware.Wizard.Net20.dll, ActiproSoftware.Shared.Net20.dll, ActiproSoftware.WinUICore.Net20.dll) using ILMerge ILMerge and Gilma (GUI for ILMerge), but without any luck.

Previous projects worked without any problems.

Is there something special with your dll's? Am I missing something?

Comments (6)

Posted 17 years ago by Logicway
Avatar
This is the log when merging by commandline:
ILMerge version 2.0.0.60815
Copyright (C) Microsoft Corporation 2004-2006. All rights reserved.
ILMerge /out:test.exe Test.exe ActiproSoftware.Shared.Net20.dll ActiproSoftware.WinUICore.Net20.dll ActiproSoftware.Wizard.Net20.dll /allowDup 
Running on Microsoft (R) .NET Framework v2.0.50727
mscorlib.dll version = 2.0.0.0
The list of input assemblies is:
    Test.exe
    ActiproSoftware.Shared.Net20.dll
    ActiproSoftware.WinUICore.Net20.dll
    ActiproSoftware.Wizard.Net20.dll
Trying to read assembly from the file 'C:\Merge\Test.exe'.
    Successfully read in assembly.
    There were no errors reported in Test's metadata.
Trying to read assembly from the file 'C:\Merge\ActiproSoftware.Shared.Net20.dll'.
Can not find PDB file. Debug info will not be available for assembly 'ActiproSoftware.Shared.Net20.dll'.
    Successfully read in assembly.
    There were no errors reported in ActiproSoftware.Shared.Net20's metadata.
Trying to read assembly from the file 'C:\Merge\ActiproSoftware.WinUICore.Net20.dll'.
Can not find PDB file. Debug info will not be available for assembly 'ActiproSoftware.WinUICore.Net20.dll'.
    Successfully read in assembly.
    There were no errors reported in ActiproSoftware.WinUICore.Net20's metadata.
Trying to read assembly from the file 'C:\Merge\ActiproSoftware.Wizard.Net20.dll'.
Can not find PDB file. Debug info will not be available for assembly 'ActiproSoftware.Wizard.Net20.dll'.
    Successfully read in assembly.
    There were no errors reported in ActiproSoftware.Wizard.Net20's metadata.
Checking to see that all of the input assemblies have a compatible PeKind.
    Test.PeKind = ILonly
    ActiproSoftware.Shared.Net20.PeKind = ILonly
    ActiproSoftware.WinUICore.Net20.PeKind = ILonly
    ActiproSoftware.Wizard.Net20.PeKind = ILonly
All input assemblies have a compatible PeKind value.
Merging assembly 'Test' into target assembly.
Merging assembly 'ActiproSoftware.Shared.Net20' into target assembly.
Merging assembly 'ActiproSoftware.WinUICore.Net20' into target assembly.
Duplicate type name: modifying name of the type 'j' (from assembly 'ActiproSoftware.WinUICore.Net20') to 'ActiproSoftware.WinUICore.Net2067303.j'
Duplicate type name: modifying name of the type 'f' (from assembly 'ActiproSoftware.WinUICore.Net20') to 'ActiproSoftware.WinUICore.Net2067303.f'
Duplicate type name: modifying name of the type 'i' (from assembly 'ActiproSoftware.WinUICore.Net20') to 'ActiproSoftware.WinUICore.Net2067303.i'
Merging assembly 'ActiproSoftware.Wizard.Net20' into target assembly.
Duplicate type name: modifying name of the type 'l' (from assembly 'ActiproSoftware.Wizard.Net20') to 'ActiproSoftware.Wizard.Net20125120.l'
Duplicate resource name: modifying name of the resource 'l.resources' (from assembly 'ActiproSoftware.Wizard.Net20') to 'ActiproSoftware.Wizard.Net20125120.l.resources'
Duplicate type name: modifying name of the type 'c' (from assembly 'ActiproSoftware.Wizard.Net20') to 'ActiproSoftware.Wizard.Net20125120.c'
Duplicate resource name: modifying name of the resource 'c.resources' (from assembly 'ActiproSoftware.Wizard.Net20') to 'ActiproSoftware.Wizard.Net20125120.c.resources'
Duplicate type name: modifying name of the type 'm' (from assembly 'ActiproSoftware.Wizard.Net20') to 'ActiproSoftware.Wizard.Net20125120.m'
Duplicate type name: modifying name of the type 't' (from assembly 'ActiproSoftware.Wizard.Net20') to 'ActiproSoftware.Wizard.Net20125120.t'
Duplicate type name: modifying name of the type 'd' (from assembly 'ActiproSoftware.Wizard.Net20') to 'ActiproSoftware.Wizard.Net20125120.d'
Duplicate type name: modifying name of the type 'z' (from assembly 'ActiproSoftware.Wizard.Net20') to 'ActiproSoftware.Wizard.Net20125120.z'
Duplicate type name: modifying name of the type 'ad' (from assembly 'ActiproSoftware.Wizard.Net20') to 'ActiproSoftware.Wizard.Net20125120.ad'
Duplicate type name: modifying name of the type 'ac' (from assembly 'ActiproSoftware.Wizard.Net20') to 'ActiproSoftware.Wizard.Net20125120.ac'
Duplicate type name: modifying name of the type 'r' (from assembly 'ActiproSoftware.Wizard.Net20') to 'ActiproSoftware.Wizard.Net20125120.r'
Duplicate type name: modifying name of the type 'u' (from assembly 'ActiproSoftware.Wizard.Net20') to 'ActiproSoftware.Wizard.Net20125120.u'
Duplicate type name: modifying name of the type 'f' (from assembly 'ActiproSoftware.Wizard.Net20') to 'ActiproSoftware.Wizard.Net20125120.f'
Merging assembly-level attributes from assembly 'Test' into target assembly.
Copying 3 Win32 Resources from assembly 'Test' into target assembly.
Transferring entry point 'Test.Program.Main' from assembly 'Test' to assembly 'test'.
    There were no errors reported in the target assembly's metadata.
ILMerge: Writing target assembly 'test.exe'.
AssemblyResolver: Assembly 'System' is referencing assembly 'System.Configuration'.
    AssemblyResolver: Attempting referencing assembly's directory.
Can not find PDB file. Debug info will not be available for assembly 'System.Configuration'.
Resolved assembly reference 'System.Configuration' to 'C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.Configuration.dll'. (Used referencing Module's directory.)
Location for referenced module 'GDI32.dll' is ''
Location for referenced module 'User32.dll' is ''
Location for referenced module 'UxTheme.dll' is ''
Location for referenced module 'Kernel32.dll' is ''
Location for referenced assembly 'System.Windows.Forms' is 'C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.Windows.Forms.dll'
    There were no errors reported in  System.Windows.Forms's metadata.
Location for referenced assembly 'mscorlib' is 'C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\mscorlib.dll'
    There were no errors reported in  mscorlib's metadata.
Location for referenced assembly 'System' is 'C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.dll'
    There were no errors reported in  System's metadata.
Location for referenced assembly 'System.Drawing' is 'C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.Drawing.dll'
    There were no errors reported in  System.Drawing's metadata.
Location for referenced assembly 'System.Data' is 'C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.Data.dll'
    There were no errors reported in  System.Data's metadata.
Location for referenced assembly 'System.Design' is 'C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.Design.dll'
    There were no errors reported in  System.Design's metadata.
Location for referenced assembly 'System.Web.Services' is 'C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.Web.Services.dll'
    There were no errors reported in  System.Web.Services's metadata.
Location for referenced assembly 'System.Xml' is 'C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.Xml.dll'
    There were no errors reported in  System.Xml's metadata.
ILMerge: Done.
Looks like there are duplicate type names in the dll's.
Posted 17 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
The problem with ILMerge is that it doesn't handle the storing of the embedded license data
in the output assembly. So this means that no third-party component that uses
the .NET licensing mechanisms (like we do) will work in a merged scenario.

You can read all about it here along with a link to another similar program that does
seem to work fine for merging:
ILMerge Thread


Actipro Software Support

Posted 17 years ago by Logicway
Avatar
Thanks for the link.

But in the mean time I found and easier and even better way to merge the dll's into the exe.
Just add the dll's as "Existing Item" to your project and change the dll's build action to "Embedded Resource".

After building, the dll's are built within the exe.
Posted 17 years ago by Logicway
Avatar
It didn't work out either.
On my pc (where the dll's are already installed) it worked fine.
But not on another pc.
Posted 15 years ago by Logicway
Avatar
Just wanted to let you know that merge the exe and dll's into a single exe works perfectly with Netz and no issues with the license file. It also compresses, so your final exe will be a lot smaller.
Posted 14 years ago by krishan
Avatar
Just goto http://csharpdemos.b...dll-merger.html and you will find ur answer !
download the application n ur done !
The latest build of this product (v24.1.0) was released 2 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.