Questions tagged [ilmerge]

ILMerge is a utility for merging multiple .NET assemblies into a single .NET assembly. It works on executables and dlls alike. It comes with several options for controlling the processing and format of the output.

353 questions
13
votes
2 answers

Using ILMerge with log4net is causing "inaccessible due to protection level" error

I created a wrapper class for the initialization of my log4net logging objects in order to make it easier to establish custom properties in the ThreadContext. This occurs within a class library that I have established along with many other useful…
NickSuperb
  • 1,174
  • 1
  • 8
  • 28
11
votes
1 answer

How to use ilMerge to merge dll’s into an exe file?

I tried: C:\Windows\System32>ilmerge /target:winexe /out:c:\output.exe c:\MyProgram.exe c:\Microsoft.WindowsAPICodePack.dll But got: 'ilmerge' is not recognized as an internal or external command, operable program or batch file. What am I doing…
Anonymous
  • 123
  • 1
  • 1
  • 4
11
votes
3 answers

Is it possible to only merge a subset of dependencies using ILMerge?

I'm trying something exploratory: Say I have a library "coolproject" and it has dependencies to one.dll, two.dll, and three.dll. I would like to use ILMerge to combine coolproject with one.dll and two.dll but NOT three.dll. At the completion of the…
NickSuperb
  • 1,174
  • 1
  • 8
  • 28
11
votes
1 answer

How do I use ILMerge with .NET 4.5 in AfterBuild?

We want to upgrade our solution with several projects to .NET 4.5. We already use Visual Studio 2012. We use ILMerge to merge the assemblies to a single EXE. Our current .csproj file for the main project look like this:
Christian Fredh
  • 899
  • 3
  • 12
  • 29
11
votes
5 answers

How to compile all files to one exe?

I wrote a project in C# that uses a lot of images, Milk models and openGL and i want to pack everything in one exe so i can upload it to my site. Right now i got an exe that is depended on other files like jpgs etc'. I've tried using ILMerge but…
Segev
  • 19,035
  • 12
  • 80
  • 152
10
votes
5 answers

ILMerge generated assembly doesn't run, although log output reports no errors - why is this?

I'm testing out ILMerge for a new project, and although the .exe file seems to be created correctly, it won't run. I have installed ILMerge via the .msi installer (found here http://www.microsoft.com/download/en/confirmation.aspx?id=17630) and am…
gbro3n
  • 6,729
  • 9
  • 59
  • 100
10
votes
3 answers

Compile a C# project into one dll

I have a base project that feeds two different projects. I want to be able to have the primary project compile all the references into one dll at compile time. This needs to be something that is built into the project build so that Jr developers…
Omnia9
  • 1,563
  • 4
  • 14
  • 39
10
votes
5 answers

Serious trouble with ILMerge and .NET 4.0

For the life of me, I can't seem to get my .NET 4 application merging properly with ILMerge. Even after setting /targetplatform, /lib, /ndebug and adding a custom ILMerge.exe.config file the output file doesn't work properly (it doesn't seem to be…
devios1
  • 36,899
  • 45
  • 162
  • 260
10
votes
3 answers

ILMerge.Merge: ERROR!!: Duplicate type found in assembly

I'll make this as simple as I can, if you need any more info please let me know. I downloaded ILMerge to merge Newtonsoft.Json.dll into my class library. I am invoking ILMerge from the post-build event command line with the…
Dean
  • 4,554
  • 7
  • 34
  • 45
9
votes
1 answer

ILMerge + localized resource assemblies

I'm using ILMerge to create a single assembly application out of a project that contains 1 exe and 2 resource dll's: \bin\Debug\test.exe \bin\Debug\nl-BE\test.resources.dll \bin\Debug\fr-FR\test.resources.dll It's a simple test project with 1 form…
Janiek Buysrogge
  • 1,244
  • 10
  • 15
9
votes
4 answers

Best practices for merging assemblies?

I am wondering what are the heuristics when creating releases of libraries to be included in other projects in relation to dependencies and if I should include them or not. My problem is the following: I have a CommonUtilities library that provides…
Fadeproof
  • 3,038
  • 5
  • 31
  • 42
9
votes
1 answer

Console application no more console after ILMerged

I am using ILMerge to merge the used libraries for a console application. After its merged, the resulting exe just finishes execution in a second and runs in the background(does not show its output for Console.WriteLine). What Can i do to actually…
Akshay J
  • 5,362
  • 13
  • 68
  • 105
8
votes
1 answer

Problems with ILMerge

I am trying to put .dll fles in my .exe file and I am getting this error: ILMerge.exe: The assembly 'Final' has a value for it's PeKind flag 'Ilonly, requires32bits' that is not compatible with 'Ilonly, requires 32 bits,…
8
votes
5 answers

How do I debug into an ILMerged assembly?

Summary I want to alter the build process of a 2-assembly solution, such that a call to ILMerge is invoked, and the build results in a single assembly. Further I would like to be able to debug into the resultant assembly. Preparation - A simple…
Rory Becker
  • 15,551
  • 16
  • 69
  • 94
8
votes
1 answer

Does an ILSplit.exe exist, equivalent to ILMerge.exe, or how could this be made?

Does a utility for splitting a single .NET assembly into a subset of the full assembly exist? I.e. the "functional inverse" of ILMerge.exe? This tool, of course, would be difficult to produce if it had to track dependencies etc. between classes,…
nietras
  • 3,949
  • 1
  • 34
  • 38
1
2
3
23 24