Skip to content

Unable to test project targeting net8.0-windows and win-x64  #4565

@SimonCropp

Description

@SimonCropp

When targeting net8.0-windows and win-x64 all tests result in OneTimeSetUp: Only supported on Windows7 for all tests.

csrpoj content

<TargetFramework>net8.0-windows</TargetFramework>
<RuntimeIdentifier>win-x64</RuntimeIdentifier>

Only failing in NUnit 4. works in 3.*.

Repro https://github.com/SimonCropp/NunitPlatformRepro

image

targeting windows10.0.22621.0 is a workaround. but it is pretty ugly to have the following in all csproj

    <TargetFramework>net8.0-windows10.0.22621.0</TargetFramework>

<TargetFramework>net8.0-windows</TargetFramework> produces

[assembly: TargetPlatform("Windows7.0")]
[assembly: SupportedOSPlatform("Windows7.0")]

and <TargetFramework>net8.0-windows10.0.22621.0</TargetFramework>

produces

[assembly: TargetPlatform("Windows10.0.22621.0")]
[assembly: SupportedOSPlatform("Windows10.0.22621.0")]

so i suspect whatever is looking at those attribute is misinterpreting them. AFAIK they mean "at least this version" no "only this specific version"

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions