Home Dashboard Directory Help

Net 4.0 Unable to find a version of the runtime to run this application (Windows 7) by MancSteve


 as Not Reproducible Help for as Not Reproducible

Sign in
to vote
Type: Bug
ID: 573338
Opened: 7/6/2010 5:33:49 AM
Access Restriction: Public
User(s) can reproduce this bug


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"?>
    <supportedRuntime version="v2.0.50727">

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).
Sign in to post a comment.
Posted by Microsoft on 7/29/2010 at 5:16 PM
We were unable to reproduce this behavior when creating an application with VS 2010 targeting .NET 2.0. Please attach the executable created on your machine and we will take a look at the version information in the metadata. Thank you.
Posted by Microsoft on 7/6/2010 at 5:02 PM
Thank you for your feedback, we are currently reviewing the issue you have submitted. If this issue is urgent, please contact support directly(http://support.microsoft.com)
Sign in to post a workaround.