Either update `$(NetCoreVersion)` to `net8.0` or add an additional target as .NET 6 is out of support now.