locked
Net 4.0 Unable to find a version of the runtime to run this application (Windows 7) RRS feed

  • Question

  • We have a VB .Net application that is targeted to the .Net Framework version 2, over the past couple of days users have been reporting that they are getting the following error message when running the program:

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

    After some investigation it transpired that Windows Update had installed version 4 of the .Net Framework (Client Profile) on their PC's and this had resulted in the error message above.

    The only way we have been able to get around this problem is to create an app.config file that contains the following text:

    <?xml version="1.0"?> 
    <configuration> 
    <startup>
        <supportedRuntime version="v2.0.50727">
        </supportedRuntime>
    </startup>
    </configuration>

    Why do we need to create/issue the app.config file when we have specified the target framework in the Project options within Visual Studio?

    This is obviously a major problem as we now need to issue app.config files to our users to prevent them from getting the above error.

    As an aside I installed .Net 4.0 on an XP system and that did not display the error, our tests and users have only encountered the problem on Windows 7 (although it could affect Vista).
    • Moved by YiChun Chen Monday, June 28, 2010 10:55 AM VB issue (From:.NET Framework Setup)
    Friday, June 25, 2010 2:22 PM

All replies

  • Thanks for posting this, we encountered the same thing with many, many users today.  
    Friday, June 25, 2010 5:29 PM
  • Hi MancSteve,

    This forum is for the support of .NET Framework installation. If you have any concern on installing .NET Framework 4.0 like error messages, I can provide you more useful help here.

    For your concern, I am moving it from Base ".Net Framework Setup" forum to the "Visual Basic General" forum. There are more experts in the "Visual Basic General" forum.

    Thanks!

    Best regards,
    Yichun Chen
    MSDN Subscriber Support in Forum
    If you have any feedback on our support, please contact msdnmg@microsoft.com
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
    Monday, June 28, 2010 10:54 AM
  • Hmm, not sure on that. The problem has nothing to do with the development language (VB, C# etc) its a .Net Framework problem which is why it was added to the .Net framework forum.

     

    I tried posting the above on Microsoft Connect but it wouldnt accept any posts for the .Net Framwork version 4.0.

    Thursday, July 1, 2010 8:30 AM
  • Hello Manc,

    Microsoft Connect site should accept issues and posts regarding to .NET 4.0.

    https://connect.microsoft.com/VisualStudio?wa=wsignin1.0

    Quoted, "Welcome to the Connect site for Visual Studio 2010 and .NET Framework 4, including Microsoft Silverlight."

    Yes, I agree the issue is not VB.NET language related, and it is not .NET Framework setup related either. If you are trying to find a proper forum to discusse this, I think the CLR(common language runtime) forum is the most appropriate, http://social.msdn.microsoft.com/Forums/en-US/clr/threads because the error message indicates CLR cannot find the proper installed 2.0 Framework and load it.

    Best regards,
    Ji Zhou - MSFT
    MSDN Subscriber Support in Forum
    If you have any feedback of our support, please contact msdnmg@microsoft.com.

     


    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Monday, July 5, 2010 3:08 AM
  • I have just installed vb 2010 express on xp and tried to run the program I made on 7 and I get the same error
    Thursday, December 2, 2010 5:04 AM
  • Be aware that the installation of Framework 4 does not contain the installation of framework 2.0 like the installation of framework 3.5 does.

     


    Success
    Cor
    Thursday, December 2, 2010 6:53 AM
  • I'm not sure what a visual basic is, but I am trying to run the automated traffic generator and I have windows xp professional sp3 updated with .net4 and I still get the 'Unable to find a version of the runtime to run this application" error message on my computer, can you tell me in detail what I need to do to get this to work?

    Monday, January 24, 2011 4:36 AM
  • I had the same problem as I said below. But I discovered that I had .NET Framework 4 BETA installed on my testing machine. all I did was download .NET framework 4 and I haven't had a problem since!
    Friday, May 13, 2011 4:25 AM