Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to target the .NET 4 Client Profile for C++/CLI under Visual Studio 2010?

Tags:

.net

c++-cli

This article describes selecting it for .NET 3.5 under VS2008.
How does one select the .NET 4.0 Client profile for C++/CLI under VS2010?

like image 716
dlchambers Avatar asked Nov 16 '11 15:11

dlchambers


People also ask

How do I change .NET Framework 4 client Profile If I change it to .NET Framework 4?

NET Framework 4.0. Navigate to the Project toolbar item, and then select Properties (Application properties). In the Application tab, change the Target framework to . NET Framework 4.

What is .NET Framework 4 client Profile?

NET Framework 4 Client Profile is a subset of the . NET Framework 4 that is optimized for client applications. It provides functionality for most client applications, including Windows Presentation Foundation (WPF), Windows Forms, Windows Communication Foundation (WCF), and ClickOnce features.


1 Answers

After experimenting with a C# project, I found that manually adding a TargetFrameworkProfile node to the vcxproj file seems to do the trick.

Procedure:
1) Using a plaintext editor, open the vcxproj
2) Find the PropertyGroup node
3) Find the TargetFrameworkVersion node under PropertyGroup
4) Add a TargetFrameworkProfile node as shown in this snippet:

<PropertyGroup Label="Globals">
   ...
   <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>   
   <TargetFrameworkProfile>Client</TargetFrameworkProfile>
   ...

After saving the vcxproj file and reloading the project inside Visual Studio, open the project's Properties and select Common Properties. The Targeted framwework will now display "Profile=Client" Screenshot showing Client Profile

like image 76
dlchambers Avatar answered Oct 04 '22 03:10

dlchambers