Not possible to change .NET target for mixed mode projects - by Marius Bancila

Status : 

  By Design<br /><br />
		The product team believes this item works according to its intended design.<br /><br />
		A more detailed explanation for the resolution of this particular item may have been provided in the comments section.

Sign in
to vote
ID 535253 Comments
Status Closed Workarounds
Type Bug Repros 1
Opened 2/22/2010 2:10:53 AM
Access Restriction Public


It is not possible to change the targeted .NET framework for a mixed-mode C++/CLI project. In the Common Properties > Framework and References page there is a static control that shows the target version, which is by default v4.0. It is not possible to change this from this page or other page. The only way to do it is manually changing or adding if missing this entry in the .vcxproj file:

Since multi-targeting for the .NET framework is possible, it should be possible to change it even for mixed-mode projects, otherwise the DLLs version is picked up automatically to version 4.0.

This was possible in Visual Studio 2008!
Sign in to post a comment.
Posted by hooky-mars on 6/17/2010 at 5:38 AM
Oh! I`m sorry!
I added <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
It work!

Posted by hooky-mars on 6/17/2010 at 5:30 AM
I have VS2010 Premium. So, I added "<TargetFrameworkVersion>v3.5</TargetFrarmeworkVersion>" in "<PropertyGroup Label="Globals">" group, but it didn`t help. Now, this project don`t load in VS2010!
I have VS2008 installed on the machine. Platform toolset=v90.
Posted by Marius Bancila on 2/23/2010 at 12:19 PM
I know it is not possible to do it in the IDE, and I know what the workaround is, but this was possible in the previous version, so I don't understand why you removed it. Do you plan to make it available in the next version or with a service pack?
Posted by Microsoft on 2/23/2010 at 9:20 AM
Hi Marius,

Thanks for reporting this issue. Unfortunately in VS2010 release there is no provision in the IDE to modify the target framework version. This however is possible by changing the .vcxproj file. In the following property group in .vcxproj <PropertyGroup Label="Globals"> add the following definition:


This will help you retarget. Also make sure that you have VS2008 installed on the machine on which you are trying to retarget as targeting to a lower framework than v4.0 requires the V90 tools (cl.exe etc).

Amit Mohindra
Visual C++ Team
Posted by Microsoft on 2/22/2010 at 11:14 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.

Thank you
Posted by Microsoft on 2/22/2010 at 7:05 PM
Thank you for your feedback, we are currently reviewing the issue you have submitted. If this issue is urgent, please contact support directly(