I have a simple dotnet core class library with a single XUnit test method:
TestLib.csproj:
This happened to me after updating Microsoft.NET.Test.Sdk from v16.2.0 to v16.4.0 with netcoreapp2.0. Updating to netcoreapp3.0 resolved the issue for me.
netcoreapp2.0
netcoreapp3.0