How to solve “The version of the .NET Framework launch condition ‘.NET Framework 4’ does not match…” warning in Microsoft Visual Studio

When you build the setup project in Microsoft Visual Studio 2010 you receive the following warning message:

The version of the .NET Framework launch condition ‘.NET Framework 4’ does not match the selected .NET Framework bootstrapper package. Update the .NET Framework launch condition to match the version of the .NET Framework selected in the Prerequisites Dialog Box.

Cause:

When you add a Setup project to your solution Microsoft Visual Studio 2010 sets two default values that usually don’t match the project settings: prerequisites and launch condition.

These are both set to “.NET Framework 4 Client Profile” and if you set your project’s target framework to “.NET Framework 4” you get the warning message above.

(See the How to solve “The target version of the .NET Framework in the project does not match…” warning message in Microsoft Visual Studio post to handle the problem with the incorrect launch conditions.)

Solution:

Set the prerequisites to “.NET Framework 4”

VS Prerequisites Setup

  1. Right click the Setup project,
  2. Select “Properties”,
  3. Select the “Release” configuration,
  4. Click the “Prerequisites…” button,
  5. Check “.NET Framework 4 (x86 and x64)”,
  6. Uncheck “.NET Framework 4 Client Profile (x86 and x64)”,
  7. Click OK,
  8. Select the “Debug” configuration,
  9. Repeat steps 4 – 7.

2 thoughts on “How to solve “The version of the .NET Framework launch condition ‘.NET Framework 4’ does not match…” warning in Microsoft Visual Studio

  1. Does not work same error occurs
    Warning 2 The target version of the .NET Framework in the project does not match the .NET Framework launch condition version ‘.NET Framework 4 Client Profile’. Update the version of the .NET Framework launch condition to match the target version of the.NET Framework in the Advanced Compile Options Dialog Box (VB) or the Application Page (C#, F#).

Leave a Reply