Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/ant/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Azure devops 运行xunit测试时Azure DevOps生成错误_Azure Devops_Xunit - Fatal编程技术网

Azure devops 运行xunit测试时Azure DevOps生成错误

Azure devops 运行xunit测试时Azure DevOps生成错误,azure-devops,xunit,Azure Devops,Xunit,我正在使用AzureDevops构建我的webapi项目。测试成功运行,但由于以下错误而失败: System.IO.FileNotFoundException: Unable to find tests for D:\a\1\s\Api\FDA.Operational.Core.Workflow\Workflow.WebAPI.Tests\bin\Release\net coreapp2.0\xunit.runner.visualstudio.dotnetcore.testadapte

我正在使用AzureDevops构建我的webapi项目。测试成功运行,但由于以下错误而失败:

    System.IO.FileNotFoundException: Unable to find tests for 
D:\a\1\s\Api\FDA.Operational.Core.Workflow\Workflow.WebAPI.Tests\bin\Release\net
coreapp2.0\xunit.runner.visualstudio.dotnetcore.testadapter.dll. Make sure test 
project has a nuget reference of package "Microsoft.NET.Test.Sdk" and framework 
version settings are appropriate. Rerun with /diag option to diagnose further.
有人能帮忙吗


谢谢

您的构建正在尝试在xUnit test runner程序集中查找单元测试。我可以告诉你:没有

您应该缩小生成的测试文件设置范围,使其不包括测试运行程序,或者通过添加带有感叹号(!)的条目和包含测试适配器的程序集名称的一部分来添加特定的排除项。应该类似于此屏幕截图中的最后一个条目:


您使用过哪些构建代理?