I have a simple dotnet core class library with a single XUnit test method:
TestLib.csproj:
This error can occur if you upgrade xunit.runner.visualstudio
to a version greater than 2.4.1. Versions up to and including 2.4.1 include a reference to Microsoft.NET.Test.Sdk
but later ones don't, so you need to include the reference in your own project.
Interestingly, I found that NCrunch still ran my tests without the additional reference, even though I couldn't run them via the CLI.