Click here to Skip to main content
Click here to Skip to main content
Technical Blog

Tagged as

Microsoft.VisualStudio.TestToo...

, 29 Jan 2014 CPOL
Rate this:
Please Sign up or sign in to vote.
Our project was created in Visual Studio 2012 and now we have moved to 2013. The gated check in build kept giving me version errors, even though it built

Originally posted on: http://geekswithblogs.net/Aligned/archive/2014/01/10/microsoft.visualstudio.testtools-versioning-problems.aspx

The Problem

Our project was created in Visual Studio 2012 and now we have moved to 2013. The gated check in build kept giving me version errors, even though it built and ran fine locally and I had referenced version 12 (from version 11).

I tried editing the XML of the project, adding hintpaths, setting the set local to true and setting specific version, but kept getting this error.

Assembly ‘X.UITestFramework, Version=1.0.5122.28413, Culture=neutral, PublicKeyToken=null' uses 'Microsoft.VisualStudio.TestTools.UITesting, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' which has a higher version than referenced assembly 'Microsoft.VisualStudio.TestTools.UITesting, Version=11.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'

I have 2 projects UITestFramework which has helper methods for our Selenium UI tests which is  c# class project and UIAutomation which is a Coded UI test project with the test method.

The Coded UI test has a few interesting lines that the class project does not:

<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
<ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\$(VisualStudioVersion)\UITestExtensionPackages</ReferencePath>
<IsCodedUITest>True</IsCodedUITest>

and at the bottom:

<Import Project="$(VSToolsPath)\TeamTest\Microsoft.TestTools.targets" Condition="Exists('$(VSToolsPath)\TeamTest\Microsoft.TestTools.targets')" />

The Fix

Notice the Version is set to 10.0. I should have changed that number to 12.0. That would be one way to fix it. However, I chose to remove these lines from the project xml and add the dlls manually from add reference from the C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\PublicAssemblies\ folder.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

Aligned
Web Developer
United States United States
No Biography provided

Comments and Discussions

 
-- There are no messages in this forum --
| Advertise | Privacy | Terms of Use | Mobile
Web02 | 2.8.150305.1 | Last Updated 29 Jan 2014
Article Copyright 2014 by Aligned
Everything else Copyright © CodeProject, 1999-2015
Layout: fixed | fluid