Mixed mode assembly is built against 'v2.0.50727' error

If you're running in 64-bit, you may have to add it to the Visual Studio test engine config:

C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\CommonExtensions\Microsoft\TestWindow\vstest.executionengine.exe.config

Add the startup node like so:

<startup useLegacyV2RuntimeActivationPolicy="true">
    <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/>
    <requiredRuntime version="v4.0.20506" />
</startup>

http://support.microsoft.com/kb/2572158

Add the verbiage useLegacyV2RuntimeActivationPolicy="true" below either to either of the following locations:

  1. sgen.exe.config file located at the following location: ..\Program Files\Microsoft SDKs\Windows\v7.0A\bin\NETFX 4.0 Tools\
  2. The applications' app.config file

<startup useLegacyV2RuntimeActivationPolicy="true">

            <supportedRuntime version="v4.0" />

</startup>