Skip to content

Fix solution setup order in C# testing tutorials - #56764

Merged
BillWagner merged 1 commit into
mainfrom
dev/amauryleve/solution-setup-step
Nov 5, 2026
Merged

BillWagner merged 1 commit into
mainfrom
dev/amauryleve/solution-setup-step

Conversation

@Evangelink

@Evangelink Evangelink commented Nov 5, 2026 •

Copy link
Copy Markdown
Member

Summary

Because dotnet new classlib doesn't add the project to the solution, readers who use Visual Studio can't rename or edit Class1.cs in Solution Explorer at the original point in these tutorials.

Move the class-library solution-add step before the source-file edits in the C# xUnit, NUnit, and MSTest tutorials, clarify the file location, and align the xUnit command summary. Sample code and metadata are unchanged.

Validation: the corrected setup sequence and dotnet build --no-restore --verbosity quiet passed with .NET SDKs 8.0.427 and 10.0.403. Solution membership was confirmed before the rename. Ordering assertions, Markdownlint-cli2 on all three changed files (zero issues), and git diff --check passed.

Fixes #41305


Internal previews

File Preview link
docs/core/testing/unit-testing-csharp-with-mstest.md Learn preview
docs/core/testing/unit-testing-csharp-with-nunit.md Learn preview
docs/core/testing/unit-testing-csharp-with-xunit.md Learn preview

Build report

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@Evangelink
Evangelink requested review from a team and BillWagner as code owners November 5, 2026 16:32
Copilot AI balanced review requested due to automatic review settings November 5, 2026 16:32
@dotnetrepoman dotnetrepoman Bot added this to the November 2026 milestone Nov 5, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

There are no active review issues for the tutorial setup-order changes.

No open issues 🎉

What changed in this PR

Corrects the setup order in three C# testing tutorials to address #41305: readers add the class library to the solution before they rename or edit its source file in Visual Studio.

Changes:

  • Moves the solution-add step before source-file edits in the xUnit, NUnit, and MSTest tutorials.
  • Clarifies that Class1.cs resides in the PrimeService directory.
  • Aligns the xUnit command summary with the corrected sequence. Sample code and metadata remain unchanged.
File Description
docs/​core/​testing/​unit-testing-csharp-with-xunit.md Reorders setup steps and command summary, and clarifies the source-file location.
docs/​core/​testing/​unit-testing-csharp-with-nunit.md Moves solution registration before source edits and clarifies the file location.
docs/​core/​testing/​unit-testing-csharp-with-mstest.md Separates project creation from source edits and adds the project to the solution first.

Review effort: Balanced

@Evangelink
Evangelink enabled auto-merge (squash) November 5, 2026 16:36

@BillWagner BillWagner 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.

This LGTM and I'll :shipit: now.

@BillWagner
BillWagner disabled auto-merge November 5, 2026 16:46
@BillWagner
BillWagner enabled auto-merge (squash) November 5, 2026 16:46
@BillWagner

Copy link
Copy Markdown
Member

closing and reopening to trigger a build

@BillWagner BillWagner closed this Nov 5, 2026
auto-merge was automatically disabled November 5, 2026 16:46

Pull request was closed

@BillWagner BillWagner reopened this Nov 5, 2026
@BillWagner
BillWagner merged commit 39aec17 into main Nov 5, 2026
23 of 24 checks passed
@BillWagner
BillWagner deleted the dev/amauryleve/solution-setup-step branch November 5, 2026 16:58
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.

Missing step in 'Create the solution'

4 participants