Can you point me in the direction of the assembly?

In VS 2017 (15.4.2) When opening unittest files form previous version of VS, you can end up getting an error where it is unable to find the assembly in its correct version:
Could not load file or assembly ‘Microsoft.VisualStudio.QualityTools.Tips.UnitTest.ObjectModel, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a’ or one of its dependencies. The located assembly’s manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

It seems that MS has made an mistake in their redirection of the assemblies.

It is possible to redirect assembly calls to previous version to use the latest version.
This can be done on app or machine level.
To learn more on this general topic see this link: Redirecting Assembly Versions

So to fix the error in VS 2017. Go to C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\ (default location)
and find the file devenv.exe.config
Change from:

<dependentAssembly>
          <assemblyIdentity name="Microsoft.VisualStudio.QualityTools.Tips.UnitTest.ObjectModel" publicKeyToken="b03f5f7f11d50a3a" culture="neutral"/>
          <bindingRedirect oldVersion="11.0.0.0-11.1.0.0" newVersion="15.0.0.0"/>
</dependentAssembly>

To

<dependentAssembly>
          <assemblyIdentity name="Microsoft.VisualStudio.QualityTools.Tips.UnitTest.ObjectModel" publicKeyToken="b03f5f7f11d50a3a" culture="neutral"/>
          <bindingRedirect oldVersion="11.0.0.0-14.1.0.0" newVersion="15.0.0.0"/>
</dependentAssembly>

 

Author: KimC

TFS admin and deployment fellow

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s