简体   繁体   English

在TFS Build Agent上使用测试代理2017设置netcoreapp2.2测试

[英]Setup netcoreapp2.2 Test with Test Agent 2017 on a TFS Build Agent

I try to get my build working with that uses a "Visual Studio Test" Task to execute tests in a testproject. 我尝试使用“ Visual Studio测试”任务来在testproject中执行测试,以使其与之兼容。

This task executes the following line: 此任务执行以下行:

& "C:\Program Files (x86)\Microsoft Visual Studio\2017\TestAgent\Common7\IDE\CommonExtensions\Microsoft\TestWindow\vstest.console.exe" D:\S\4\s\test\Project.Test\bin\release\netcoreapp2.2\Project.Test.dll /Settings:D:\S\_temp\1b091bf0-fe0a-11e8-996b-6798074e2821.runsettings /EnableCodeCover age /logger:trx "/TestAdapterPath:`"D:\S\4\s`""

The problem is, that if I call this line on my dev machine with VS2017 installed, tests get executed and everything works fine. 问题是,如果我在安装了VS2017的开发机上调用此行,则会执行测试,并且一切正常。 If I call it on the Build server with VS Build Tools 2017 and VS Test Agent 2017 installed, it runs into a timeout and a dotnet.exe process crashes with the following message. 如果在安装了VS Build Tools 2017和VS Test Agent 2017的Build服务器上调用它,它将运行到超时并且dotnet.exe进程崩溃并显示以下消息。

dotnet.exe崩溃消息 _ _

 dotnet test .\test\Project.Test\bin\release\netcoreapp2.2\Project.Test.dll

works well on both machines. 在两台机器上都能很好地工作。

Did I do anything wrong, or is this a Bug? 我做错什么了吗,或者这是一个Bug?

All VS/VSTestAgent/VSBuildTools are of version 15.9.4 and .Net Core 2.2 SDK is installed. 所有VS / VSTestAgent / VSBuildTools的版本均为15.9.4,并已安装.Net Core 2.2 SDK。

如果我在此处添加一个运行设置文件(如mayankbansal018建议的那样) 则一切正常。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM