I have a simple dotnet core class library with a single XUnit test method:
TestLib.csproj:
Installing Microsoft.NET.Test.Sdk package from nuget package manager solved my issue.
Microsoft.NET.Test.Sdk