Open-source alternative to ILMerge
ILRepack is a tool used to merge multiple .NET assemblies into a single assembly.
ILRepack is a replacement for the discontinued ILMerge / Mono.Merge.
The former being closed-source (now open-sourced), impossible to customize, slow, resource consuming and many more.
The later being deprecated, unsupported, and based on an old version of Mono.Cecil.
Here we're using latest (slightly modified) Cecil sources (0.11.5), you can find the fork here.
You can grab it using NuGet.
Or if you're old-school (and want to stay like that), this direct link will give you the latest nupkg file, which you can open as a zip file.
ILRepack can now be installed as a dotnet tool:
PS C:\> dotnet tool install -g dotnet-ilrepackYou can then run ILRepack using ilrepack.
[!Note] There's no need to use
dotnet ilrepack, as the way the tool is installed into thedotnet tools path, all you need to do is issue the commandilrepack.
A console application is available (can be used as DLL as well), using same syntax as ILMerge:
…Builds directly from within Visual Studio 2022, or using msbuild:
git clone --recursive https://github.com/gluck/il-repack.git
cd il-repack
msbuildIf you like this tool and want to express your thanks, you can contribute either time to the project (issue triage or pull-requests) or donate money to the Free Software Foundation.
No open issues yet, or sync has not completed.