ILMerge with .NET 4.0.

If you are getting an “Object reference not set to an instance of an object” when running ILMerge from the command line, ensure that you have quotes around the target platform, like so:
/targetplatform:'v4, C:\Windows\Microsoft.NET\Framework\v4.0.30319',

not

/targetplatform:v4, C:\Windows\Microsoft.NET\Framework\v4.0.30319.

Advertisements
Leave a comment

2 Comments

  1. xeno.by

     /  September 18, 2010

    For me it didn’t do the trick (ilmerge 2.10.0526.0). Then I tried some options, and the following one worked: /targetplatform:v4,C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319 (without quotes and without whitespace between v4 and path to framework.

    Reply
  2. Use double quote mate! Not single quote!

    Reply

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: