none
>net 2.0 application crashes due to framework 4 RRS feed

  • Question

  • Hi

    I have a legacy code that uses c++, com & .net 2. after installing Framework 4 & Vs2010, I can no longer lunch my application- the startup fails. I debugged the startup (running it in debug from VS2008), and in the output window I see that :

     Loaded 'C:\Windows\winsxs\x86_microsoft.vc90.debugcrt_1fc8b3b9a1e18e3b_9.0.30729.4148_none_2a4cbfc25558bcd3\msvcm90d.dll', Symbols loaded.
     Loaded 'C:\Windows\Microsoft.NET\Framework\v4.0.30319\mscoreei.dll'
     Loaded 'C:\Windows\Microsoft.NET\Framework\v2.0.50727\mscorwks.dll'

    i.e. framwork 2 dlls were loaded along with some framework 4!.

    If I rename the folder C:\Windows\Microsoft.NET\Framework\v4.0.30319 to soemthing else, then there is no crash - but of course this is not a good solution, Yet it points out that the problem is due to this mix.

    trying to play with the config file supportedRuntime/requiredRuntime doesn't solve the crash.

    Thursday, July 12, 2012 1:27 PM

Answers

  • Issue solved!

    I fixed it by addding app.config :

    <?xml version ="1.0"?>
    <configuration>
       <startup useLegacyV2RuntimeActivationPolicy="true">
         <supportedRuntime version="v4.0.30319" />
       </startup>
    </configuration>

    Thanks.

    Saturday, July 14, 2012 9:59 PM

All replies

  • Hi Ofenohy,

    Welcome to the MSDN Forum.

    This a quick note to let you know we are perform research on this issue. And we will update this thread as soon as possible when we get any update.

    Thank you for your patience.

    Best regards,


    Mike Feng
    MSDN Community Support | Feedback to us
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Friday, July 13, 2012 7:56 AM
    Moderator
  • Issue solved!

    I fixed it by addding app.config :

    <?xml version ="1.0"?>
    <configuration>
       <startup useLegacyV2RuntimeActivationPolicy="true">
         <supportedRuntime version="v4.0.30319" />
       </startup>
    </configuration>

    Thanks.

    Saturday, July 14, 2012 9:59 PM