我已将BizTalk UnitTest Project配置为在对TFS的每次检查中都可以运行,但是测试运行因以下错误而失败:
找不到方法:“ Microsoft.VisualStudio.TestTools.TestManagement.ControllerProxy Microsoft.VisualStudio.TestTools.TestManagement.Tmi.GetControllerProxy(Microsoft.VisualStudio.TestTools.Common.TestRunConfiguration,System.Object)”。
错误详情:
C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\MSTest.exe /nologo /usestderr /searchpathroot:"C:\Builds\29\BizTalk\<proj>\Binaries" /resultsfileroot:"C:\Builds\29\BizTalk\<proj>\TestResults" /testcontainer:"C:\Builds\29\BizTalk\<proj>\Sources\BizTalk\<solution>\C<proj>.UnitTest\bin\Release\<proj>.UnitTest.dll" /publish:"<TFS path>" /noprompt /publishbuild:"vstfs:///Build/Build/2592" /teamproject:"BizTalk" /platform:"Any CPU" /flavor:"Release"
Loading C:\Builds\29\BizTalk\<proj>\Sources\BizTalk\<soln >\<proj>.UnitTest\bin\Release\<proj>.UnitTest.dll...
Starting execution...
Microsoft (R) Test Execution Command Line Tool Version 12.0.21005.1
Copyright (c) Microsoft Corporation. All rights reserved.
For switch syntax, type "MSTest /help"
**Method not found: 'Microsoft.VisualStudio.TestTools.TestManagement.ControllerProxy Microsoft.VisualStudio.TestTools.TestManagement.Tmi.GetControllerProxy(Microsoft.VisualStudio.TestTools.Common.TestRunConfiguration, System.Object)'.**
如果在Build Server中并排安装了多个版本的VS,请确保Build Server使用正确版本的MSTest.exe来执行单元测试。
我已通过将BTDF默认生成定义中的MStest.exe的确切路径设置为“运行MSTest活动”的“工具路径属性”来实现此目的。
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句