Skip to content

Fix incorrect dotnet CLI command in NUnit tutorial #46920

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Copilot
Copy link
Contributor

@Copilot 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

Co-authored-by: gewarren <24882762+gewarren@users.noreply.github.com>
@Copilot Copilot AI changed the title [WIP] Dotnet nunit cli command is false Fix incorrect dotnet CLI command in NUnit tutorial Jun 23, 2025
@Copilot Copilot AI requested a review from gewarren June 23, 2025 13:18
Copilot finished work on behalf of 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 IEvangelist and a team as code owners June 24, 2025 16:54
@gewarren gewarren enabled auto-merge (squash) June 27, 2025 17:46
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
2 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy