加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > Windows > 正文

TFS 2010构建失败,因为它无法加载Microsoft.VisualStudio.Qualit

发布时间:2020-12-14 01:56:16 所属栏目:Windows 来源:网络整理
导读:我的TFS 2010版本无法解决.单元测试正在通过,没有警告或错误.构建完全运行,从开始到结束,但部分成功.我花了一段时间才发现任何错误 – 我必须下载测试结果,然后点击顶部标有“测试运行错误”的链接.错误是: Error 01/14/2013 1:31:47 AM The diagnostic dat
我的TFS 2010版本无法解决.单元测试正在通过,没有警告或错误.构建完全运行,从开始到结束,但部分成功.我花了一段时间才发现任何错误 – 我必须下载测试结果,然后点击顶部标有“测试运行错误”的链接.错误是:

Error   01/14/2013 1:31:47 AM   The diagnostic data adapter 'Microsoft.VisualStudio.TestTools.CodeCoverage.CoveragePlugIn,Microsoft.VisualStudio.QualityTools.Plugins.CodeCoverage,Version=11.0.0.0,Culture=neutral,PublicKeyToken=b03f5f7f11d50a3a' on agent 'BuildServer3' threw an exception during type loading,construction,or initialization: System.IO.FileLoadException: Could not load file or assembly 'Microsoft.VisualStudio.QualityTools.Plugins.CodeCoverage,PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
File name: 'Microsoft.VisualStudio.QualityTools.Plugins.CodeCoverage,PublicKeyToken=b03f5f7f11d50a3a'
   at System.RuntimeTypeHandle.GetTypeByName(String name,Boolean throwOnError,Boolean ignoreCase,Boolean reflectionOnly,StackCrawlMarkHandle stackMark,Boolean loadTypeFromPartialName,ObjectHandleOnStack type)
   at System.RuntimeTypeHandle.GetTypeByName(String name,StackCrawlMark& stackMark,Boolean loadTypeFromPartialName)
   at System.RuntimeType.GetType(String typeName,StackCrawlMark& stackMark)
   at System.Type.GetType(String typeName,Boolean throwOnError)
   at Microsoft.VisualStudio.TestTools.DataCollection.ExecutionPluginManager.LoadAndInitDataCollectorAsync(TestRun testRun,String collectorTypeName,Dictionary`2 dataCollectorCache)

这是来自Visual Studio 2012解决方案,构建服务器运行Visual Studio 2010 …所以我猜这就是它失败的原因.

解决方法

我解决了这个问题.

我创建了一个CodeCoverage.testsettings文件来测量构建期间的代码覆盖率…但是我在Visual Studio 2012中创建了该文件.我使用我最喜欢的文本编辑器在文件中找到了这个条目:

<DataCollector uri="datacollector://microsoft/CodeCoverage/1.0" assemblyQualifiedName="Microsoft.VisualStudio.TestTools.CodeCoverage.CoveragePlugIn,PublicKeyToken=b03f5f7f11d50a3a" friendlyName="Code Coverage (Visual Studio 2010)">

我在那里看到了一个11.0.0.0版本(必须由Visual Studio 2012生成).我只是使用我的文本编辑器将其更改为10.0.0.0:

<DataCollector uri="datacollector://microsoft/CodeCoverage/1.0" assemblyQualifiedName="Microsoft.VisualStudio.TestTools.CodeCoverage.CoveragePlugIn,Version=10.0.0.0,PublicKeyToken=b03f5f7f11d50a3a" friendlyName="Code Coverage (Visual Studio 2010)">

构建现在按预期工作.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读