visual-studio-2017 - VSTS : Test runner finds no tests

标签 visual-studio-2017 azure-devops azure-pipelines-build-task

我有一个 .net 4.6 MVC 应用程序和一个由 Visual Studio 生成的标准测试项目,其中包含一些 Controller 测试。这些都发现并传入 VS 测试运行器,但我试图让 VSTS 现在执行这些测试,如果任何测试失败,则构建失败。但是,没有发现任何测试,我收到了很多“输入字符串格式不正确”的错误消息。
我在测试中没有改变任何东西,我所做的只是将测试任务添加到我的构建阶段。
这是完整的测试输出:

2017-11-28T09:54:11.2442325Z ##[section]Starting: Run Unit Tests
2017-11-28T09:54:11.2598856Z ==============================================================================
2017-11-28T09:54:11.2598856Z Task         : Visual Studio Test
2017-11-28T09:54:11.2598856Z Description  : Run tests with Visual Studio test runner
2017-11-28T09:54:11.2598856Z Version      : 2.2.3
2017-11-28T09:54:11.2598856Z Author       : Microsoft Corporation
2017-11-28T09:54:11.2598856Z Help         : [More Information](https://go.microsoft.com/fwlink/?LinkId=835764)
2017-11-28T09:54:11.2598856Z ==============================================================================
2017-11-28T09:54:14.6192312Z Run the tests locally using vstest.console.exe
2017-11-28T09:54:14.6192312Z ========================================================
2017-11-28T09:54:14.6192312Z Test selector : Test assemblies
2017-11-28T09:54:14.6192312Z Test assemblies : **\*test*.dll,!**\obj\**
2017-11-28T09:54:14.6192312Z Test filter criteria : null
2017-11-28T09:54:14.6192312Z Search folder : C:\agent\_work\1\s
2017-11-28T09:54:14.6192312Z Run settings file : C:\agent\_work\1\s
2017-11-28T09:54:14.6192312Z Run in parallel : false
2017-11-28T09:54:14.6192312Z Run in isolation : false
2017-11-28T09:54:14.6192312Z Path to custom adapters : null
2017-11-28T09:54:14.6192312Z Other console options : null
2017-11-28T09:54:14.6192312Z Code coverage enabled : false
2017-11-28T09:54:14.6192312Z VisualStudio version selected for test execution : latest
2017-11-28T09:54:16.7609946Z ========================================================
2017-11-28T09:54:19.1015214Z [command]"C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\CommonExtensions\Microsoft\TestWindow\vstest.console.exe" @C:\agent\_work\_temp\18c48b81-d422-11e7-8218-574cad38a3a3.txt
2017-11-28T09:54:26.1576050Z Microsoft (R) Test Execution Command Line Tool Version 15.0.26228.0
2017-11-28T09:54:26.1576050Z Copyright (c) Microsoft Corporation.  All rights reserved.
2017-11-28T09:54:26.1576050Z 
2017-11-28T09:54:26.1576050Z vstest.console.exe 
2017-11-28T09:54:26.1576050Z "C:\agent\_work\1\s\MVC5\packages\MSTest.TestAdapter.1.1.17\build\_common\Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.dll"
2017-11-28T09:54:26.1576050Z "C:\agent\_work\1\s\MVC5\packages\MSTest.TestAdapter.1.1.17\build\_common\Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.Interface.dll"
2017-11-28T09:54:26.1576050Z "C:\agent\_work\1\s\MVC5\packages\MSTest.TestAdapter.1.1.17\build\_common\Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.dll"
2017-11-28T09:54:26.1576050Z "C:\agent\_work\1\s\MVC5\packages\MSTest.TestAdapter.1.1.17\build\_common\Microsoft.VisualStudio.TestPlatform.TestFramework.dll"
2017-11-28T09:54:26.1576050Z "C:\agent\_work\1\s\MVC5\packages\MSTest.TestAdapter.1.1.17\build\_common\cs\Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.resources.dll"
2017-11-28T09:54:26.1576050Z "C:\agent\_work\1\s\MVC5\packages\MSTest.TestAdapter.1.1.17\build\_common\cs\Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.resources.dll"
2017-11-28T09:54:26.1576050Z "C:\agent\_work\1\s\MVC5\packages\MSTest.TestAdapter.1.1.17\build\_common\cs\Microsoft.VisualStudio.TestPlatform.TestFramework.resources.dll"
2017-11-28T09:54:26.1576050Z "C:\agent\_work\1\s\MVC5\packages\MSTest.TestAdapter.1.1.17\build\_common\de\Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.resources.dll"
2017-11-28T09:54:26.1576050Z "C:\agent\_work\1\s\MVC5\packages\MSTest.TestAdapter.1.1.17\build\_common\de\Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.resources.dll"
2017-11-28T09:54:26.1576050Z "C:\agent\_work\1\s\MVC5\packages\MSTest.TestAdapter.1.1.17\build\_common\de\Microsoft.VisualStudio.TestPlatform.TestFramework.resources.dll"
2017-11-28T09:54:26.1576050Z "C:\agent\_work\1\s\MVC5\packages\MSTest.TestAdapter.1.1.17\build\_common\es\Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.resources.dll"
2017-11-28T09:54:26.1576050Z "C:\agent\_work\1\s\MVC5\packages\MSTest.TestAdapter.1.1.17\build\_common\es\Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.resources.dll"
2017-11-28T09:54:26.1576050Z "C:\agent\_work\1\s\MVC5\packages\MSTest.TestAdapter.1.1.17\build\_common\es\Microsoft.VisualStudio.TestPlatform.TestFramework.resources.dll"
2017-11-28T09:54:26.1576050Z "C:\agent\_work\1\s\MVC5\packages\MSTest.TestAdapter.1.1.17\build\_common\fr\Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.resources.dll"
2017-11-28T09:54:26.1576050Z "C:\agent\_work\1\s\MVC5\packages\MSTest.TestAdapter.1.1.17\build\_common\fr\Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.resources.dll"
2017-11-28T09:54:26.1576050Z "C:\agent\_work\1\s\MVC5\packages\MSTest.TestAdapter.1.1.17\build\_common\fr\Microsoft.VisualStudio.TestPlatform.TestFramework.resources.dll"
2017-11-28T09:54:26.1576050Z "C:\agent\_work\1\s\MVC5\packages\MSTest.TestAdapter.1.1.17\build\_common\it\Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.resources.dll"
2017-11-28T09:54:26.1576050Z "C:\agent\_work\1\s\MVC5\packages\MSTest.TestAdapter.1.1.17\build\_common\it\Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.resources.dll"
2017-11-28T09:54:26.1576050Z "C:\agent\_work\1\s\MVC5\packages\MSTest.TestAdapter.1.1.17\build\_common\it\Microsoft.VisualStudio.TestPlatform.TestFramework.resources.dll"
2017-11-28T09:54:26.1576050Z "C:\agent\_work\1\s\MVC5\packages\MSTest.TestAdapter.1.1.17\build\_common\ja\Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.resources.dll"
2017-11-28T09:54:26.1576050Z "C:\agent\_work\1\s\MVC5\packages\MSTest.TestAdapter.1.1.17\build\_common\ja\Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.resources.dll"
2017-11-28T09:54:26.1576050Z "C:\agent\_work\1\s\MVC5\packages\MSTest.TestAdapter.1.1.17\build\_common\ja\Microsoft.VisualStudio.TestPlatform.TestFramework.resources.dll"
2017-11-28T09:54:26.1576050Z "C:\agent\_work\1\s\MVC5\packages\MSTest.TestAdapter.1.1.17\build\_common\ko\Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.resources.dll"
2017-11-28T09:54:26.1576050Z "C:\agent\_work\1\s\MVC5\packages\MSTest.TestAdapter.1.1.17\build\_common\ko\Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.resources.dll"
2017-11-28T09:54:26.1576050Z "C:\agent\_work\1\s\MVC5\packages\MSTest.TestAdapter.1.1.17\build\_common\ko\Microsoft.VisualStudio.TestPlatform.TestFramework.resources.dll"
2017-11-28T09:54:26.1576050Z "C:\agent\_work\1\s\MVC5\packages\MSTest.TestAdapter.1.1.17\build\_common\pl\Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.resources.dll"
2017-11-28T09:54:26.1576050Z "C:\agent\_work\1\s\MVC5\packages\MSTest.TestAdapter.1.1.17\build\_common\pl\Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.resources.dll"
2017-11-28T09:54:26.1576050Z "C:\agent\_work\1\s\MVC5\packages\MSTest.TestAdapter.1.1.17\build\_common\pl\Microsoft.VisualStudio.TestPlatform.TestFramework.resources.dll"
2017-11-28T09:54:26.1576050Z "C:\agent\_work\1\s\MVC5\packages\MSTest.TestAdapter.1.1.17\build\_common\pt\Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.resources.dll"
2017-11-28T09:54:26.1576050Z "C:\agent\_work\1\s\MVC5\packages\MSTest.TestAdapter.1.1.17\build\_common\pt\Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.resources.dll"
2017-11-28T09:54:26.1576050Z "C:\agent\_work\1\s\MVC5\packages\MSTest.TestAdapter.1.1.17\build\_common\pt\Microsoft.VisualStudio.TestPlatform.TestFramework.resources.dll"
2017-11-28T09:54:26.1576050Z "C:\agent\_work\1\s\MVC5\packages\MSTest.TestAdapter.1.1.17\build\_common\ru\Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.resources.dll"
2017-11-28T09:54:26.1576050Z "C:\agent\_work\1\s\MVC5\packages\MSTest.TestAdapter.1.1.17\build\_common\ru\Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.resources.dll"
2017-11-28T09:54:26.1576050Z "C:\agent\_work\1\s\MVC5\packages\MSTest.TestAdapter.1.1.17\build\_common\ru\Microsoft.VisualStudio.TestPlatform.TestFramework.resources.dll"
2017-11-28T09:54:26.1576050Z "C:\agent\_work\1\s\MVC5\packages\MSTest.TestAdapter.1.1.17\build\_common\tr\Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.resources.dll"
2017-11-28T09:54:26.1576050Z "C:\agent\_work\1\s\MVC5\packages\MSTest.TestAdapter.1.1.17\build\_common\tr\Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.resources.dll"
2017-11-28T09:54:26.1576050Z "C:\agent\_work\1\s\MVC5\packages\MSTest.TestAdapter.1.1.17\build\_common\tr\Microsoft.VisualStudio.TestPlatform.TestFramework.resources.dll"
2017-11-28T09:54:26.1576050Z "C:\agent\_work\1\s\MVC5\packages\MSTest.TestAdapter.1.1.17\build\_common\zh-Hans\Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.resources.dll"
2017-11-28T09:54:26.1576050Z "C:\agent\_work\1\s\MVC5\packages\MSTest.TestAdapter.1.1.17\build\_common\zh-Hans\Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.resources.dll"
2017-11-28T09:54:26.1576050Z "C:\agent\_work\1\s\MVC5\packages\MSTest.TestAdapter.1.1.17\build\_common\zh-Hans\Microsoft.VisualStudio.TestPlatform.TestFramework.resources.dll"
2017-11-28T09:54:26.1576050Z "C:\agent\_work\1\s\MVC5\packages\MSTest.TestAdapter.1.1.17\build\_common\zh-Hant\Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.resources.dll"
2017-11-28T09:54:26.1576050Z "C:\agent\_work\1\s\MVC5\packages\MSTest.TestAdapter.1.1.17\build\_common\zh-Hant\Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.resources.dll"
2017-11-28T09:54:26.1576050Z "C:\agent\_work\1\s\MVC5\packages\MSTest.TestAdapter.1.1.17\build\_common\zh-Hant\Microsoft.VisualStudio.TestPlatform.TestFramework.resources.dll"
2017-11-28T09:54:26.1576050Z "C:\agent\_work\1\s\MVC5\packages\MSTest.TestAdapter.1.1.17\build\netcoreapp1.0\Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.dll"
2017-11-28T09:54:26.1576050Z "C:\agent\_work\1\s\MVC5\packages\MSTest.TestAdapter.1.1.17\build\uap10.0\Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.dll"
2017-11-28T09:54:26.1576050Z "C:\agent\_work\1\s\MVC5\packages\MSTest.TestFramework.1.1.17\lib\net45\Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions.dll"
2017-11-28T09:54:26.1576050Z "C:\agent\_work\1\s\MVC5\packages\MSTest.TestFramework.1.1.17\lib\net45\Microsoft.VisualStudio.TestPlatform.TestFramework.dll"
2017-11-28T09:54:26.1576050Z "C:\agent\_work\1\s\MVC5\packages\MSTest.TestFramework.1.1.17\lib\netstandard1.0\Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions.dll"
2017-11-28T09:54:26.1576050Z "C:\agent\_work\1\s\MVC5\packages\MSTest.TestFramework.1.1.17\lib\netstandard1.0\Microsoft.VisualStudio.TestPlatform.TestFramework.dll"
2017-11-28T09:54:26.1576050Z "C:\agent\_work\1\s\MVC5\packages\MSTest.TestFramework.1.1.17\lib\uap10.0\Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions.dll"
2017-11-28T09:54:26.1576050Z "C:\agent\_work\1\s\MVC5\packages\MSTest.TestFramework.1.1.17\lib\uap10.0\Microsoft.VisualStudio.TestPlatform.TestFramework.dll"
2017-11-28T09:54:26.1576050Z /logger:"trx"
2017-11-28T09:54:26.1576050Z /TestAdapterPath:"C:\agent\_work\1\s"
2017-11-28T09:54:29.0388328Z Starting test execution, please wait...
2017-11-28T09:54:35.4463920Z Warning: Input string was not in a correct format.
2017-11-28T09:54:35.4463920Z 
2017-11-28T09:54:35.8082157Z Warning: Unable to load types from the test source 'C:\agent\_work\1\s\MVC5\packages\MSTest.TestAdapter.1.1.17\build\uap10.0\Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.dll'. Some or all of the tests in this source may not be discovered.
2017-11-28T09:54:35.8082157Z 
2017-11-28T09:54:35.8394672Z Warning: Input string was not in a correct format.
2017-11-28T09:54:35.8394672Z 
2017-11-28T09:54:36.1206800Z Warning: Input string was not in a correct format.
2017-11-28T09:54:36.1206800Z 
2017-11-28T09:54:36.1676432Z Warning: Input string was not in a correct format.
2017-11-28T09:54:36.1676432Z 
2017-11-28T09:54:36.3706773Z Warning: Unable to load types from the test source 'C:\agent\_work\1\s\MVC5\packages\MSTest.TestAdapter.1.1.17\build\_common\Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.dll'. Some or all of the tests in this source may not be discovered.
2017-11-28T09:54:36.3706773Z 
2017-11-28T09:54:37.0547894Z Warning: No test is available in C:\agent\_work\1\s\MVC5\packages\MSTest.TestAdapter.1.1.17\build\_common\pt\Microsoft.VisualStudio.TestPlatform.TestFramework.resources.dll C:\agent\_work\1\s\MVC5\packages\MSTest.TestAdapter.1.1.17\build\_common\ru\Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.resources.dll C:\agent\_work\1\s\MVC5\packages\MSTest.TestAdapter.1.1.17\build\_common\ru\Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.resources.dll C:\agent\_work\1\s\MVC5\packages\MSTest.TestAdapter.1.1.17\build\_common\ru\Microsoft.VisualStudio.TestPlatform.TestFramework.resources.dll C:\agent\_work\1\s\MVC5\packages\MSTest.TestAdapter.1.1.17\build\_common\tr\Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.resources.dll C:\agent\_work\1\s\MVC5\packages\MSTest.TestAdapter.1.1.17\build\_common\tr\Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.resources.dll C:\agent\_work\1\s\MVC5\packages\MSTest.TestAdapter.1.1.17\build\_common\tr\Microsoft.VisualStudio.TestPlatform.TestFramework.resources.dll C:\agent\_work\1\s\MVC5\packages\MSTest.TestAdapter.1.1.17\build\_common\zh-Hans\Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.resources.dll C:\agent\_work\1\s\MVC5\packages\MSTest.TestAdapter.1.1.17\build\_common\zh-Hans\Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.resources.dll C:\agent\_work\1\s\MVC5\packages\MSTest.TestAdapter.1.1.17\build\_common\zh-Hans\Microsoft.VisualStudio.TestPlatform.TestFramework.resources.dll C:\agent\_work\1\s\MVC5\packages\MSTest.TestAdapter.1.1.17\build\_common\zh-Hant\Microsoft.VisualStudio.TestPlatform.TestFramework.resources.dll C:\agent\_work\1\s\MVC5\packages\MSTest.TestAdapter.1.1.17\build\_common\zh-Hant\Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.resources.dll C:\agent\_work\1\s\MVC5\packages\MSTest.TestAdapter.1.1.17\build\_common\pt\Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.resources.dll C:\agent\_work\1\s\MVC5\packages\MSTest.TestAdapter.1.1.17\build\netcoreapp1.0\Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.dll C:\agent\_work\1\s\MVC5\packages\MSTest.TestAdapter.1.1.17\build\uap10.0\Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.dll C:\agent\_work\1\s\MVC5\packages\MSTest.TestFramework.1.1.17\lib\net45\Microsoft.VisualStudio.TestPlatform.TestFramework.dll C:\agent\_work\1\s\MVC5\packages\MSTest.TestFramework.1.1.17\lib\netstandard1.0\Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions.dll C:\agent\_work\1\s\MVC5\packages\MSTest.TestFramework.1.1.17\lib\netstandard1.0\Microsoft.VisualStudio.TestPlatform.TestFramework.dll C:\agent\_work\1\s\MVC5\packages\MSTest.TestFramework.1.1.17\lib\uap10.0\Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions.dll C:\agent\_work\1\s\MVC5\packages\MSTest.TestFramework.1.1.17\lib\uap10.0\Microsoft.VisualStudio.TestPlatform.TestFramework.dll C:\agent\_work\1\s\MVC5\packages\MSTest.TestAdapter.1.1.17\build\_common\zh-Hant\Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.resources.dll C:\agent\_work\1\s\MVC5\packages\MSTest.TestAdapter.1.1.17\build\_common\Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.dll C:\agent\_work\1\s\MVC5\packages\MSTest.TestAdapter.1.1.17\build\_common\pt\Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.resources.dll C:\agent\_work\1\s\MVC5\packages\MSTest.TestAdapter.1.1.17\build\_common\pl\Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.resources.dll C:\agent\_work\1\s\MVC5\packages\MSTest.TestAdapter.1.1.17\build\_common\Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.Interface.dll C:\agent\_work\1\s\MVC5\packages\MSTest.TestAdapter.1.1.17\build\_common\Microsoft.VisualStudio.TestPlatform.TestFramework.dll C:\agent\_work\1\s\MVC5\packages\MSTest.TestAdapter.1.1.17\build\_common\cs\Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.resources.dll C:\agent\_work\1\s\MVC5\packages\MSTest.TestAdapter.1.1.17\build\_common\cs\Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.resources.dll C:\agent\_work\1\s\MVC5\packages\MSTest.TestAdapter.1.1.17\build\_common\cs\Microsoft.VisualStudio.TestPlatform.TestFramework.resources.dll C:\agent\_work\1\s\MVC5\packages\MSTest.TestAdapter.1.1.17\build\_common\de\Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.resources.dll C:\agent\_work\1\s\MVC5\packages\MSTest.TestAdapter.1.1.17\build\_common\de\Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.resources.dll C:\agent\_work\1\s\MVC5\packages\MSTest.TestAdapter.1.1.17\build\_common\de\Microsoft.VisualStudio.TestPlatform.TestFramework.resources.dll C:\agent\_work\1\s\MVC5\packages\MSTest.TestAdapter.1.1.17\build\_common\es\Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.resources.dll C:\agent\_work\1\s\MVC5\packages\MSTest.TestAdapter.1.1.17\build\_common\es\Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.resources.dll C:\agent\_work\1\s\MVC5\packages\MSTest.TestAdapter.1.1.17\build\_common\pl\Microsoft.VisualStudio.TestPlatform.TestFramework.resources.dll C:\agent\_work\1\s\MVC5\packages\MSTest.TestAdapter.1.1.17\build\_common\es\Microsoft.VisualStudio.TestPlatform.TestFramework.resources.dll C:\agent\_work\1\s\MVC5\packages\MSTest.TestAdapter.1.1.17\build\_common\fr\Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.resources.dll C:\agent\_work\1\s\MVC5\packages\MSTest.TestAdapter.1.1.17\build\_common\fr\Microsoft.VisualStudio.TestPlatform.TestFramework.resources.dll C:\agent\_work\1\s\MVC5\packages\MSTest.TestAdapter.1.1.17\build\_common\it\Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.resources.dll C:\agent\_work\1\s\MVC5\packages\MSTest.TestAdapter.1.1.17\build\_common\it\Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.resources.dll C:\agent\_work\1\s\MVC5\packages\MSTest.TestAdapter.1.1.17\build\_common\it\Microsoft.VisualStudio.TestPlatform.TestFramework.resources.dll C:\agent\_work\1\s\MVC5\packages\MSTest.TestAdapter.1.1.17\build\_common\ja\Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.resources.dll C:\agent\_work\1\s\MVC5\packages\MSTest.TestAdapter.1.1.17\build\_common\ja\Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.resources.dll C:\agent\_work\1\s\MVC5\packages\MSTest.TestAdapter.1.1.17\build\_common\ja\Microsoft.VisualStudio.TestPlatform.TestFramework.resources.dll C:\agent\_work\1\s\MVC5\packages\MSTest.TestAdapter.1.1.17\build\_common\ko\Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.resources.dll C:\agent\_work\1\s\MVC5\packages\MSTest.TestAdapter.1.1.17\build\_common\ko\Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.resources.dll C:\agent\_work\1\s\MVC5\packages\MSTest.TestAdapter.1.1.17\build\_common\ko\Microsoft.VisualStudio.TestPlatform.TestFramework.resources.dll C:\agent\_work\1\s\MVC5\packages\MSTest.TestAdapter.1.1.17\build\_common\pl\Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.resources.dll C:\agent\_work\1\s\MVC5\packages\MSTest.TestAdapter.1.1.17\build\_common\fr\Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.resources.dll C:\agent\_work\1\s\MVC5\packages\MSTest.TestFramework.1.1.17\lib\net45\Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions.dll C:\agent\_work\1\s\MVC5\packages\MSTest.TestAdapter.1.1.17\build\_common\Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.dll. Make sure that installed test discoverers & executors, platform & framework version settings are appropriate and try again.
2017-11-28T09:54:37.0547894Z 
2017-11-28T09:54:37.0700167Z 
2017-11-28T09:54:37.6168898Z Information: Additionally, you can try specifying '/UseVsixExtensions' command if the test discoverer & executor is installed on the machine as vsix extensions and your installation supports vsix extensions. Example: vstest.console.exe myTests.dll /UseVsixExtensions:true
2017-11-28T09:54:37.6168898Z 
2017-11-28T09:54:38.6066846Z ##[warning]No results found to publish.
2017-11-28T09:54:38.6066846Z ##[section]Finishing: Run Unit Tests

有没有人遇到过这个?我有点假设 VSTS 中的标准 Visual Studio 测试任务会默认运行 VS2017 生成的标准测试项目!
谢谢

enter image description here

我的 SLN 是一个简单的文件->新应用程序,有两个项目:
enter image description here

最佳答案

VSTS 中为 Visual Studio 测试提供的模板默认为 测试组件 参数为:

**\*test*.dll
!**\*TestAdapter.dll
!**\obj\**

不幸的是,其他程序集可能会潜入搜索路径。尝试调整 测试组件 到以下几点:
**\*test*.dll
!**\*TestAdapter*.dll       <--- changed
!**\*VisualStudio*.dll      <--- added
!**\obj\**

关于visual-studio-2017 - VSTS : Test runner finds no tests,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47528936/

相关文章:

asp.net - 如何从 ASP.NET Core 项目中删除 docker 支持?

visual-studio - 在 VisualStudio 中将所有 *.cs 文件转换为 unicode

azure-devops - 从 csproj 获取 Azure DevOps 中 Nuget 包步骤中的版本号

.net-core - 如何从 dotnet test --collect "Code coverage"生成的 VS 覆盖率发布 Cobertura 覆盖率报告?

azure-devops - 导航到 azure devops 构建服务器中的构建源目录

azure-devops - 我如何设置一个 Azure DevOps 管道变量,其中包含此格式的日期 : 25. 07.2020

html - 未应用新制作的 CSS 类

visual-studio-2017 - Visual Studio 2017 中不存在报告模板 (RDLC)

SSH 服务连接 - 无法解析私钥 : Unsupported key format

msbuild - 在 VSTS 中,如何将电子邮件通知任务添加到构建和发布定义中?