I have a simple dotnet core class library with a single XUnit test method:
TestLib.csproj:
If you are running a project by cloning than Solution is to install the Microsoft.NET.Test.Sdk. How to : Tools>Nuget Package Manager>Manage Nuget Packages For Solution...>Search for Microsoft.NET.Test.Sdk and install for your test project.