ILRepack 2.0.44
dotnet add package ILRepack --version 2.0.44
NuGet\Install-Package ILRepack -Version 2.0.44
<PackageReference Include="ILRepack" Version="2.0.44"> <PrivateAssets>all</PrivateAssets> <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets> </PackageReference>
<PackageVersion Include="ILRepack" Version="2.0.44" />
<PackageReference Include="ILRepack"> <PrivateAssets>all</PrivateAssets> <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets> </PackageReference>
paket add ILRepack --version 2.0.44
#r "nuget: ILRepack, 2.0.44"
#:package ILRepack@2.0.44
#addin nuget:?package=ILRepack&version=2.0.44
#tool nuget:?package=ILRepack&version=2.0.44
Introduction
ILRepack is meant at replacing 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.
Downloads
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.
Dotnet Tool Installation
ILRepack can now be installed as a dotnet tool:
PS C:\> dotnet tool install -g dotnet-ilrepack
You can then run ILRepack using ilrepack.
There's no need to use dotnet ilrepack, as the way the tool is installed into the dotnet tools path, all you need to do is issue the command ilrepack.
Syntax
A console application is available (can be used as DLL as well), using same syntax as ILMerge:
Syntax: ILRepack.exe [Options] /out:<path> <path_to_primary> [<other_assemblies> ...]
 - /help              displays this help
 - @<path>.rsp        response file containing additional arguments, one per line
 - /log:<logfile>     enable logging to a file (default is disabled)
 - /verbose           more detailed logging
 - /out:<path>        target assembly path, symbol/config/doc files will be written here as well
 - <path_to_primary>  primary assembly, gives the name, version to the merged one
 - <other_assemblies> other assemblies to merge with the primary one
 - /wildcards         allows (and resolves) file wildcards (e.g. *.dll) in input assemblies
 - /lib:<path>        path(s) to search directories to resolve referenced assemblies 
                      (can be specified multiple times).
                      If you get 'unable to resolve assembly' errors specify a path to a directory
                      where the assembly can be found.
 - /target:kind       target assembly kind [library|exe|winexe], default is same as primary assembly
 - /ver:M.X.Y.Z       target assembly version
 - /keyfile:<path>    keyfile to sign the output assembly
 - /keycontainer:<c>  key container
 - /delaysign         set the key, but don't sign the assembly
 - /internalize       make all types except in the first assembly 'internal'.
                      Types in the transitive closure of public API remain public.
 - /internalizeassembly:<path>
                      Internalize a specific assembly name (no extension).
                      May be specified more than once (one per assembly to internalize).
                      If specified, no need to also specify /internalize.
 - /internalize:<exclude_file>
                      Each line is either a regex/ full type name not to internalize
                      or an assembly name not to internalize (.dll extension optional)
 - /renameinternalized
                      rename each internalized type to a new unique name
 - /excludeinternalizeserializable
                      do not internalize types marked as Serializable
 - /allowdup:Type     keep duplicates of the specified type, may be specified more than once
 - /allowdup          if no other /allowdup arguments specified, allow all duplicate types
 - /union             merges types with identical names into one
 - /repackdrop:RepackDropAttribute 
                      allows dropping members denoted by this attribute name when merging
 - /allowduplicateresources 
                      allows to duplicate resources in output assembly (by default they're ignored)
 - /noRepackRes       do not add the resource '{ResourcesRepackStep.ILRepackListResourceName}' with all merged assembly names
 - /copyattrs         copy assembly attributes (by default only the primary assembly attributes are copied)
 - /attr:<path>       take assembly attributes from the given assembly file
 - /allowMultiple     when copyattrs is specified, allows multiple attributes (if type allows)
 - /targetplatform:P  specify target platform (v1, v1.1, v2, v4 supported)
 - /keepotherversionreferences
                      take reference assembly version into account when removing references
 - /preservetimestamp preserve original file PE timestamp
 - /skipconfig        skips merging config files
 - /illink            merge IL Linker files
 - /xmldocs           merges XML documentation as well
 - /ndebug            disables symbol file generation (omit this if you want symbols and debug information)
 - /zeropekind        allows assemblies with Zero PeKind (but obviously only IL will get merged)
 - /index             stores file:line debug information as type/method attributes (requires PDB)
 - /parallel          use as many CPUs as possible to merge the assemblies
 - /pause             pause execution once completed (good for debugging)
 - /usefullpublickeyforreferences - NOT IMPLEMENTED
 - /align             - NOT IMPLEMENTED
 - /closed            - NOT IMPLEMENTED
Note: for compatibility purposes, all Options are case insensitive, and can be specified using '/', '-' or '--' prefix.
How to build
Builds directly from within Visual Studio 2022, or using msbuild:
git clone --recursive https://github.com/gluck/il-repack.git
cd il-repack
msbuild
TODO
- Crash-testing
- Add remaining features from ILMerge (closed / align)
- Un-fork Cecil
- Merge import process & reference fixing
DONE
- PDBs & MDBs should be merged (Thanks Simon)
- Fixed internal method overriding public one which isn't allowed in the same assembly (Simon)
- Attribute merge (/copyattrs)
- XML documentation merge
- Clean command line parameter parsing
- Add usage / version
- App.config merge
- Internalizing types (Simon)
- Delay signing (Simon)
- Target platform selection (Simon)
- Automatic internal type renaming
Sponsoring / Donations
If 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.
Learn more about Target Frameworks and .NET Standard.
This package has no dependencies.
NuGet packages (6)
Showing the top 5 NuGet packages that depend on ILRepack:
| Package | Downloads | 
|---|---|
| ILRepack.FullAuto Full automatic ILRepack executor on .NET, .NET Core and .NET Framework | |
| Vostok.Sys.Metrics.ETW Provides system metrics on Windows platform via ETW | |
| PrzyjaznaFaktura Biblioteka integracyjna z systemem PrzyjaznaFaktura | |
| ricaun.ILRepack Targets to ILRepack project. | |
| Publicise.MSBuild.Task MSBuild task to make assemblies with all members public. | 
GitHub repositories (29)
Showing the top 20 popular GitHub repositories that depend on ILRepack:
| Repository | Stars | 
|---|---|
| HangfireIO/Hangfire 
                                                            An easy way to perform background job processing in .NET and .NET Core applications. No Windows Service or separate process required
                                                         | |
| xunit/xunit 
                                                            xUnit.net is a free, open source, community-focused unit testing tool for .NET.
                                                         | |
| JavScraper/Emby.Plugins.JavScraper 
                                                            Emby/Jellyfin 的一个日本电影刮削器插件,可以从某些网站抓取影片信息。
                                                         | |
| KSP-CKAN/CKAN 
                                                            The Comprehensive Kerbal Archive Network
                                                         | |
| lookup-foundation/RevitLookup 
                                                            Interactive Revit RFA and RVT project database exploration tool to view and navigate BIM element parameters, properties and relationships.
                                                         | |
| JetBrains/resharper-unity 
                                                            Unity support for both ReSharper and Rider
                                                         | |
| 3F/DllExport 
                                                            .NET DllExport with .NET Core support (aka 3F/DllExport aka DllExport.bat)
                                                         | |
| NuGet/NuGet.Client 
                                                            Client Tools for NuGet - including Visual Studio extensions, command line tools, and msbuild support. (Open issues on https://github.com/nuget/home/issues)
                                                         | |
| dlech/KeeAgent 
                                                            ssh agent plugin for KeePass 2.x
                                                         | |
| AlifeLine/Emby.Plugins.Douban 
                                                            Emby的豆瓣削刮器
                                                         | |
| devlooped/ThisAssembly 
                                                            Expose project and assembly level information as constants in the ThisAssembly class using source generators powered by Roslyn.
                                                         | |
| microsoft/workbooks 
                                                            Workbooks is an interactive programming environment that’s perfect for experimentation, learning, and documentation: an educational tool for learning the myriad of .NET platforms, APIs, and libraries.
                                                         | |
| akorb/SteamShutdown 
                                                            Automatic shutdown after Steam download(s) has finished.
                                                         | |
| k1tbyte/Wemod-Patcher 
                                                            WeMod patcher allows you to get some WeMod Pro features absolutely free
                                                         | |
| metalama/Metalama 
                                                            A meta-programming framework for code generation, aspect-oriented programming, and architecture verification of large C# codebases.
                                                         | |
| G-Research/consuldotnet 
                                                            Consul.NET is a .NET client library for the Consul HTTP API
                                                         | |
| Nice3point/RevitTemplates 
                                                            Templates for creating Revit add-ins
                                                         | |
| Nik-Potokar/XIVSlothCombo 
                                                            XivCombo for very lazy gamers
                                                         | |
| 0install/0install-win 
                                                            Windows version of Zero Install
                                                         | |
| t-richards/chemo 
                                                            Remove pre-installed junk from Windows 10.
                                                         | 
| Version | Downloads | Last Updated | 
|---|---|---|
| 2.0.44 | 24,644 | 6/8/2025 | 
| 2.0.43 | 2,704 | 5/27/2025 | 
| 2.0.42 | 4,925 | 5/15/2025 | 
| 2.0.41 | 19,382 | 3/21/2025 | 
| 2.0.40 | 8,305 | 2/28/2025 | 
| 2.0.39 | 10,225 | 2/19/2025 | 
| 2.0.38 | 2,392 | 2/18/2025 | 
| 2.0.37 | 11,175 | 2/5/2025 | 
| 2.0.36 | 13,366 | 12/10/2024 | 
| 2.0.35 | 20,688 | 10/2/2024 | 
| 2.0.34 | 87,338 | 6/10/2024 | 
| 2.0.33 | 18,360 | 5/10/2024 | 
| 2.0.32 | 5,558 | 5/6/2024 | 
| 2.0.31 | 11,215 | 4/21/2024 | 
| 2.0.30 | 8,454 | 4/5/2024 | 
| 2.0.28 | 6,383 | 3/19/2024 | 
| 2.0.27 | 42,633 | 1/15/2024 | 
| 2.0.26 | 1,704 | 1/10/2024 | 
| 2.0.25 | 27,935 | 1/8/2024 | 
| 2.0.24 | 1,163 | 1/7/2024 | 
| 2.0.18 | 1,308,622 | 9/8/2019 | 
| 2.0.17 | 175,737 | 5/21/2019 | 
| 2.0.16 | 356,987 | 7/30/2018 | 
| 2.0.15 | 185,024 | 12/7/2017 | 
| 2.0.14 | 4,414 | 11/21/2017 | 
| 2.0.13 | 163,199 | 4/6/2017 | 
| 2.0.12 | 21,567 | 10/24/2016 | 
| 2.0.11 | 9,357 | 8/22/2016 | 
| 2.0.10 | 256,141 | 1/8/2016 | 
| 2.0.9 | 5,111 | 12/16/2015 | 
| 2.0.8 | 8,671 | 10/6/2015 | 
| 2.0.5 | 9,163 | 8/19/2015 | 
| 2.0.4 | 4,145 | 7/30/2015 | 
| 2.0.3 | 3,587 | 7/22/2015 | 
| 2.0.2 | 5,904 | 6/18/2015 | 
| 2.0.1 | 7,584 | 6/14/2015 | 
| 2.0.0 | 3,280 | 6/7/2015 | 
| 1.26.0 | 41,686 | 5/2/2015 | 
| 1.25.0 | 68,517 | 2/17/2014 | 
| 1.24.0 | 3,826 | 1/20/2014 | 
| 1.23.0 | 3,497 | 12/16/2013 | 
| 1.22.2 | 5,766 | 3/3/2013 | 
| 1.22.1 | 3,411 | 3/3/2013 | 
| 1.22.0 | 3,542 | 3/3/2013 | 
| 1.21.3 | 2,711 | 2/5/2013 | 
| 1.21.2 | 2,569 | 1/23/2013 | 
| 1.21.1 | 2,525 | 1/22/2013 | 
| 1.20.0 | 3,850 | 12/1/2012 | 
| 1.18.0 | 3,925 | 10/15/2012 | 
| 1.17.0 | 5,090 | 10/3/2012 |