Skip to content

docs: update Platform attribute for NUnit 5 runtime identifier changes#1191

Open
stevenaw with Copilot wants to merge 6 commits into
masterfrom
copilot/nunit-5-document-platform-names
Open

docs: update Platform attribute for NUnit 5 runtime identifier changes#1191
stevenaw with Copilot wants to merge 6 commits into
masterfrom
copilot/nunit-5-document-platform-names

Conversation

Copilot AI commented Jul 4, 2026

Copy link
Copy Markdown
Contributor

Fixes #1181

In NUnit 5, the meaning of NET and DotNET changed from targeting .NET Framework to targeting modern .NET, and new NETFramework/DotNETFramework identifiers were introduced. The Platform attribute docs were still showing the NUnit 4 (and older) runtime identifiers.

Runtime section

  • Replaced the flat list with structured subsections: Modern .NET, .NET Framework, Other Runtimes
  • Modern .NET identifiers: Net, NETCore, DotNET, DotNETCore
  • .NET Framework identifiers: NETFramework, DotNETFramework (new in NUnit 5), with support for version suffixes (NETFramework-4.0, etc.)
  • Removed obsolete entries: Net-1.0 through Net-4.5, NetCF (invalid in NUnit 5; version specifiers on Net throw PlatformNotSupportedException)
  • Added MonoTouch to Other Runtimes

Notes section

  • Removed the .NET Framework version footnotes (no longer applicable)
  • Renumbered remaining Mono footnotes

New: Breaking Changes in NUnit 5 section

Includes a migration table and explicit guidance for users upgrading from NUnit 4:

Identifier NUnit 4 NUnit 5
NET .NET Framework Modern .NET
NETFramework Not supported .NET Framework
NETCore Modern .NET Modern .NET (unchanged)
DotNET .NET Framework Modern .NET
DotNETCore Modern .NET Modern .NET (unchanged)
DotNETFramework Not supported .NET Framework

…hanges

- Replace the Runtime section with NUnit 5-accurate content:
  - Net, NETCore, DotNET, DotNETCore all target modern .NET
  - NETFramework and DotNETFramework target .NET Framework (new in NUnit 5)
  - Note that version specifiers are not supported for modern .NET
  - NETFramework supports version specifiers (e.g. NETFramework-4.0)
  - Remove obsolete Net-1.0 through Net-4.5 and NetCF entries
  - Add MonoTouch to Other Runtimes
- Update Notes section (remove .NET Framework footnotes, renumber Mono ones)
- Add Breaking Changes in NUnit 5 section with migration table

Closes #1181
Copilot AI changed the title [WIP] Update documentation for changes to PlatformNames and Platform attribute docs: update Platform attribute for NUnit 5 runtime identifier changes Jul 4, 2026
Copilot AI requested a review from stevenaw July 4, 2026 21:04

@stevenaw stevenaw left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A good start for me to come back to soon

@stevenaw stevenaw force-pushed the copilot/nunit-5-document-platform-names branch from afff0eb to 4a172e7 Compare July 8, 2026 12:26
@stevenaw stevenaw marked this pull request as ready for review July 8, 2026 13:29

@stevenaw stevenaw left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've pushed some follow-up changes. Ready for another human to review.

@manfred-brands manfred-brands left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good @stevenaw only one suggestion.

| `DotNETFramework` | Not supported | .NET Framework |

If you were using `[Platform("NET")]` or `[Platform("DotNET")]` to target .NET Framework,
update those usages to `[Platform("NETFramework")]` or `[Platform("DotNETFramework")]`.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we suggest to use the non-string versions using the enums instead?

@stevenaw stevenaw Jul 8, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you mean the named constants? I think we opted away from actual enums during implementation of PlatformNames.

I was conflicted on whether to leave these string literals in place here or not. I like the idea of using the named constants where we can in the docs though this particular case gave me pause since it deals with a change in how the underlying strings are handled relative to previous releases. The PlatformNames constants were only introduced a few months ago as part of 4.6 and are new enough that I thought it likely most consumers may still use string literals (or even their own defined constants which could vary in naming from our own)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

NUnit 5 | Document changes to PlatformNames and Platform attribute

4 participants