Home Dashboard Directory Help

.NET Framework 4.0.2 and Visual Studio Installer Launch condition don't work as excepted by Bob Wu-MT


 as Fixed Help for as Fixed

Sign in
to vote
Type: Bug
ID: 710739
Opened: 12/2/2011 2:09:11 AM
Access Restriction: Public
Moderator Decision: Sent to Engineering Team for consideration
User(s) can reproduce this bug


After Visual Studio Sp1 and .NET Framework 4.0.2 installed, I set setup project’s launch condition to .NET Framework 4.0.2, build the project and then try to install it , it comes an error said, “This setup requires the .NET framework version 4.0. Please install the .NET framework and run this setup again. The .NET Framework can be obtained from the web. Would you like to do this now?”, which I think not works as expected.
Sign in to post a comment.
Posted by Microsoft on 1/11/2012 at 10:21 AM
There are two components to the Platform Update. The first is the design-time update which allows you to select a specific Framework version and/or profile to target. The second is the run-time update which will allow an app built to target the Platform Update to run. http://msdn.microsoft.com/en-us/netframework/hh547167 covers this and from reading your post I think you may already have the right updates installed but wanted to make sure to include the information.

There are two ways to determine if the Platform Update 2 run-time is installed on the target machine: patch detection keys or the target framework moniker (TFM).

Detection keys
- For client: HKLM\SOFTWARE\Microsoft\Updates\Microsoft .NET Framework 4 Client Profile\KB2544514 : ThisVersionInstalled
- For full: HKLMSOFTWARE\Microsoft\Updates\Microsoft .NET Framework 4 Extended\KB2544514 : ThisVersionInstalled

- HKLM\SOFTWARE\Microsoft\.NETFramework\v4.0.30319\SKUs\.NETFramework,Version=v4.0.2,Profile=Client
- HKLM\SOFTWARE\Microsoft\.NETFramework\v4.0.30319\SKUs\.NETFramework,Version=v4.0.2

Hope this helps,
Posted by MS-Moderator07 [Feedback Moderator] on 12/4/2011 at 7:29 PM
Thanks for your feedback.

We are rerouting this issue to the appropriate group within the Visual Studio Product Team for triage and resolution. These specialized experts will follow-up with your issue.
Posted by MS-Moderator01 on 12/2/2011 at 8:42 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)
Posted by Bob Wu-MT on 12/2/2011 at 2:19 AM
I think the reason which causes this issue is that the update of .NET Framework 4.0.2 doesn’t change the the registry (HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Client TargetVersion) to 4.0.2.
If I change it to 4.0.2, the issue gone, but I’m not sure about this.
Sign in to post a workaround.
Posted by Bob Wu-MT on 12/2/2011 at 2:10 AM
We can use the following setup to install the setup project.
First, in your develop environment, install .NET Framework 4.0.2.
Second, set the project’s target framework to .NET Framework 4.0.2(or .NET Framework 4.0.2 client profile) and set the installer launch conditions to .NET Framework 4.0(or .NET Framework 4.0 client profile).
Third, in your server, install .NET Framework 4.0.2 and install the setup (or install setup first and then install .NET Framework 4.0.2).

Best Regards,