ILRepack.Lib.MSBuild.Task
2.0.48
dotnet add package ILRepack.Lib.MSBuild.Task --version 2.0.48
NuGet\Install-Package ILRepack.Lib.MSBuild.Task -Version 2.0.48
<PackageReference Include="ILRepack.Lib.MSBuild.Task" Version="2.0.48"> <PrivateAssets>all</PrivateAssets> <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets> </PackageReference>
<PackageVersion Include="ILRepack.Lib.MSBuild.Task" Version="2.0.48" />
<PackageReference Include="ILRepack.Lib.MSBuild.Task"> <PrivateAssets>all</PrivateAssets> <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets> </PackageReference>
paket add ILRepack.Lib.MSBuild.Task --version 2.0.48
#r "nuget: ILRepack.Lib.MSBuild.Task, 2.0.48"
#:package ILRepack.Lib.MSBuild.Task@2.0.48
#addin nuget:?package=ILRepack.Lib.MSBuild.Task&version=2.0.48
#tool nuget:?package=ILRepack.Lib.MSBuild.Task&version=2.0.48
ILRepack.Lib.MSBuild.Task
MSBuild task for ILRepack which is an open-source alternative to ILMerge.
Install via NuGet

Install-Package ILRepack.Lib.MSBuild.Task
Supported build tools
- MSBuild
Usage
You need to install the NuGet package to merge all your project dependencies. If you want to customize the process, then
you can create a file named ILRepack.targets in your project folder. You can create it like shown below.
Example "ILRepack.targets"
<?xml version="1.0" encoding="utf-8" ?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Target Name="ILRepacker" AfterTargets="Build" Condition="'$(Configuration)' == 'Release' and '$(IsCrossTargetingBuild)' != 'true'">
<ItemGroup>
<InputAssemblies Include="$(OutputPath)\ExampleAssemblyToMerge1.dll" />
<InputAssemblies Include="$(OutputPath)\ExampleAssemblyToMerge2.dll" />
<InputAssemblies Include="$(OutputPath)\ExampleAssemblyToMerge3.dll" />
</ItemGroup>
<ItemGroup>
<DoNotInternalizeAssemblies Include="ExampleAssemblyToMerge3" />
</ItemGroup>
<ILRepack
Parallel="true"
Internalize="true"
InternalizeExclude="@(DoNotInternalizeAssemblies)"
InputAssemblies="@(InputAssemblies)"
TargetKind="Dll"
OutputFile="$(OutputPath)\$(AssemblyName).dll"
/>
</Target>
</Project>
Configuration
You need to create the ILRepack.Config.props file in your project folder to configure the behavior of
ILRepack.Lib.MSBuild.Task.
<?xml version="1.0" encoding="utf-8" ?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
</PropertyGroup>
</Project>
You can specify the following options inside the <PropertyGroup> element to configure the behavior of the ILRepack
task.
Specify your custom Targets file path
If you don't want to add ILRepack.targets file in your project folder, then you can specify your custom targets file
path as shown below.
<ILRepackTargetsFile>$(SolutionDir)ILRepack.targets</ILRepackTargetsFile>
Specify the Key File to use for signing
You can specify the path of the SNK file you want to use for signing your assembly as shown below. This configuration option only applies if you are using the default targets file provided in the NuGet package.
<KeyFile>$(ProjectDir)ILRepack.snk</KeyFile>
Specify whether to clear the directory after merging
If you are using the default targets file, then you may notice that it clears the Output directory after merging dependencies. You can turn this functionality off by setting ClearOutputDirectory to False as shown below.
<ClearOutputDirectory>False</ClearOutputDirectory>
Task options
| Option | Description |
|---|---|
| AllowDuplicateResources | Allows duplicating resources in the output assembly. |
| AllowMultiple | Allows multiple attributes (if type allows). |
| AllowedDuplicateNamespaces | Allows the specified namespaces from being duplicated into input assemblies. Multiple namespaces are delimited by ",". |
| AttributeFile | Take assembly attributes from the given assembly file. |
| CopyAttributes | Copy assembly attributes. |
| DebugInfo | Enable/disable symbol file generation. |
| DelaySign | Set the key file, but don't sign the assembly. |
| ExcludeInternalizeSerializable | Do not internalize types marked as Serializable. |
| InputAssemblies | List of assemblies that will be merged. |
| Internalize | Set all types but the ones from the first assembly 'internal'. |
| InternalizeAssembly | Internalize only specific assemblies (list of assembly names without path or extension). |
| InternalizeExclude | If Internalize is set to true, any which match these regular expressions will not be internalized. If Internalize is false, then this property is ignored. |
| KeyContainer | Specifies a key container to use. |
| KeyFile | Specifies a key file to sign the output assembly. |
| LibraryPath | List of paths to use as "include directories" when attempting to merge assemblies. |
| LogFile | Specifies a log file to output log information. |
| MergeIlLinkerFiles | Merge IL Linker file XML resources from Microsoft assemblies (optional). Same-named XML resources ('ILLink.*.xml') will be combined during merging. |
| NoRepackRes | Does not add the embedded resource 'ILRepack.List' with all merged assembly names. |
| OutputFile | Output name for the merged assembly. |
| LineIndexation | Stores file:line debug information as type/method attributes (requires PDB). |
| Parallel | Use as many CPUs as possible to merge the assemblies. |
| PauseBeforeExit | Pause execution once completed (good for debugging). |
| RenameInternalized | Rename all internalized types (to be used when Internalize is enabled). |
| RepackDropAttribute | Name of an attribute (optional). Members in input assemblies marked with this attribute will be dropped during merging. |
| TargetKind | Target assembly kind (Exe|Dll|WinExe|SameAsPrimaryAssembly) |
| TargetPlatformDirectory | Path of Directory where the target platform is located. |
| TargetPlatformVersion | Target platform (v1, v1.1, v2, v4 supported). |
| Union | Merges types with identical names into one. |
| Verbose | Additional debug information during the merge that will be outputted to LogFile. |
| Wildcards | Allows (and resolves) file wildcards (e.g., *.dll) in input assemblies. |
| XmlDocumentation | Merge assembly XML documentation. |
| ZeroPeKind | Allows assemblies with Zero PeKind (but obviously only IL will get merged). |
Learn more about Target Frameworks and .NET Standard.
This package has no dependencies.
NuGet packages (7)
Showing the top 5 NuGet packages that depend on ILRepack.Lib.MSBuild.Task:
| Package | Downloads |
|---|---|
|
TALXIS.DevKit.Build.Dataverse.Plugin
Dataverse MSBuild Plugin |
|
|
MSBuildRazorCompiler.Lib
Fork of MSBuildRazorCompiler. Updated to support .net 10 |
|
|
TALXIS.DevKit.Build.Dataverse.WorkflowActivity
Dataverse MSBuild WorkflowActivity |
|
|
HuajiTech.CoolQ.Packing.ILRepack
使用 ILRepack 打包 HuajiTech.CoolQ 应用。 |
|
|
ILRepack.Lib.NET
Modified original ILRepack by changing functionality for using ModuleDefinitions instead of file names to repack assemblies. |
GitHub repositories (28)
Showing the top 20 popular GitHub repositories that depend on ILRepack.Lib.MSBuild.Task:
| Repository | Stars |
|---|---|
|
wmjordan/PDFPatcher
PDF补丁丁——PDF工具箱,可以编辑书签、剪裁旋转页面、解除限制、提取或合并文档,探查文档结构,提取图片、转成图片等等
|
|
|
quasar/Quasar
Remote Administration Tool for Windows
|
|
|
pardeike/Harmony
A library for patching, replacing and decorating .NET and Mono methods during runtime
|
|
|
cxfksword/jellyfin-plugin-metashark
jellyfin电影元数据插件
|
|
|
wiremock/WireMock.Net
WireMock.Net is a flexible product for stubbing and mocking web HTTP responses using advanced request matching and response templating. Based on WireMock Java, but extended and different functionality. Full documentation can be found at https://wiremock.org/dotnet/.
|
|
|
SergeyTeplyakov/ErrorProne.NET
Set of roslyn-based analyzers for catching common C# errors (inspired by Google's error-prone)
|
|
|
ManlyMarco/RuntimeUnityEditor
In-game inspector and debugging tools for applications made with Unity3D game engine
|
|
|
TypNull/Tubifarry
Tubifarry is a Lidarr plugin that enhances your music library by fetching music from YouTube, integrating with Slskd for Soulseek access, automating Spotify playlist imports, converting files, and retrieving soundtracks from Radarr and Sonarr.
|
|
|
AgentSmithers/x64DbgMCPServer
x64DbgMCPServer made from c# with Claude, Windsurf and Cursor support
|
|
|
cxfksword/jellyfin-plugin-danmu
jellyfin弹幕自动下载插件
|
|
|
ThePornDatabase/Jellyfin.Plugin.ThePornDB
Jellyfin/Emby Metadata Provider
|
|
|
peterhaneve/ONIMods
Peter Han's mods for Oxygen Not Included
|
|
|
DirtyRacer1337/Jellyfin.Plugin.PhoenixAdult
Jellyfin/Emby Metadata Provider for videos from multiple adult sites
|
|
|
EvanMulawski/FanControl.CorsairLink
The unofficial CorsairLink plugin for Fan Control. Adds support for Corsair controllers, liquid coolers, and power supplies. An alternative to iCUE.
|
|
|
gurrenm3/BTD-Mod-Helper
A powerful and easy to use API for modding BTD6, BATTD, and other Ninja Kiwi games.
|
|
|
Krypton-Suite/Extended-Toolkit
A companion toolkit for the standard toolkit.
|
|
|
RandyKnapp/ValheimMods
|
|
|
replaysMike/AnyDiff
A CSharp (C#) diff library that allows you to diff two objects and get a list of the differences back.
|
|
|
Qiu233/QTRHacker
A powerful hack for Terraria
|
|
|
aedenthorn/ValheimMods
|
| Version | Downloads | Last Updated |
|---|---|---|
| 2.0.48 | 10,208 | 9/23/2026 |
| 2.0.46 | 32,424 | 7/11/2026 |
| 2.0.45 | 39,987 | 5/15/2026 |
| 2.0.44.2 | 37,325 | 3/23/2026 |
| 2.0.44.1 | 113,698 | 11/4/2025 |
| 2.0.44 | 90,275 | 9/29/2025 |
| 2.0.43 | 50,787 | 6/5/2025 |
| 2.0.40 | 31,043 | 2/28/2025 |
| 2.0.37 | 23,871 | 2/10/2025 |
| 2.0.34.2 | 120,131 | 8/17/2024 |
| 2.0.34.1 | 132,495 | 7/15/2024 |
| 2.0.34 | 90,798 | 6/12/2024 |
| 2.0.33 | 13,682 | 5/24/2024 |
| 2.0.32 | 7,316 | 5/7/2024 |
| 2.0.31 | 3,208 | 4/23/2024 |
| 2.0.29 | 7,650 | 4/1/2024 |
| 2.0.26 | 21,957 | 1/11/2024 |
| 2.0.25 | 5,339 | 1/8/2024 |
| 2.0.22 | 1,335 | 1/4/2024 |
| 2.0.18.2 | 553,263 | 11/13/2020 |