本文介绍了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中。

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



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



Microsoft Connect中已创建一个问题:





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

解决方案

如果查看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.

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错误吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-23 15:05