Additional Steps for enabling re-targeting of Test Projects to .Net Framework 3.5 in VS 2010 SP1 Beta

 

Visual Studio 2010 Service Pack 1 enables basic support for unit
tests that target .Net framework 3.5.  If
the devenv.exe.config file has been modified by the user before applying this
Service Pack, then additional steps are required to enable the feature. (This
can typically happen if you have installed Visual Studio add-ons/plugins that have
modified the devenv.exe.config file. The Service Pack setup does not overwrite
the config file if it has been modified, hence
these additional steps are required)

If the devenv.exe.config file is not updated, the user will
see the following message when attempting to re-target .Net framework for a
Test Project to 3.5 in VS 2010 SP1

 

If the devenv.exe.config file is not updated, the user will
see the following message when opening a Visual Studio 2010 Test Project that
was targeted .Net Framework 3.5 via another installation of Visual Studio 2010
SP1

 

The following are the additional steps that are required to enable re-targeting of Test Projects to .Net Framework 3.5:

1.      
Close all running instances of Visual Studio

2.      
Open Visual Studio Command Prompt as an
Administrator

3.      
cd to  "%programfiles%\Microsoft
Visual Studio 10.0\Common7\IDE" on a 32 bit OS or "%programfiles(x86)%\Microsoft
Visual Studio 10.0\Common7\IDE" on a 64 bit OS

4.      
Open devenv.exe.config file in a text
editor  (e.g. notepad.exe)

5.      
Add the following entries under   <assemblyBinding>
node

 

 

 <dependentAssembly>

        <assemblyIdentity name="Microsoft.VisualStudio.QualityTools.UnitTestFramework" publicKeyToken="b03f5f7f11d50a3a" culture="neutral"/>

        <bindingRedirect oldVersion="10.1.0.0" newVersion="10.0.0.0"/>

        </dependentAssembly>

        <dependentAssembly>

        <assemblyIdentity name="Microsoft.VisualStudio.QualityTools.Tips.UnitTest.Adapter" publicKeyToken="b03f5f7f11d50a3a" culture="neutral"/>

        <bindingRedirect oldVersion="10.1.0.0" newVersion="10.0.0.0"/>

      </dependentAssembly>

      <dependentAssembly>

        <assemblyIdentity name="Microsoft.VisualStudio.QualityTools.Tips.UnitTest.ObjectModel" publicKeyToken="b03f5f7f11d50a3a" culture="neutral"/>

        <bindingRedirect oldVersion="10.1.0.0" newVersion="10.0.0.0"/>

      </dependentAssembly>

      <dependentAssembly>

        <assemblyIdentity name="Microsoft.VisualStudio.QualityTools.Tips.UnitTest.Tip" publicKeyToken="b03f5f7f11d50a3a" culture="neutral"/>

        <bindingRedirect oldVersion="10.1.0.0" newVersion="10.0.0.0"/>

      </dependentAssembly>

   

6.      
Add the following  entry under <configuration> Node

<appSettings>

    <add
key="TestProjectRetargetTo35Allowed" value="true" />

 </appSettings>

7.      
Save the devenv.exe.config file

8.      
Repeat the steps with mstest.exe.config if it
has been modified before applying the Service Pack

9.      
The following is a sample showing how the file
should look after the above updates

 

 

10.  
Restart Visual Studio IDE, re-targeting of .Net
framework for a Test Project to 3.5 should now succeed.