So I while I was enjoying working with the multi-monitor support in Visual Studio 2010 (Great feature!) I decided to have a play with the .NET multi-targeting features of Visual Studio 2010.

I created a Visual Studio 2010 solution in .NET framework 4.0 and then decided to switch the framework version of my projects from .NET 4.0 to .NET 3.5, when I attempted to do this on my test project I got the following error message.


It turns out that in Visual Studio 2010 all Test Projects must target .NET 4.0 and based on some reading I came across, this is in order to allow full utilisation of the new test enhancements in Visual Studio 2010. I also tried creating a .NET 3.5 Test project in Visual Studio 2008 and if you import that into Visual Studio 2010, once you run past the conversion wizard the test project will be upgraded to target .NET 4.0.

It probably doesn’t make that much difference what framework a test project targets but it’s worth being aware that this change takes effect in Visual Studio 2010.

You can find out more about Visual Studio 2010’s Multi-targeting features from Scott Guthrie’s: Visual Studio 2010 Multi-Targeting Support post, and also Jeremy Jameson’s Test Projects in Visual Studio 2010 Must Target .NET Framework 4 post.

Also see this post from the Visual Web Developer Team Blog.