Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jun 23, 2025

The NUnit unit testing tutorial contained an incorrect CLI command that would not work for most users. The tutorial showed:

dotnet reference add ../PrimeService/PrimeService.csproj

However, this "noun first" form only works in .NET 10 SDK and later. The majority of users are still on .NET 9 or earlier, which requires the "verb first" form:

dotnet add reference ../PrimeService/PrimeService.csproj

Changes made:

  • Fixed the CLI command to use dotnet add reference (works for .NET 9 and earlier)
  • Updated the link text to match the corrected command
  • Added a note explaining that .NET 10+ users can use the "noun first" form
  • Maintained the link to the reference documentation which explains both forms

This change ensures the tutorial works for the vast majority of users while providing clarity about version differences.

Fixes #46919.


💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.


Internal previews

📄 File 🔗 Preview link
docs/core/testing/unit-testing-csharp-with-nunit.md docs/core/testing/unit-testing-csharp-with-nunit

Copilot AI changed the title [WIP] Dotnet nunit cli command is false Fix incorrect dotnet CLI command in NUnit tutorial Jun 23, 2025
Copilot AI requested a review from gewarren June 23, 2025 13:18
@gewarren gewarren marked this pull request as ready for review June 24, 2025 16:54
@gewarren gewarren requested review from a team and IEvangelist as code owners June 24, 2025 16:54
@gewarren gewarren enabled auto-merge (squash) June 27, 2025 17:46
@gewarren gewarren merged commit 35f707c into main Jul 8, 2025
13 checks passed
@gewarren gewarren deleted the copilot/fix-46919 branch July 8, 2025 16:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Dotnet nunit cli command is false

3 participants