In #4574 and #4569 we added some hard-coded version numbers in the OSPlatformTranslator to fix a few things in NUnit 4.0.1.
It should be alright in the short-term as new major versions of Windows are relatively infrequent, however we should see if we can remove some of the hard-codings to minimize the chance that a new version of Windows will require a new version of the framework to work with it.
We should also ensure that the mapping code can account for any changes in the SDK for how a TFM such as {version}-windows may map to a compiler-generated SupportOSPlatform attribute that may come out of this issue: dotnet/sdk#37220
One option could be to see if we can make use of [Platform("Win")] .
In #4574 and #4569 we added some hard-coded version numbers in the OSPlatformTranslator to fix a few things in NUnit 4.0.1.
It should be alright in the short-term as new major versions of Windows are relatively infrequent, however we should see if we can remove some of the hard-codings to minimize the chance that a new version of Windows will require a new version of the framework to work with it.
We should also ensure that the mapping code can account for any changes in the SDK for how a TFM such as
{version}-windowsmay map to a compiler-generatedSupportOSPlatformattribute that may come out of this issue: dotnet/sdk#37220One option could be to see if we can make use of
[Platform("Win")].