Home Dashboard Directory Help
Search

Unable to change Target Framework version on Unit Test projects by vs2010junkie


Status: 

Closed
 as Won't Fix Help for as Won't Fix


71
0
Sign in
to vote
Type: Bug
ID: 483939
Opened: 8/19/2009 2:30:13 PM
Access Restriction: Public
3
Workaround(s)
view
42
User(s) can reproduce this bug

Description

When attempting to change the Target Framework version for a Unit Test C# project which was upgraded from Visual Studio 2008 SP1, one is unable to downgrade the Target Framework version from v. 4.0 to v. 3.5 despite prompts and re-loads of the IDE.
Details
Sign in to post a comment.
Posted by vs2010junkie on 12/8/2010 at 1:28 PM
Based on this latest blog post, with the release of Visual Studio 2010 SP1, you will now be able to configure Unit Tests to run on at least the .Net 3.5 framework rather than being forced onto .Net 4.0 for Unit Tests:

http://blogs.msdn.com/b/bharry/archive/2010/12/07/vs-tfs-2010-sp1-beta-has-released.aspx
Posted by cking_adify on 9/14/2010 at 7:46 PM
Pathetic.
Posted by robvon on 8/16/2010 at 10:07 PM
Due to the extensive Test environment we have evolved around our .net 2.0 products (compiled with 3.5 but not using 3.5 dll's) it would appear no upgrade to VS2010 will be possible for us. Blessing in disguise maybe?

Thanks to those who have persevered through MS to save us from discovering this the hard way.
Posted by vooose on 8/16/2010 at 8:12 PM
The majority of production projects would be <4.0 and this means any developer using vs2010 will be running their unit tests using the wrong version of the runtime.

Any developer working on a solution (targetting <4.0 and with test cases) where it isnt feasible to migrate to 4.0 immediately they would discover what a pain/liability this is.
Posted by Yann Duran on 8/16/2010 at 5:21 AM
Closed as "won'f fix" - are you kidding me???

You broke something that your customers need to have working & you "won't fix" it?

How hard can it be for the test project to "support" retargetting of the framework?

This sounds suspiciously like an attempt to FORCE people to upgrade before they're ready!

Who makes these decsions???
Posted by Karen Grube on 8/9/2010 at 3:59 PM
Please fix this. I have unit tests that were created in VS 2008 that WILL NOT run in 2010!!! This is totally unacceptable! Honestly, I'm not surprised at anything Microsoft releases that is incomplete or not backwards compatible any longer. I'm speechless at how incredibly stupid this is. Please open this back up until it's actually FIXED!!!!!
Posted by Marty Wamsley on 6/30/2010 at 11:12 PM
We have a .Net 2.0 project that uses a third party .Net 2.0 assembly that requires the J# library (vjslib). Since this is no longer supported in .Net 4.0 we are also dead in the water without this change.
Posted by peterw0317 on 6/2/2010 at 7:32 AM
This is really necessary if you want to test with sp2010 applications, somehow
Posted by sanjay1010 on 2/21/2010 at 8:46 PM
The problem is even more critical. Right now and for forseeable future we will be deploying for .NET 3.5 framework. However we want to take advantage of the VS2010 tools. But no we CANT use VS2010 and all the multi targeting for other projects is USELESS because for example.

The Unit test is is .NET 4 framework and I am debugging ASP/Web Service development server application, if I step in from my Unit test to .NET 3.5 ASP/Web service , VS2010 barfs out, with "Debugging is not enabled". Unless I have .net 4.0 end to end

It is sad to see this issue is marked as "Postponed"
Posted by Richard Guthrie on 1/16/2010 at 4:56 PM
This is truly an unfortunate decision. If not fixed it will definetely delay our decision to upgrade to vs2010 for a very long time. we simply have too little leeway in or dev cycle to do a mass change to our unit test to do a quick conversion and move on.
Posted by Luc Bisson on 12/11/2009 at 9:49 AM
I totaly Aggree with Carol. This feature should be fully functionnal within VS2010 to benfit it's full integration with the IDE
Posted by Carol Roy on 11/25/2009 at 11:29 AM
It's a bad decision. In our case, this will mean having to use NUnit instead of MSTest and loose the integration with TS warehouse.

Please, reconsider this decision.

Carol
Posted by Perica Zivkovic on 11/13/2009 at 8:36 AM
This is another bad decision on VS 2010 road map.

Scenario when you have large teams working on the same solution and they are using different versions of the Visual Studio is doomed to fail !!! Not to mention customers (like us) where we need to "load" unit testing framework in custom third party applications. You can guess three times what happens if that third party application is built with framework 3.5 or lower.... IT WILL NOT WORK BECAUSE YOU CAN NOT LOAD 4.0 ASSEMBLIES IN LOWER VERSION OF THE FRAMEWORK

Please reconsider this... it will hurt your community big time...
Posted by Jonathan Crossland on 11/13/2009 at 3:52 AM
A terrible oversight to let this one slip through the net. I hope this is treated as a priority. :)
Posted by DamReev on 11/6/2009 at 8:27 AM
Is it possible to post a workaround, thanks to this it because very difficult to support the scenario where some people are working in VS2008 and some people in VS2010.
Posted by Microsoft on 8/21/2009 at 11:45 AM
Hi,

Thanks for your feedback. The Test Project does not support retargeting of the .NET framework.

Thanks
Visual Studio Product Team.
Posted by Microsoft on 8/21/2009 at 12:58 AM
Thanks for your feedback. We are routing this bug to the product unit who works on that specific feature area. The team will review this issue and make a decision on whether they will fix it or not for the next release.

Thank you,
Visual Studio Product Team
Sign in to post a workaround.
Posted by VincentH_NET on 4/27/2010 at 4:11 AM
I could not get the above workarounds working.

I tried this with a VS2008, .NET 2 test project that I migrated to VS2010:
- removed the project GUID as described in workaround 2, and
- referenced a copy of Microsoft.VisualStudio.QualityTools.UnitTestFramework.dll v9.0

Ik can now retarget to .NET 2.0 and rebuild, but VS 2010 will not see any tests - so I can't run them.

Has anybody got this working in a VS2010 solution?
Posted by spasecookee on 4/23/2010 at 9:52 AM
1. Unload the test project
2. Edit the xxxx.csproj
3. Remove {3AC096D0-A1C2-E12C-1390-A8335801FDAB}; from ProjectTypeGuids
4. Change the TargetFrameworkVersion to v3.5 (Save)
5. Reload the project
6. Change the reference to Microsoft.VisualStudio.QualityTools.UnitTestFramework.dll as specified in the other workaround.

Note: you can try to re-add the ProjectTypeGuid back, but VS 2010 will convert the project to .Net 4 again when you reload the project in step 4.
Posted by BobBobBob on 2/2/2010 at 2:28 AM
Looks like if you compile against a copy of Microsoft.VisualStudio.QualityTools.UnitTestFramework.dll v9.0 in a lib folder, it works fine with both 2008 and 2010. Maybe that is the way to go.

You still need two sln files though, obv.

same problem here:
https://connect.microsoft.com/VisualStudio/feedback/details/483939/unable-to-change-target-framework-version-on-unit-test-projects