2

Closed

ilmerge merge error when i target .net 2

description

I tried merging several .net assemblies with illmergeGui, targetting .net 2, but i get an error. The error is shown below.
  See the end of this message for details on invoking 
    just-in-time (JIT) debugging instead of this dialog box.
    
    ************** Exception Text **************
    System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.ArgumentException: Platform '2.1' not recognized.
       at ILMerging.ILMerge.SetTargetPlatform(String platform, String dir)
       --- End of inner exception stack trace ---
       at System.RuntimeMethodHandle._InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeType typeOwner)
       at System.RuntimeMethodHandle.InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeType typeOwner)
       at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)
       at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
       at System.RuntimeType.InvokeMember(String name, BindingFlags bindingFlags, Binder binder, Object target, Object[] providedArgs, ParameterModifier[] modifiers, CultureInfo culture, String[] namedParams)
       at System.Type.InvokeMember(String name, BindingFlags invokeAttr, Binder binder, Object target, Object[] args)
       at ILMergeGui.DynaInvoke.CallMethod[T](DynaClassInfo ci, String MethodName, Object[] mArgs) in h:\Oghenez\ilmergegui-45fdfe133e3b\ilmergegui_45fdfe133e3b\ILMergeGui\DynaInvoke.cs:line 165
       at ILMergeGui.DynaInvoke.CallMethod[T](String AssemblyName, String ClassName, String MethodName, Object[] mArgs, Object[] cArgs) in h:\Oghenez\ilmergegui-45fdfe133e3b\ilmergegui_45fdfe133e3b\ILMergeGui\DynaInvoke.cs:line 208
       at ILMergeGui.Mainform.btnMerge_Click(Object sender, EventArgs e) in h:\Oghenez\ilmergegui-45fdfe133e3b\ilmergegui_45fdfe133e3b\ILMergeGui\Mainform.cs:line 742
       at System.Windows.Forms.Control.OnClick(EventArgs e)
       at System.Windows.Forms.Button.OnClick(EventArgs e)
       at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
       at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
       at System.Windows.Forms.Control.WndProc(Message& m)
       at System.Windows.Forms.ButtonBase.WndProc(Message& m)
       at System.Windows.Forms.Button.WndProc(Message& m)
       at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
       at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
       at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
    
    
    ************** Loaded Assemblies **************
    mscorlib
        Assembly Version: 4.0.0.0
        Win32 Version: 4.0.30319.1 (RTMRel.030319-0100)
        CodeBase: file:///C:/WINDOWS/Microsoft.NET/Framework/v4.0.30319/mscorlib.dll
    ----------------------------------------
    ILMergeGui
        Assembly Version: 1.0.3.0
        Win32 Version: 1.0.3.0
        CodeBase: file:///D:/Oghenez/ilmergegui-45fdfe133e3b/ilmergegui_45fdfe133e3b/ILMergeGui/bin/Debug/ILMergeGui.exe
    ----------------------------------------
    System.Windows.Forms
        Assembly Version: 4.0.0.0
        Win32 Version: 4.0.30319.1 built by: RTMRel
        CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
    ----------------------------------------
    System.Drawing
        Assembly Version: 4.0.0.0
        Win32 Version: 4.0.30319.1 built by: RTMRel
        CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
    ----------------------------------------
    System
        Assembly Version: 4.0.0.0
        Win32 Version: 4.0.30319.1 built by: RTMRel
        CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll
    ----------------------------------------
    System.Configuration
        Assembly Version: 4.0.0.0
        Win32 Version: 4.0.30319.1 (RTMRel.030319-0100)
        CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Configuration/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
    ----------------------------------------
    System.Xml
        Assembly Version: 4.0.0.0
        Win32 Version: 4.0.30319.1 built by: RTMRel
        CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll
    ----------------------------------------
    ILMerge
        Assembly Version: 2.12.803.0
        Win32 Version: 2.12.803.0
        CodeBase: file:///C:/Program%20Files/Microsoft/ILMerge/ILMerge.exe
    ----------------------------------------
    
    ************** JIT Debugging **************
    To enable just-in-time (JIT) debugging, the .config file for this
    application or computer (machine.config) must have the
    jitDebugging value set in the system.windows.forms section.
    The application must also be compiled with debugging
    enabled.
    
    For example:
    
    <configuration>
        <system.windows.forms jitDebugging="true" />
    </configuration>
    
    When JIT debugging is enabled, any unhandled exception
    will be sent to the JIT debugger registered on the computer
    rather than be handled by this dialog box.
This is a screenshot of my .net framework installation
What could be wrong?

file attachments

Closed Aug 26, 2015 at 2:03 PM by wvd_vegt
Seems to work.

comments

wvd_vegt wrote Aug 7, 2014 at 8:31 AM

Hi

For .net 4.5 I had to change some of the detection code. Normally for .net 2.0 it should not pass 2.1 (as in your bug report) but 2.0.

I'll look into it.

regards
wvdv

oghenez wrote Aug 7, 2014 at 9:56 PM

so what are you suggesting, i should downgrade to .net 2.0, or this has to do with ilmerege?

wvd_vegt wrote Aug 7, 2014 at 10:31 PM

Hi, no downgrade.

It is probably the detection of framework versions that fails, so ilmergegui.

regards
wvdv

wvd_vegt wrote Sep 3, 2014 at 9:30 AM

Hi

Reading the exception log it seems you are running very old version 1.0.3 where the latest version is 2.0.6.
Can you please upgrade?

I checked a .net 2.0 merge and it works as expected.

regards
wvdv