Questions tagged [ilrepack]

17 questions
3
votes
0 answers

Tools or techniques for merging multiple DLLs into a single file in .NET 6

I'm currently migrating a project from .NET Framework 4.8 to .NET 6. In the build pipeline the following tools are in use: ILRepack or ILMerge: for merging multiple XML files into one XML Costura.Fody: for merging multiple DLLs into a single…
stgerb
  • 31
  • 5
3
votes
0 answers

Using ilrepack in a .netstandard project to merge all assemblies from a nuget package

I'm building a public nuget package from a .NetStandard project. This project uses a private nuget package (from a private nuget server) targeting .netStandard too. Before switching to .net standard, nuget references were in package.config, and…
Softlion
  • 12,281
  • 11
  • 58
  • 88
2
votes
0 answers

NullableAttribute is declared in another module and needs to be imported - ILRepack

So I'm using ILRepack, which as far as I understand, uses Mono.Cecil behind the scenes, to do ILWeaving. I'm running into a problem in my project, which ends up resulting in the following error as soon as I import, for example, Newtonsoft.Json…
Capsup
  • 87
  • 11
2
votes
0 answers

IL-Repack Dealing with Third Party Dependencies

I had a working IL-Repack post-build task in my project. Recently, I updated a number of libraries and now I have an issue that I cannot figure out. My project uses Newtonsoft.Json and I have updated it to v12. My script is setup to take all dlls…
Luke Bailey
  • 129
  • 1
  • 4
2
votes
0 answers

Type casts no longer work after ILRepack

I am trying to create a single executable from the binaries of a project. This is what I have: A shared library dll, written in F#, I will refer to it by A A library dll, written in C# that implements a module interface (IModule) from A. I will…
Ivaylo Slavov
  • 8,839
  • 12
  • 65
  • 108
1
vote
0 answers

(Re) compiling error after Succeful Build

My current problem is that I want to use ILRepack to merge all my needed "References" into one .exe but it doesn't work as intended. Currently using C# .NET 4.8 in my Project, I have 3 .dlls that I want to merge. The .exe itself works, but IRL does…
Fundryi
  • 11
  • 1
1
vote
1 answer

ILRepack for .Net Core Projects with MSBuild

I want to integrate ILRepack in my MSBuild pipeline for a .Net Core project to merge all required dlls into a single exe/dll. The useful NuGet-Package ILRepack.MSBuild.Task seems well fitted for that, however the example in the GitHub readme does…
Bruno Zell
  • 7,761
  • 5
  • 38
  • 46
1
vote
1 answer

ILRepack (ILRepack.MSBuild.Task) unable to use Internalize when using wildcards

I am doing a proof of concept to understand how ILRepack (ILRepack.MSBuild.Task) works. With this configuration, I am able to create a single merged dll, with ClassLibrary1, AutoMapper and Newtonsoft.Json internalized correctly:
Normand Bedard
  • 2,625
  • 2
  • 19
  • 22
0
votes
1 answer

ILRepack'd DLL has IConfiguration, but that doesn't match Microsoft.Extensions.Configuration IConfiguration?

In one .Net standard project, i have required a constructor to pass in IConfiguration from Microsoft.Extensions.Configuration. This project has then had ILRepack run on it, using the /internalize flag. I then reference the resulting DLL from another…
user3012708
  • 793
  • 1
  • 11
  • 33
0
votes
0 answers

MSBUILD - "error MSB4166: Child node "2" exited prematurely" caught while ILRepacking

Issue Description I have a project without any files - Sample.csproj. The ILRepack step fails with the error message shown in the issue title. Steps to Reproduce Sample.csproj:
0
votes
1 answer

Debug ILRepack merged plugin assembly from Plugin Registration tool

I'm trying to debug plugin assembly that been merged via ILRepack, but Plugin Registration tool's Replay Plug-in Execution throws an error related to System.Text.Json: Unhandled Exception:…
Paulius
  • 43
  • 3
0
votes
0 answers

ILMerge Or ILRepack add assembly reference to dll

I am creating a custom package using a nuspec where i specify a dependency. I am also merging several dlls into one dll. I need to reference an external dll so that the merged dll doesn't include the external dlls. I executed the following…
BrunoMartinsPro
  • 1,646
  • 1
  • 24
  • 48
0
votes
1 answer

ILRepack of .NET 4.7.2 C# console app built with Visual Studio 2017 requires framework installed on Windows 7

I have the following post build event which should pack all the .NET framework dependencies into the .exe: $(SolutionDir)packages\ILRepack.2.0.16\tools\ILRepack.exe /out:"$(TargetDir)$(TargetName).all.exe" "$(TargetDir)$(TargetName).exe"…
0
votes
0 answers

XAMARIN - Mono.Android - Class ref in pre-verified class resolved to unexpected implementation

I've used ILRepack to merge a bunch of DLLs into a final Merged.dll with ILRepack.exe /verbose /out:C:\..\.Merged.dll /wildcards *.dll /lib:C:\.MonoAndroidPath.\v8.1 Some of the merged DLLs use Mono.Android.dll functionality and I do not want to…
Bogdan Daniel
  • 2,689
  • 11
  • 43
  • 76
0
votes
1 answer

Is it possible to not load some NuGet dependencies?

I have merged some .net standard projects dlls into one big dll MergedAssemblies.dll. Now I have a xamarin app which uses MergedAssemblies.dll and also has a reference to Nuget1. Unfortunately Nuget1 has dependencies on its own, and some of those…
Bogdan Daniel
  • 2,689
  • 11
  • 43
  • 76
1
2