Reputation: 121
I've been trying to use ILMerge to merge assemblies in VS2010 and the resulting primary assembly ends up being unusable. This only seems to occur when the assemblies being merged contain methods with Lambda expressions. Also, it seems to work fine in VS2008.
I've outlined my investigation in more detail here.
Any insight into how to solve this would be greatly appreciated.
Upvotes: 1
Views: 770
Reputation: 942207
There have been recent updates to ILMerge to fix several VS2010 compatibility problems. And there's a new command line option to target .NET 4.0. Download the latest and greatest.
Upvotes: 1
Reputation: 121
Mike Barnett responded via email and informed me the problem might be in my config file somewhere. His suggestion was to use the /targetplatform option:
Ex.
ILMerge.exe /targetplatform:v4,c:\Windows\Microsoft.NET\Framework\v4.0.30319 /out:foo.exe Program.exe MathLib.dll
I added the /targetplatform and path, removed the ILMerge config file and now everything works fine.
Upvotes: 0