VS2012无法在* .csproj文件和程序集清单中保持一致的DLL版本,这是VS2012错误吗? [英] VS2012 failed to keep consistent DLL version in *.csproj file and assembly manifest, a VS2012 bug?

查看:124
本文介绍了VS2012无法在* .csproj文件和程序集清单中保持一致的DLL版本,这是VS2012错误吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Win8机器上使用Visual Studio 2012 RTM。 我的VS2012安装在D:分区上。



我正在编写CodedUI测试项目。 该项目最初是用VS2010编写的,我用VS2012对其进行了升级。



我在该项目中引用了11.0版的CodedUITestFramework dll。 p>

在* .csproj文件中,它表示

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

项目成功构建。但是当我使用ILDasm检查程序集DLL时,清单显示如下:

  .assembly extern Microsoft.VisualStudio.QualityTools.CodedUITestFramework 
{
.publickeytoken =(B0 3F 5F 7F 11 D5 0A 3A)//。?_....:
.ver 10:0:0:0< === ===这里应该是11:0:0:0
}

我注意到,尽管测试项目构建成功,但记录了以下错误在Windows Eventlog中。


(vstest.discoveryengine.x86.exe,PID 8056,线程9)枚举程序集时抛出
异常:
Microsoft.VisualStudio.TestTools.Exceptions.EqtDataException:无法
加载测试容器
'e:\test.dll'
或其依赖项之一。错误详细信息:
System.IO.FileNotFoundException:无法加载文件或程序集
'Microsoft.VisualStudio.TestTools.UITest.Extension,版本= 10.0.0.0,
Culture = neutral,PublicKeyToken = b03f5f7f11d50a3a或其
依赖项之一。系统找不到指定的文件。


但是我什至没有安装VS2010,在哪里可以安装10.0。是0.0版本的DLL吗?



如果这是VS2012错误,将会太令人沮丧。



Microsoft Connect中已创建一个问题:



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



任何机构都遇到相同的问题?

解决方案

如果查看UIMap.uitest下的UIMap.Designer.cs,您会发现它是使用10.0。*构建的。

  //- -------------------------------------------------- --------------------------- 
//<自动生成>
//此代码是由编码的UI测试生成器生成的。
//版本:10.0.0.0

...

  [GeneratedCode( Coded UITest Builder, 10.0.40219.1)] 

为您创建的每个用户运行您的codedUI测试构建器,并生成UI动作或替换现有的UI动作。这会自动生成一个具有正确版本的新UIMap.Designer.cs文件。

  // ------ -------------------------------------------------- --------------------- 
//<自动生成>
//此代码是由编码的UI测试生成器生成的。
//版本:11.0.0.0

...

  [GeneratedCode( Coded UITest Builder, 11.0.50727.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 ??

解决方案

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")]

这篇关于VS2012无法在* .csproj文件和程序集清单中保持一致的DLL版本,这是VS2012错误吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆