Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ILMerge hangs on merge

Tags:

.net

ilmerge

I am using ILMerge to combine 9 .NET DLL's written in C# .NET 4. The problem is ILMerge gets stuck, no error message or anything.

The log shows that ILMerge merges all the assemblies correctly, then sets out to write the target assembly. It runs the assembly resolver for a bunch of references and then.. nothing. After successfully resolving System.Configuration the log shows nothing else.

The program continues to use the CPU but I don't see if it's doing anything.

Any one else had a similar experience?

like image 378
prestomanifesto Avatar asked Dec 29 '11 17:12

prestomanifesto


2 Answers

Looks like just writing out the question helped.

Turns out I needed to add /targetplatform:v4 to the command. My guess is it's because some of the assemblies use .NET 4 and some use .NET 2.

like image 188
prestomanifesto Avatar answered Sep 18 '22 15:09

prestomanifesto


I was experiencing problems with ILMerge hanging, but using IL Repack instead with the same arguments seemed to fix the issue for me.

like image 36
Craig Avatar answered Sep 21 '22 15:09

Craig