4

I have a native C++ application developed in Visual Studio 2010. There's also a setup project as a part of the solution. When the setup is being build, the warning pops up:

WARNING: 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#).

In (c++ app) properties, there's a field in Common Properties that says:

Targeted framework: .NETFramework, Version=v4.0

which can't be edited.

Now the questions is: Why do I need .NETFramework for C++ application at all???

Aros
  • 157
  • 1
  • 13
  • You don't need .NET for a native C++ app. Perhaps you created your project incorrectly? – john Apr 05 '13 at 11:04
  • Go into the Prerequisites and ensure that the .NET framework checkboxes are un-checked. The Setup project option is pretty flaky, it was removed in VS2012. – Hans Passant Apr 05 '13 at 11:04
  • That's the point - I already tried that. If I remove it from prerequisites, I get 2 warnings instead of one: WARNING: The version of the .NET Framework launch condition '.NET Framework 4 Client Profile' 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. – Aros Apr 06 '13 at 21:13
  • WARNING: 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#). – Aros Apr 06 '13 at 21:13
  • Does anyone know? I would really need to solve this. – Aros Apr 15 '13 at 15:36
  • What if you right click on your setup project and go to view -> launch conditions. Can you then delete the ".NET Framework" launch condition since you don't need it? Or perhaps try some different values like "any"? Just a guess. – Wayne Uroda Aug 09 '13 at 07:05

1 Answers1

0

You can add (using a text editor) <TargetFrameworkVersion>v2.0</TargetFrameworkVersion> to the <PropertyGroup Label="Globals"> section in all of your solution's .vcxproj files, then reload the modified projects. This change causes VS to stop adding the bogus launch condition.

Owen Wengerd
  • 1,628
  • 1
  • 11
  • 11
  • Instead, it gives the error "MSB8009: .NET Framework 2.0/3.0/3.5 target the v90 platform toolset. Please make sure that Visual Studio 2008 is installed on the machine." when building the C++ project. – J S Aug 25 '14 at 02:34
  • 1
    See if using `Native` (instead of ``) works for you. – Owen Wengerd Aug 25 '14 at 04:47