1

I am using Visual Studio 2012 RTM on a Win8 box. My VS2012 installs on D: partition.

I am writing a CodedUI test project. This project was originally written with VS2010 and I upgraded it with VS2012.

I referernce the CodedUITestFramework dll of version 11.0 in the project.

And in the *.csproj file, it says

 <Reference Include="Microsoft.VisualStudio.QualityTools.CodedUITestFramework,
 Version=11.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a,
 processorArchitecture=MSIL" />

The project built successfully. But when I use ILDasm to check the assembly DLL, the manifest shows this:

.assembly extern Microsoft.VisualStudio.QualityTools.CodedUITestFramework
{
  .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A )                         // .?_....:
  .ver 10:0:0:0    <======Should be 11:0:0:0 here!!
}

And I noticed that although the test project build successfully, the following error is logged in Windows Eventlog.

(vstest.discoveryengine.x86.exe, PID 8056, Thread 9) Exception thrown when enumerating assembly: Microsoft.VisualStudio.TestTools.Exceptions.EqtDataException: Unable to load the test container 'e:\test.dll' or one of its dependencies. Error details: System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.VisualStudio.TestTools.UITest.Extension, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.

But I don't even have VS2010 installed, where could I have 10.0.0.0 version DLLs?

It will be too depressing if this is a VS2012 bug. It's driving me crazy.

An issue has been created in Microsoft Connect:

https://connect.microsoft.com/VisualStudio/feedback/details/758629/add-dll-reference-bugs-in-visual-studio-2012-version-11-0-50727-1-rtmrel

Any body meet the same issue ??

5
  • "But I don't even have VS2010 installed, where could I have 10.0.0.0 version DLLs?" You said the project was originally built with VS2010, so naturally it would have had 10.0.0.0 dependencies at a certain point in time.
    – BoltClock
    Aug 18, 2012 at 16:08
  • I created this project with VS2010 on another box. This box only has VS2012 installed. And I just find the "Copy Local" property doesn't work, either. While it works for another project in the same solution. Aug 18, 2012 at 16:34
  • Do you still have VS2010 agents installed? I also had the issue of 'Copy Local' not working. I was attempting to Copy Local the Coded UI test DLL's (the Microsoft.VisualStudio ones) but it didn't seem to work. I also had difficulty in getting my new VS2012 solution to build on my build machine (by MSBuild.exe). When I open the solution in VS2010, I see that it automatically changes the DLL references to the VS2010 versions (of the Coded UI test tool DLL's) Aug 28, 2012 at 18:18
  • 1
    I am having the similar problem, it almost seems like Visual Studio is retaining old DLL's somewhere, and when I deploy I am left with an old version of a DLL. This problem is happening for me inside the InstallShield Deploy Package.
    – Dane Balia
    Sep 11, 2012 at 13:44
  • @Dane Balia, could you goto my connect.microsoft url and submit your symptom, too? It seems MS guys are quite difficult to persuade. Sep 12, 2012 at 8:57

4 Answers 4

2

If you look into the UIMap.Designer.cs under UIMap.uitest you will notice it was built with 10.0.*.

// ------------------------------------------------------------------------------
//  <auto-generated>
//      This code was generated by coded UI test builder.
//      Version: 10.0.0.0

...

[GeneratedCode("Coded UITest Builder", "10.0.40219.1")]

Run your codedUI test builder for each uitest you created and generate a UI Action or replace an existing one. This will auto generate a new UIMap.Designer.cs file with the correct version.

// ------------------------------------------------------------------------------
//  <auto-generated>
//      This code was generated by coded UI test builder.
//      Version: 11.0.0.0

...

[GeneratedCode("Coded UITest Builder", "11.0.50727.1")]
0

One reason you might encounter the above error is because you might have named the folder which contains all the files of your automation project with space in between. Suppose you have named the folder as "Test User". In this case you will get the above error. Solution to this is that you move these folders by changing the Local path in VSTS by File -> Source Control -> Workspaces, then select your workspace (it should match your computer name) and click Edit. Create a new folder(Without Space in the folder name) in your machine and map it here.

0

Alex's solution is wrong,

Simply solution is replacing old refence with current version's dll

0

The reason for the Issue is the Microsoft.Services.TestTools.UITesting.Html.dll from CodeFirst has its dependencies based on VS 2010.

Downloading the source code from CodePlex and migrating to VS 2012 and getting the latest Microsoft.Services.TestTools.UITesting.Html.dll resolves the issue and it had worked.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.