none
Mixed dll written with .Net 2.0 cannot be loaded in VS 2003 RRS feed

  • Question

  • Hi everybody, 
        
        I am sorry for my poor english.

        I have written an VS addin, this addin was deleveloped with VS2005, and it used managed code (.net 3.0) and unmanaged code (mixed dll). Now, the dll can run in VS6, VS2005, VS2008 correctly, But it cannot run in VS2003.  when VS2003 loaded my dll, it loaded .net 1.1 not .net 3.0, why?  How can I let VS2003 load my dll correctly?
        
        Thanks! Any reply is good!

    Geniussky
    Let's do it
    Friday, December 12, 2008 2:41 AM

Answers

  • You definitely wouldn't want to keep that change, it could be pretty destabilizing.  VS2003 of course has only ever been tested to work using the V1.1 CLR.  If you want to target them all, including VS2002, you'd have to create a .NET 1.0 assembly.
    Hans Passant.
    Friday, December 12, 2008 2:19 PM
    Moderator

All replies

  • Hi everybody,

        After I modified file devenv.exe.config under VS2003, VS2003 can load my dll correctly.

        Old section:
            <startup>
                <supportedRuntime version="v1.1.4322"/>
                <requiredRuntime version="v1.1.4322"/>
            </startup>

        After Modifed:
            <startup>
                <supportedRuntime version="v2.0.50727" safemode="true"/>
                <requiredRuntime version="v1.1.4322"/>
            </startup>

        Or delete the section.

        But I want to know there is other way to do this?

        Thanks.

    Geniussky

            
    Let's do it
    Friday, December 12, 2008 3:46 AM
  • Any process can only load a single CLR Runtime, so all applications that already run the .net 2.0 runtime (3.0/3.5 are just some assembly addons no core functions have been added in those) like vs2005 and vs2008 are fine, processes that didn't load a CLR  Runtime like the VS6 application will load the appropiate runtime on demand when your dll is used. The Vs.Net 2003 application however already has the 1.1 runtime loaded (2003 can't target the 2.0 version) hence it refuses to load the needed 2.0 version, there is nothing you can do about it.


    Friday, December 12, 2008 3:53 AM
  • You definitely wouldn't want to keep that change, it could be pretty destabilizing.  VS2003 of course has only ever been tested to work using the V1.1 CLR.  If you want to target them all, including VS2002, you'd have to create a .NET 1.0 assembly.
    Hans Passant.
    Friday, December 12, 2008 2:19 PM
    Moderator