I have a simple dotnet core class library with a single XUnit test method:
TestLib.csproj:
In my case, it was necessary to include a reference to MsTest.TestAdapter module using nuget.
A fresh project with MSTest.TestFramework and Microsoft.Net.Test.Sdk was not enough to run a single unit test.
Noticing in my case I was using a test project targeting .NET framework 4.8 and not .NET core. Although, I strongly believe this fix might apply to that platform as well