Can't change target framework for Test project in VS2010 - by MichaelAird

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 453668 Comments
Status Closed Workarounds
Type Bug Repros 10
Opened 5/19/2009 4:14:14 AM
Access Restriction Public


Changing the Target Framework seems to work but when the project is re-opened it goes back to .Net Framework 4.0
Sign in to post a comment.
Posted by praveenReddy'sServer on 3/7/2011 at 2:00 PM
install VS2010'll fix this problem..
Posted by Blake Theiss on 11/12/2010 at 9:34 AM
Hey Everyone,

I ran into this problem as well. I'm trying to create unit tests for SharePoint 2010 which require 3.5 and 64 bit. I ended up switching back to NUnit to build my unit tests. I created a Blank Test Project and added a reference to SharePoint and NUnit. You can then write your unit tests with TextFixture and Test attributes. You can then use a different test runner to run the tests. I'm using TestDriven.Net.

This may not be the best solution, but at least it works.
Posted by izy100 on 10/25/2010 at 3:45 AM
The workaround does not work and this is a major issue for us.
Please provide another workaround.
Posted by gdandy on 8/10/2010 at 6:17 AM
This is still an issue for us. We have multiple Enterprise applications that uses a third party library. The library is dependent upon Visual J# 2.0 libraries. The Visual J# 2.0 libraries throw errors all over the place when they attempt to run under .NET 4.0. Apparently Visual J# 2.0 is the last release by Microsoft. So basically we are stuck with .NET 3.5 and cannot use VS 2010 because of the Test Project 4.0 dependency. I guess we could use VS 2010 if we wanted to get rid of all our Unit Tests but that wouldn't be good. I'm sure we aren't the only ones running into this type of issue.

Please provide the flexibility of choosing the target framework for Test Projects.

The workaround does not work. After reloading VS prompts to upgrade the project again.
Posted by enriverd on 8/6/2010 at 5:03 AM
The current behaviour makes no sense at all, we need to test our APIs with the FW they are intended to be run. Otherwise we cannot guarantee that they will run properly in the live servers. Is there any plan to release an urgent patch for this?

Posted by ShadoFil on 4/26/2010 at 1:40 AM
I don't understand why we can't keep our existing unit test with the target Framework .NET 3.5 when we upgrade VS2008 to VS2010. The behavior of the existing unit test can't be the same with the Framework .NET 4.0 and we need to use the Framework 3.5 for the tests because we deploy our applications with the Framework .NET 3.5.
Posted by sjj698 on 8/11/2009 at 2:38 AM
Could not get the workaround to work.
The Target Framework just gets changed back.

Any other fixes?
Posted by MichaelAird on 6/17/2009 at 2:17 PM
[quote]This will be addressed in future releases.[/quote]

Does this mean that this will be fixed future betas? or that this won't be fixed in VS2010??!?!?
Posted by Microsoft on 6/16/2009 at 2:49 PM

Thanks for your feedback. This was a conscious decision to not allow multi-targeting. The reasoning comes from the inability to users to run many of the features of unit testing on other frameworks. As a result of this and other factors, multi-targeting for this release is not supported. This will be addressed in future releases.

Visual Studio Product Team.
Posted by Đonny on 5/31/2009 at 2:09 AM
[quote]make a decision on whether they will fix it or not[/quote]
This definitely should be fixed in RTM.
Posted by Microsoft on 5/20/2009 at 2:39 AM
We were able to reproduce the issue you are seeing. We are escalating this issue to the product unit who works on that specific feature area. The product team will review this issue and make a decision on whether they will fix it or not for the next release.