none
.NET 4.0 app calling .NET 2.0 DLL -> can't find a reference RRS feed

  • Question

  • Hi;

    I have a .NET 4.0 app that creates a Form in a .NET 3.5 DLL. The .NET 3.5 Form has a button that uses the HttpUtility class in System.Web. So it needs the .NET 2.0 version of System.Web. This is a reference for the DLL the Form's class is defined in.

    When I click that button I get:

    See the end of this message for details on invoking 
    just-in-time (JIT) debugging instead of this dialog box.
    
    ************** Exception Text **************
    System.TypeInitializationException: The type initializer for 'AutoTagCore.net.windward.autotag.utils.b' threw an exception. ---> System.IO.FileNotFoundException: Could not load file or assembly 'System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified. ---> System.IO.FileNotFoundException: Could not load file or assembly 'System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
       --- End of inner exception stack trace ---
       at AutoTagCore.net.windward.autotag.utils.b.a..ctor(HELP_TOPIC A_0, String A_1, String A_2)
       at AutoTagCore.net.windward.autotag.utils.b..cctor()
       --- End of inner exception stack trace ---
       at AutoTagCore.net.windward.autotag.utils.b.a(Control A_0, HELP_TOPIC A_1)
       at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
       at System.Windows.Forms.Control.WndProc(Message& m)
       at DevExpress.XtraEditors.XtraUserControl.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.261 (RTMGDR.030319-2600)
        CodeBase: file:///C:/Windows/Microsoft.NET/Framework64/v4.0.30319/mscorlib.dll
    ----------------------------------------
    AutoTagLicenseKey
        Assembly Version: 11.1.8.0
        Win32 Version: 11.1.8.0
        CodeBase: file:///C:/Program%20Files%20(x86)/Windward%20Studios/AutoTag/AutoTagLicenseKey.exe
    ----------------------------------------
    AutoTagCore
        Assembly Version: 11.1.8.0
        Win32 Version: 11.1.8.0
        CodeBase: file:///C:/Program%20Files%20(x86)/Windward%20Studios/AutoTag/AutoTagCore.DLL
    ----------------------------------------
    System.Windows.Forms
        Assembly Version: 4.0.0.0
        Win32 Version: 4.0.30319.235 built by: RTMGDR
        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.276 built by: RTMGDR
        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.261 built by: RTMGDR
        CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll
    ----------------------------------------
    DevExpress.Utils.v11.2
        Assembly Version: 11.2.10.0
        Win32 Version: 11.2.10.0
        CodeBase: file:///C:/Windows/assembly/GAC_MSIL/DevExpress.Utils.v11.2/11.2.10.0__b88d1754d700e49a/DevExpress.Utils.v11.2.dll
    ----------------------------------------
    WindwardArrow
        Assembly Version: 11.1.8.0
        Win32 Version: 11.1.8.0
        CodeBase: file:///C:/Program%20Files%20(x86)/Windward%20Studios/AutoTag/WindwardArrow.DLL
    ----------------------------------------
    DevExpress.XtraEditors.v11.2
        Assembly Version: 11.2.10.0
        Win32 Version: 11.2.10.0
        CodeBase: file:///C:/Windows/assembly/GAC_MSIL/DevExpress.XtraEditors.v11.2/11.2.10.0__b88d1754d700e49a/DevExpress.XtraEditors.v11.2.dll
    ----------------------------------------
    DevExpress.Data.v11.2
        Assembly Version: 11.2.10.0
        Win32 Version: 11.2.10.0
        CodeBase: file:///C:/Windows/assembly/GAC_MSIL/DevExpress.Data.v11.2/11.2.10.0__b88d1754d700e49a/DevExpress.Data.v11.2.dll
    ----------------------------------------
    System.Xml
        Assembly Version: 4.0.0.0
        Win32 Version: 4.0.30319.233 built by: RTMGDR
        CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll
    ----------------------------------------
    
    ************** 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.
    
    

    Any idea why I'm getting this?

    thanks - dave


    Who will win The International Collegiate Programming Championships?

    Tuesday, May 1, 2012 4:32 PM

Answers

All replies