As of the 5.2.0 release, the GitVersionTask package has a dependency on Microsoft.NETFramework.ReferenceAssemblies. This is incorrect because this package is for enabling compiling .NET Framework assemblies on Linux. It has no runtime impact.
The reason for the unneeded dependency is because the package reference is not marked with PrivateAssets="All" in your Directory.Build.props file.
Expected Behavior
The GitVersionTask package should have no dependencies.
Actual Behavior
The GitVersionTask package does have a dependency:

Possible Fix
Add PrivateAssets="All" to package reference in Directory.Build.props file.