Geeks With Blogs

News Please visit me at my new blog!!

profile for Aligned at Stack Overflow, Q&A for professional and enthusiast programmers
"free in Christ Jesus from the law of sin and death." Romans 8:2 (ESV) Check out the Falling Plates video on YouTube.
more about the Gospel
And then listen to Francis Chan speaking at LifeLight in SD.



Programming and Learning from SD

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.

Posted on Friday, January 10, 2014 10:12 AM | Back to top


Comments on this post: Microsoft.VisualStudio.TestTools versioning problems

# re: Microsoft.VisualStudio.TestTools versioning problems
Requesting Gravatar...
Hi Kevin,

Thanks for this. I faced the same issue with a project file created in 2013. I however did update the VisualStudioVersion variable to 12.0 and still had the same problem on check in. Removing the lines and adding the assemblies manually seems to have fixed it though. thank you
Left by Mark Jones on Apr 26, 2014 3:08 AM

# re: Microsoft.VisualStudio.TestTools versioning problems
Requesting Gravatar...
Thanks for the comment. I'm glad this was helpful!
Left by Kevin on Apr 28, 2014 8:23 AM

Your comment:
 (will show your gravatar)


Copyright © Aligned | Powered by: GeeksWithBlogs.net