When you have a .NET Standard library, the test project needs to target an actual platform. The most logical choice (I assume) is to target .NET Core because it runs on multiple operating systems, but it's also possible to target multiple platforms as demonstrated in the xUnit.net documentation:
With a single test project, we can have our tests run against multiple target frameworks. Open the .csproj file and change this:
<PropertyGroup> <TargetFramework>netcoreapp2.1</TargetFramework> </PropertyGroup>
To this:
<PropertyGroup> <TargetFramework>net452;netcoreapp2.1</TargetFramework> </PropertyGroup>
Is there any practical reason for doing so, i.e. are there situations that require you to target multiple platforms?
The only reason I can think of is to be aware of bugs in a specific platform, which has occurred a couple times in .NET Framework. But that feels like you would be testing the platform instead of your library, so I'm not sure if that's a good enough reason.
I think the only reason where this makes sense is if you are worried about the platform APIs behaving differently between .NET Framework and .NET Core.
For the most part, the APIs behave the same across platforms, but there might be cases where there are slight differences. Some of those differences are documented here.