I have a simple dotnet core class library with a single XUnit test method:
TestLib.csproj:
If you are using xUnit, make sure your project type is not as netstanderd. As xUnit doesn't support netstanderd, change it to coreapp2.0 or others.