VSTS 没有可用的测试

Pet*_*kem 3 automated-tests unit-testing azure-devops azure-pipelines

我是第一次使用 Visual Studio Team Services,并使用 MSTest 项目设置 C# 类库的简单场景。我想设置自动构建,它也执行测试。然而这不起作用。我对此进行了很多搜索,大多数问题似乎与 NUnit 等不同的测试适配器有关。这里的情况并非如此,因为我只是使用默认的测试框架。

谁能帮助我并让我知道我错过了什么步骤或做错了什么?

唯一的消息是“警告:没有可用的测试......”,其中包含大量引用的 dll。


这是完整的日志:

2017-11-20T08:43:16.5294822Z ##[节]开始:VsTest - testAssemblies 2017-11-20T08:43:16.5294822Z ==================== =================================================== ======== 2017-11-20T08:43:16.5294822Z 任务:Visual Studio 测试 2017-11-20T08:43:16.5294822Z 描述:使用 Visual Studio 测试运行程序运行测试 2017-11-20T08:43: 16.5294822Z 版本:2.2.3 2017-11-20T08:43:16.5294822Z 作者:微软公司 2017-11-20T08:43:16.5294822Z 帮助:更多信息 2017-11-20T08:43:16.5294822Z ============================================ ======================================== 2017-11-20T08:43:17.5500059Z 运行使用 vstest.console.exe 进行本地测试 2017-11-20T08:43:17.5500059Z ================================== ======================== 2017-11-20T08:43:17.5520059Z 测试选择器:测试组件 2017-11-20T08:43:17.5520059Z 测试程序集: **\*test*.dll,!**\obj\** 2017-11-20T08:43:17.5520059Z 测试筛选条件:空 2017-11-20T08:43:17.5530063Z 搜索文件夹:d:\ a\1\s 2017-11-20T08:43:17.5540068Z 运行设置文件: d:\a\1\s 2017-11-20T08:43:17.5540068Z 并行运行: false 2017-11-20T08:43: 17.5540068Z 隔离运行: false 2017-11-20T08:43:17.5592822Z 自定义适配器的路径: d:\a\1\s 2017-11-20T08:43:17.5592822Z 其他控制台选项: null 2017-11-20T08 :43:17.5600072Z 启用代码覆盖率: false 2017-11-20T08:43:17.5610070Z 选择用于测试执行的 VisualStudio 版本:最新 2017-11-20T08:43:17.9153146Z ============ ============================================== 2017-11-20T08: 43:18.1313359Z [命令]“C:\ Program Files(x86)\ Microsoft Visual Studio \ 2017 \ Enterprise \ Common7 \ IDE \ CommonExtensions \ Microsoft \ TestWindow \ vstest.console.exe”@d:\ a_temp \ dafe1090-cdce -11e7-9191-978614a9beba.txt 2017-11-20T08:43:18.3163422Z Microsoft (R) 测试执行命令行工具版本 15.0.26929.2 2017-11-20T08:43:18.3163422Z 版权所有 (c) Microsoft Corporation。版权所有。2017-11-20T08:43:18.3173423Z 2017-11-20T08:43:18.3173423Z vstest.console.exe 2017-11-20T08:43:18.3173423Z“d:\ a \ 1 \ s \ ConsoleApp1 \ CommonTestDotNetCore \ bin \Release\netcoreapp2.0\Common_Core.test.dll" 2017-11-20T08:43:18.3173423Z"d:\a\1\s\ConsoleApp1\CommonTestDotNetCore\bin\Release\netcoreapp2.0\Microsoft.VisualStudio.TestPlatform .MSTest.TestAdapter.dll“2017-11-20T08:43:18.3173423Z”d:\ a \ 1 \ s \ ConsoleApp1 \ CommonTestDotNetCore \ bin \ Release \ netcoreapp2.0 \ Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.Interface .dll”2017-11-20T08:43:18.3173423Z“d:\ a \ 1 \ s \ ConsoleApp1 \ CommonTestDotNetCore \ bin \ Release \ netcoreapp2.0 \ Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.dll”2017-11 -20T08:43:18.3173423Z“d:\ a \ 1 \ s \ TestSolution \ LibraryTests \ bin \ Release \ LibraryTests.dll”2017-11-20T08:43:18.3173423Z“d:\ a \ 1 \ s \ TestSolution \LibraryTests\bin\Release\Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.dll" 2017-11-20T08:43:18.3173423Z"d:\a\1\s\TestSolution\LibraryTests\bin\Release\Microsoft.VisualStudio .TestPlatform.MSTestAdapter.PlatformServices.Interface.dll“2017-11-20T08:43:18.3173423Z”d:\ a \ 1 \ s \ TestSolution \ LibraryTests \ bin \ Release \ Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.dll ” 2017-11-20T08:43:18.3173423Z “d:\a\1\s\TestSolution\LibraryTests\bin\Release\Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions.dll” 2017-11-20T08:43:18.3173423 Z”d:警告:没有可用的测试d:\a\1\s\TestSolution\packages\MSTest.TestAdapter.1.1.18\build_common\tr\Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.resources.dll d:\a\1\s\TestSolution\packages \MSTest.TestAdapter.1.1.18\build_common\tr\Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.resources.dll d:\a\1\s\TestSolution\packages\MSTest.TestAdapter.1.1.18\build_common\ru \Microsoft.VisualStudio.TestPlatform.TestFramework.resources.dll d:\a\1\s\TestSolution\packages\MSTest.TestAdapter.1.1.18\build_common\ru\Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.resources.dll d:\a\1\s\TestSolution\packages\MSTest.TestAdapter.1.1.18\build_common\ru\Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.resources.dll d:\a\1\s\TestSolution\packages \MSTest.TestAdapter.1.1.18\build_common\pt\Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.resources.dll d:\a\1\s\TestSolution\packages\MSTest.TestAdapter.1.1.18\build_common\pt \Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.resources.dll d:\a\1\s\TestSolution\packages\MSTest.TestAdapter.1.1.18\build_common\tr\Microsoft.VisualStudio.TestPlatform.TestFramework.resources.dll d:\a\1\s\TestSolution\packages\MSTest.TestAdapter.1.1.18\build_common\pl\Microsoft.VisualStudio.TestPlatform.TestFramework.resources.dll d:\a\1\s\TestSolution\packages\MSTest .TestAdapter.1.1.18\build_common\pl\Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.resources.dll d:\a\1\s\TestSolution\packages\MSTest.TestAdapter.1.1.18\build_common\pl\Microsoft .VisualStudio.TestPlatform.MSTest.TestAdapter.resources.dll d:\a\1\s\TestSolution\packages\MSTest.TestAdapter.1.1.18\build_common\pt\Microsoft.VisualStudio.TestPlatform.TestFramework.resources.dll d: \a\1\s\TestSolution\packages\MSTest.TestAdapter.1.1.18\build_common\zh-Hans\Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.resources.dll d:\a\1\s\TestSolution\packages \MSTest.TestAdapter.1.1.18\build_common\zh-Hans\Microsoft.VisualStudio.TestPlatform.TestFramework.resources.dll d:\a\1\s\TestSolution\packages\MSTest.TestAdapter.1.1.18\build_common\ko \Microsoft.VisualStudio.TestPlatform.TestFramework.resources.dll d:\a\1\s\TestSolution\packages\MSTest.TestAdapter.1.1.18\build_common\zh-Hant\Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.resources .dll d:\a\1\s\TestSolution\packages\MSTest.TestAdapter.1.1.18\build_common\zh-Hant\Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.resources.dll d:\a\1\s \TestSolution\packages\MSTest.TestAdapter.1.1.18\build_common\zh-Hant\Microsoft.VisualStudio.TestPlatform.TestFramework.resources.dll d:\a\1\s\TestSolution\packages\MSTest.TestAdapter.1.1.18 \build\netcoreapp1.0\Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.dll d:\a\1\s\TestSolution\packages\MSTest.TestAdapter.1.1.18\build\uap10.0\Microsoft.VisualStudio.TestPlatform .MSTestAdapter.PlatformServices.dll d:\a\1\s\TestSolution\packages\MSTest.TestFramework.1.1.18\lib\net45\Microsoft.VisualStudio。TestPlatform.TestFramework.dll d:\a\1\s\TestSolution\packages\MSTest.TestFramework.1.1.18\lib\netstandard1.0\Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions.dll d:\a\1\ s\TestSolution\packages\MSTest.TestFramework.1.1.18\lib\netstandard1.0\Microsoft.VisualStudio.TestPlatform.TestFramework.dll d:\a\1\s\TestSolution\packages\MSTest.TestFramework.1.1.18\ lib\uap10.0\Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions.dll d:\a\1\s\TestSolution\packages\MSTest.TestFramework.1.1.18\lib\uap10.0\Microsoft.VisualStudio.TestPlatform。 TestFramework.dll d:\a\1\s\TestSolution\packages\MSTest.TestAdapter.1.1.18\build_common\zh-Hans\Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.resources.dll d:\a\1\ s\ConsoleApp1\CommonTestDotNetCore\bin\Release\netcoreapp2.0\Common_Core.test.dll d:\a\1\s\TestSolution\packages\MSTest.TestAdapter.1.1.18\build_common\ko\Microsoft.VisualStudio.TestPlatform。 MSTestAdapter.PlatformServices.resources.dll d:\a\1\s\TestSolution\packages\MSTest.TestAdapter.1.1.18\build_common\ja\Microsoft.VisualStudio.TestPlatform.TestFramework.resources.dll d:\a\1\ s\ConsoleApp1\CommonTestDotNetCore\bin\Release\netcoreapp2.0\Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.dll d:\a\1\s\ConsoleApp1\CommonTestDotNetCore\bin\Release\netcoreapp2.0\Microsoft.VisualStudio。 TestPlatform.MSTestAdapter.PlatformServices.Interface.dll d:\a\1\s\ConsoleApp1\CommonTestDotNetCore\bin\Release\netcoreapp2.0\Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.dll d:\a\1\s\ TestSolution\LibraryTests\bin\Release\Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.dll d:\a\1\s\TestSolution\LibraryTests\bin\Release\Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.Interface.dll d :\a\1\s\TestSolution\LibraryTests\bin\Release\Microsoft.VisualStudio.TestPlatform.TestFramework.dll d:\a\1\s\TestSolution\packages\MSTest.TestAdapter.1.1.18\build_common\Microsoft。 VisualStudio.TestPlatform.MSTest.TestAdapter.dll d:\a\1\s\TestSolution\packages\MSTest.TestAdapter.1.1.18\build_common\Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.Interface.dll d:\a\ 1\s\TestSolution\packages\MSTest.TestAdapter.1.1.18\build_common\Microsoft.VisualStudio.TestPlatform.TestFramework.dll d:\a\1\s\TestSolution\packages\MSTest.TestAdapter.1.1.18\build_common\ cs\Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.resources.dll d:\a\1\s\TestSolution\packages\MSTest.TestAdapter.1.1.18\build_common\ko\Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter。 resources.dll d:\a\1\s\TestSolution\packages\MSTest.TestAdapter.1.1.18\build_common\cs\Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.resources.dll d:\a\1\s\ TestSolution\packages\MSTest.TestAdapter.1.1.18\build_common\de\Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.resources.dll d:\a\1\s\TestSolution\packages\MSTest.TestAdapter.1.1.18\ build_common\ja\Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.resources.dll d:\a\1\s\TestSolution\packages\MSTest.TestAdapter.1.1.18\build_common\ja\Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.resources.dll d:\a\1\s\TestSolution\packages\MSTest .TestAdapter.1.1.18\build_common\it\Microsoft.VisualStudio.TestPlatform.TestFramework.resources.dll d:\a\1\s\TestSolution\packages\MSTest.TestAdapter.1.1.18\build_common\it\Microsoft.VisualStudio .TestPlatform.MSTestAdapter.PlatformServices.resources.dll d:\a\1\s\TestSolution\packages\MSTest.TestAdapter.1.1.18\build_common\it\Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.resources.dll d: \a\1\s\TestSolution\packages\MSTest.TestAdapter.1.1.18\build_common\cs\Microsoft.VisualStudio.TestPlatform.TestFramework.resources.dll d:\a\1\s\TestSolution\packages\MSTest.TestAdapter .1.1.18\build_common\fr\Microsoft.VisualStudio.TestPlatform.TestFramework.resources.dll d:\a\1\s\TestSolution\packages\MSTest.TestAdapter.1.1.18\build_common\fr\Microsoft.VisualStudio.TestPlatform .MSTest.TestAdapter.resources.dll d:\a\1\s\TestSolution\packages\MSTest.TestAdapter.1.1.18\build_common\es\Microsoft.VisualStudio.TestPlatform.TestFramework.resources.dll d:\a\1 \s\TestSolution\packages\MSTest.TestAdapter.1.1.18\build_common\es\Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.resources.dll d:\a\1\s\TestSolution\packages\MSTest.TestAdapter.1.1 .18\build_common\es\Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.resources.dll d:\a\1\s\TestSolution\packages\MSTest.TestAdapter.1.1.18\build_common\de\Microsoft.VisualStudio.TestPlatform .TestFramework.resources.dll d:\a\1\s\TestSolution\packages\MSTest.TestAdapter.1.1.18\build_common\de\Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.resources.dll d:\a\1 \s\TestSolution\packages\MSTest.TestAdapter.1.1.18\build_common\fr\Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.resources.dll d:\a\1\s\TestSolution\packages\MSTest.TestFramework.1.1 .18\lib\net45\Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions.dll d:\a\1\s\TestSolution\LibraryTests\bin\Release\Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.dll d:\a \1\s\TestSolution\LibraryTests\bin\Release\Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions.dll d:\a\1\s\TestSolution\packages\MSTest.TestAdapter.1.1.18\build_common\Microsoft.VisualStudio .TestPlatform.MSTestAdapter.PlatformServices.dll d:\a\1\s\TestSolution\LibraryTests\bin\Release\LibraryTests.dll。resources.dll d:\a\1\s\TestSolution\packages\MSTest.TestAdapter.1.1.18\build_common\cs\Microsoft.VisualStudio.TestPlatform.TestFramework.resources.dll d:\a\1\s\TestSolution\包\MSTest.TestAdapter.1.1.18\build_common\fr\Microsoft.VisualStudio.TestPlatform.TestFramework.resources.dll d:\a\1\s\TestSolution\packages\MSTest.TestAdapter.1.1.18\build_common\fr\ Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.resources.dll d:\a\1\s\TestSolution\packages\MSTest.TestAdapter.1.1.18\build_common\es\Microsoft.VisualStudio.TestPlatform.TestFramework.resources.dll d :\a\1\s\TestSolution\packages\MSTest.TestAdapter.1.1.18\build_common\es\Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.resources.dll d:\a\1\s\TestSolution\packages\ MSTest.TestAdapter.1.1.18\build_common\es\Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.resources.dll d:\a\1\s\TestSolution\packages\MSTest.TestAdapter.1.1.18\build_common\de\ Microsoft.VisualStudio.TestPlatform.TestFramework.resources.dll d:\a\1\s\TestSolution\packages\MSTest.TestAdapter.1.1.18\build_common\de\Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.resources.dll d :\a\1\s\TestSolution\packages\MSTest.TestAdapter.1.1.18\build_common\fr\Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.resources.dll d:\a\1\s\TestSolution\packages\ MSTest.TestFramework.1.1.18\lib\net45\Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions.dll d:\a\1\s\TestSolution\LibraryTests\bin\Release\Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices。 dll d:\a\1\s\TestSolution\LibraryTests\bin\Release\Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions.dll d:\a\1\s\TestSolution\packages\MSTest.TestAdapter.1.1.18\ build_common\Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.dll d:\a\1\s\TestSolution\LibraryTests\bin\Release\LibraryTests.dll。resources.dll d:\a\1\s\TestSolution\packages\MSTest.TestAdapter.1.1.18\build_common\cs\Microsoft.VisualStudio.TestPlatform.TestFramework.resources.dll d:\a\1\s\TestSolution\包\MSTest.TestAdapter.1.1.18\build_common\fr\Microsoft.VisualStudio.TestPlatform.TestFramework.resources.dll d:\a\1\s\TestSolution\packages\MSTest.TestAdapter.1.1.18\build_common\fr\ Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.resources.dll d:\a\1\s\TestSolution\packages\MSTest.TestAdapter.1.1.18\build_common\es\Microsoft.VisualStudio.TestPlatform.TestFramework.resources.dll d :\a\1\s\TestSolution\packages\MSTest.TestAdapter.1.1.18\build_common\es\Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.resources.dll d:\a\1\s\TestSolution\packages\ MSTest.TestAdapter.1.1.18\build_common\es\Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.resources.dll d:\a\1\s\TestSolution\packages\MSTest.TestAdapter.1.1.18\build_common\de\ Microsoft.VisualStudio.TestPlatform.TestFramework.resources.dll d:\a\1\s\TestSolution\packages\MSTest.TestAdapter.1.1.18\build_common\de\Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.resources.dll d :\a\1\s\TestSolution\packages\MSTest.TestAdapter.1.1.18\build_common\fr\Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.resources.dll d:\a\1\s\TestSolution\packages\ MSTest.TestFramework.1.1.18\lib\net45\Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions.dll d:\a\1\s\TestSolution\LibraryTests\bin\Release\Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices。 dll d:\a\1\s\TestSolution\LibraryTests\bin\Release\Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions.dll d:\a\1\s\TestSolution\packages\MSTest.TestAdapter.1.1.18\ build_common\Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.dll d:\a\1\s\TestSolution\LibraryTests\bin\Release\LibraryTests.dll。PlatformServices.resources.dll d:\a\1\s\TestSolution\packages\MSTest.TestAdapter.1.1.18\build_common\fr\Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.resources.dll d:\a\1\ s\TestSolution\packages\MSTest.TestFramework.1.1.18\lib\net45\Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions.dll d:\a\1\s\TestSolution\LibraryTests\bin\Release\Microsoft.VisualStudio。 TestPlatform.MSTestAdapter.PlatformServices.dll d:\a\1\s\TestSolution\LibraryTests\bin\Release\Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions.dll d:\a\1\s\TestSolution\packages\MSTest。 TestAdapter.1.1.18\build_common\Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.dll d:\a\1\s\TestSolution\LibraryTests\bin\Release\LibraryTests.dll。PlatformServices.resources.dll d:\a\1\s\TestSolution\packages\MSTest.TestAdapter.1.1.18\build_common\fr\Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.resources.dll d:\a\1\ s\TestSolution\packages\MSTest.TestFramework.1.1.18\lib\net45\Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions.dll d:\a\1\s\TestSolution\LibraryTests\bin\Release\Microsoft.VisualStudio。 TestPlatform.MSTestAdapter.PlatformServices.dll d:\a\1\s\TestSolution\LibraryTests\bin\Release\Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions.dll d:\a\1\s\TestSolution\packages\MSTest。 TestAdapter.1.1.18\build_common\Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.dll d:\a\1\s\TestSolution\LibraryTests\bin\Release\LibraryTests.dll。确保已安装的测试发现器和执行器、平台和框架版本设置合适,然后重试。 2017-11-20T08:43:22.1237346Z 2017-11-20T08:43:22.1237346Z 2017-11-20T08:43:22.2437321Z 信息:此外,如果测试发现者和执行者是,您可以尝试指定“/UseVsixExtensions”命令作为 vsix 扩展安装在计算机上,并且您的安装支持 vsix 扩展。示例: vstest.console.exe myTests.dll /UseVsixExtensions:true 2017-11-20T08:43:22.2437321Z 2017-11-20T08:43:28.4823923Z ##[警告]未找到可发布的结果。2017-11-20T08:43:28.4863923Z ##[节]整理:VsTest - testAssemblies


编辑:dotnet 测试结果:

这些是 dotnet 测试的结果:

2017-11-23T09:16:25.4507466Z ##[节]开始:dotnet测试2017-11-23T09:16:25.4517463Z ===================== =================================================== ======= 2017-11-23T09:16:25.4517463Z 任务:.NET Core 2017-11-23T09:16:25.4517463Z 描述:构建、测试、打包或发布 dotnet 应用程序,或运行自定义点网命令。对于包命令,支持 NuGet.org 和经过身份验证的源,例如 Package Management 和 MyGet。2017-11-23T09:16:25.4517463Z 版本:2.1.8 2017-11-23T09:16:25.4517463Z 作者:Microsoft Corporation 2017-11-23T09:16:25.4517463Z 帮助:更多信息 2017-11-23T09:16 :25.4517463Z ================================================= =============================== 2017-11-23T09:16:26.4307767Z [命令]"C:\Program Files \dotnet\dotnet.exe" test --configuration release --logger trx --results-directory d:\a_temp 2017-11-23T09:16:35.5529647Z MSBUILD:错误 MSB1003:指定项目或解决方案文件。当前工作目录不包含项目或解决方案文件。2017-11-23T09:16:35.5799660Z ##[错误]错误:C:\Program Files\dotnet\dotnet.exe 失败,返回代码:1 2017-11-23T09:16:35.5849659Z ##[警告]否找到测试结果文件。2017-11-23T09:16:35.5879662Z ##[错误]Dotnet 命令在以下项目上失败,退出代码为非零:2017-11-23T09:16:35.5979646Z ##[section]整理:dotnet 测试

sta*_*SFT 5

这是一个 .Net Core 测试,因此您可以通过.Net Core任务运行测试(版本: 2.*;命令:test;参数:--configuration $(BuildConfiguration);检查发布测试结果选项)。

如果您使用的是.Net Core1.*任务版本:

  1. 指定此参数:--configuration $(BuildConfiguration) --logger "trx"
  2. 添加发布测试结果任务(测试结果格式:VSTest;测试结果文件:**\*.trx;搜索文件夹:$(System.DefaultWorkingDirectory)

您还可以通过 Visual Studio 测试任务来完成此操作:

在此输入图像描述