本文介绍了调用executor'recutiveor:// mstestadapter / v2'时发生异常:找不到类型为“Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.Execution.UnitTestRunner”的构造函数。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述





我们有TFS 15.105.25910.0和安装了VS2015和VS2017的构建服务器。 



我们用nuget manager将我们的测试项目从1.11升级到1.17。



该项目是在当地建造和测试的,但是构建服务器抛出以下错误:
$


## [错误]错误:调用执行程序'executor:// mstestadapter / v2'时发生异常:类型'上的构造函数'找不到Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.Execution.UnitTestRunner。



似乎应该在构建服务器上安装一些东西来支持1.17测试框架吗? br />


我们现在已经转为1.11并且测试运行良好。

Hi,

We have TFS 15.105.25910.0 and a build server with VS2015 and VS2017 installed. 

We upgraded our test project to Test framework from 1.11 to 1.17 with nuget manager.

The project is built and tested local, but the build server throws the following error:

##[error]Error: An exception occurred while invoking executor 'executor://mstestadapter/v2': Constructor on type 'Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.Execution.UnitTestRunner' not found.

It seems something should be installed on the build server to support 1.17 test framework?

We reversed to 1.11 and test are running fine now.

Repro:

- 使用.net 4.6.1测试项目的visual studio 2017使用测试框架1.11

- visual studio 2017 with .net 4.6.1 test project using test framework 1.11

- 将测试框架升级到1.17

- upgrade test framework to 1.17

- 签入 - >测试将因异常而失败

- check in -> test will fail because of the exception

问候,



Rene

Regards,

Rene




.NET开发人员/架构师

.NET developer / architect

推荐答案

谢谢在这里发布。

您是否在TFS中使用XAML来构建项目?我试图在我的TFS2017和VS2017中重现您的问题,但无法获得与您相同的结果。在构建或测试项目时是否出现此问题?如果使用1.17构建和测试项目,是否会发生这个
问题?更新nuget包后,请重新启动Visual Studio并再次检查结果。似乎其他一些人也会遇到与您相同的问题:

Did you use XAML in TFS to build the project? I tried to reproduce your issue in my TFS2017 and VS2017, but could not get the same result as you. Did this issue occur when you build or test the project? If you build and test the project with 1.17, did this issue happen? After you update the nuget package, please restart the Visual Studio and check the result again. It seems that some other people also get the same issue as you:

请检查以上链接。

最好的问候

Limitxiao Gao

Limitxiao Gao


这篇关于调用executor'recutiveor:// mstestadapter / v2'时发生异常:找不到类型为“Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.Execution.UnitTestRunner”的构造函数。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-18 19:28