none
Unable to find a version of the runtime to run this application

    Question

  • Hello, this is confusing. My app is targeted to .Net2 version. When someone wants to run it at .Net4 version he gets this message and cannot run it. I have searched this forum and noone has the right answer.

    There were some tips as this one:

    Add to application configuration file theese elements:

    <startup useLegacyV2RuntimeActivationPolicy="true">
    <supportedruntime version="v2.0.50727" sku=".NETFramework,Version=v2.0.50727"/>
    <supportedruntime version="v4.0" sku=".NETFramework,Version=v4.0"/></startup>

    But this is not working. I have this config as embeded resource so I hope it is not caused by that.

     

    Monday, February 06, 2012 2:26 PM

Answers

  • Hi Muffon,

    If your Application is using 4.0 Framework and you want to add framework 2 dll then above code is work.

    if your application is in 2.0 framework and you want to add framework 4 dll then it's not possible.

    if your Applications is built in 2.0 framework then you have to install Framework 2.0

     

    Regards

    Ishan

     

    • Proposed as answer by pvdg42MVP Tuesday, February 07, 2012 4:06 AM
    • Marked as answer by Muffon Saturday, February 11, 2012 10:44 AM
    Monday, February 06, 2012 5:46 PM

All replies

  • Hi Muffon,

    If your Application is using 4.0 Framework and you want to add framework 2 dll then above code is work.

    if your application is in 2.0 framework and you want to add framework 4 dll then it's not possible.

    if your Applications is built in 2.0 framework then you have to install Framework 2.0

     

    Regards

    Ishan

     

    • Proposed as answer by pvdg42MVP Tuesday, February 07, 2012 4:06 AM
    • Marked as answer by Muffon Saturday, February 11, 2012 10:44 AM
    Monday, February 06, 2012 5:46 PM
  • So I am not able to run app targeted to 2.0 on framework v4.0 ? Oh my god.

    Wednesday, February 08, 2012 9:13 AM
  • Hi Fishtraveler,

    Since .NET Framework 4.0 is different from .NET Framework 2.0, you have to debug your application after you change the targeting
    framework.

    I hope this helps.

    Best Regards,


    Alexander Sun [MSFT]
    MSDN Community Support | Feedback to us

    Friday, February 10, 2012 6:49 AM
  • Oh! is diferent, 4.0 from 2.0 but why i can't? is stupid

    I need the 2.0 3.5 and 4.0 versions of .net because anything work well, but with the 4.0 i can't reinstall 2.0 or 3.5, "Setup cannot continue because this version of the .NET Framework is incompatible with a previusly installed one. For more information, see http://support.microsoft.com/support...........

    will microsoft to make possible in FRAMEWORK 5.0 or next 5.01

    Thursday, June 21, 2012 1:30 AM
  • We have a dotnet 2.0 app that - on the 64-bit machines, it won't let us install the 32-bit dotnetfx.exe, and when we install the 64-bit dotnet 2.0, it says it's already installed, but the app will not run, and it says: Unable to find a version of the runtime to run this application. One would think there would be an easy fix for this - a patch I could download and run. I do not have the time to debug this. The app is not tat important and I will just quit using it if there isn' an easy fix.  I hope everyone has a wonderful new year and merry christmas!

    P.S. If you know a quick, easy fix, please post it and I, and many others, will love and appreciate you.

    T I A

    : )

    Friday, December 21, 2012 3:04 PM
  • "Add to application configuration file theese elements:

    <startup useLegacyV2RuntimeActivationPolicy="true">
    < supportedruntime version="v2.0.50727" sku=".NETFramework,Version=v2.0.50727"/>
    < supportedruntime version="v4.0" sku=".NETFramework,Version=v4.0"/></startup>"

    What file - where is this application confiuration file?

    Thanks and warmest regads,

    Flux B. Locker


    • Edited by fluxblocker Friday, December 21, 2012 3:10 PM
    Friday, December 21, 2012 3:09 PM