Reputation: 6482
I am using AzureDevops to build my webapi project. the tests run successfully but it fails due to the following error:
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.
Can anyone help with this?
Thanks
Upvotes: 0
Views: 347
Reputation: 15621
Your build is trying to find unit tests inside the xUnit test runner assembly. I can tell you: there aren't any.
You should either narrow down the Test files setting of your build to not include the test runner, or add a specific exclusion by adding an entry with an exclamation point (!) and part of the name of the assembly holding the test adapter. Should look something like the last entry in this screenshot:
Upvotes: 1