Visual Studio 2010 Beta 2 Silently Upgrades MSTest Test Projects to .NET 4.0 - by Chris Marinos

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 514130 Comments
Status Closed Workarounds
Type Bug Repros 13
Opened 11/24/2009 3:49:28 PM
Access Restriction Public


When creating a new MSTest test project in Visual Studio 2010 Beta 2, the project is always created to target .NET 4.0 even 3.5 is the target framework in the "New Project" dialog.

Also, when upgrading existing Visual Studio 2008 MSTest test projects to 2010 Beta 2, these projects are automatically upgraded to target .NET 4.0 without warning.
Sign in to post a comment.
Posted by chass on 4/19/2011 at 1:24 PM
This was fixed in SP1...Thanks for reporting this!
Charles Sterling
Posted by rohancragg on 1/4/2011 at 6:45 AM
It looks like Visual Studio 2010 Service Pack 1 will resolve this once it is released (see the heading 'Better platform support | Unit Testing on .NET 3.5'):

You can get the Beta version with a Go-Live licence now...
Posted by CsharpEnthusiast on 7/18/2010 at 2:02 PM
At issue is that SharePoint does not currently support framework 4.0, Wily Tools does not support framework 4.0 and basically for any large company upgrading framework is a major thing. It's too bad that the super great work done by the rest of the VS2010 team was majorly sullied by the not so smart or even empathetic decision of the TestProject team.
Posted by AF4JM on 6/14/2010 at 2:12 PM
Thanks, Microsoft! It would have been nice to know a year ago that your claims that VS2010 supports multi-targeting were lies shrouded in marketing spin! Giving customers the choice of staying on VS2008 or switching off of MSTest sounds like a lose-lose for Microsoft and their customers. If it was any company other than Microsoft, I would find it hard to believe that the person who suggested this ridiculous "feature" wasn't fired on the spot!
Posted by The_Assimilator on 5/13/2010 at 4:41 AM
Confirming that this issue is present in the RTM version of VS 2010. See also:

Visual Studio Product Team, I suggest you fix this as soon as you are able.
Posted by Hakan Forss on 5/7/2010 at 4:16 AM
This has to be fixed ASAP. What is the point of multitargeting of not all projects are able to run on the same version??
Posted by warrens on 5/1/2010 at 12:34 PM
Nobody's going to be interested in Microsoft's "pain" when it comes to not supporting multi-targeting on test projects.

The stark reality is that this decision effectively rules out upgrading to VS2010 for many shops. A lot of people will be deeply uncomfortable with running their unit tests in a different version of the .NET Framework than they are actually running in their product. As far as testing goes, that's 100% unacceptable.

Don't wait 18 months to address this. Get it fixed now.

Posted by TheRealCoderX on 4/13/2010 at 3:59 PM
This is a huge problem! We have to stay with .NET 3.5 because we use state-machine workflows in WF. And for reasons that still don't make sense to me WF4 dropped state-machine workflows. So our projects which use both s-m WF3.5 and Unit Tests are not upgradeable to VS2010. What is the point of even including multi-targeting in VS2010 if the Unit Tests aren't multi-targetable?!? Sincerely hoping you release a patch for this.
Posted by Microsoft on 11/30/2009 at 11:54 AM
Hi Chris,

In VS 2010, the Test Team has made a painful yet concious decision to not support multi-targeting. As a result, test projects will be upgraded to target .NET 4.0. We have made some, workarounds to allow a VB Test Project that references an MVC code under test to not upgrade, but in general, all others will be retargeted. The VB 3.5 Test Project sill has some limitations and will always run tests in a .NET 4.0 process. Also, you cannot take the tests and run them on a VS 2008 test system.

Visual Studio Product Team.
Posted by Microsoft on 11/25/2009 at 7:58 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