Generator snapshot test builds warn that Verify cannot choose among solution files

Closed Beginner friendly
#7,419 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

A pull request for this has already been merged.

  • #7488 by @thomhurst — merged

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
72/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
csharp
Domain
testing

Research direction

Start with the test project file tests/TUnit.Core.SourceGenerator.Tests, where the Verify solution properties would be set. Reproduce by running dotnet test on that project and confirm the warning about TUnit.CI.slnx, TUnit.Dev.slnx and TUnit.slnx appears. Done when the build no longer emits the Verify solution-discovery warning and the snapshot tests still pass.

Written by the indexing model from the issue text.

Description

bug P3

Summary

Building the core source generator snapshot tests emits a Verify warning because it discovers three solution files and cannot choose a solution directory or name. Configure these properties explicitly so routine test builds do not emit this warning.

Reproduction

At ca4437c718, with .NET SDK 10.0.403 on macOS arm64, run:

dotnet test --project tests/TUnit.Core.SourceGenerator.Tests --framework net10.0

Expected and actual

Expected: Verify can identify the solution context without warnings.

Actual: Verify 33.3.4's buildTransitive/Verify.props reports that TUnit.CI.slnx, TUnit.Dev.slnx and TUnit.slnx make solution discovery ambiguous. It recommends setting SolutionDir and SolutionName explicitly.

Please configure the test build's Verify solution context.

Dominant language
C#
Stars
4k
Forks
139
Avg merge
8h 17m
Merged PRs (30d)
325

Getting set up

Open in Codespaces

Starts the project's dev container in your browser, under your own GitHub account.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from thomhurst/TUnit

All issues in thomhurst/TUnit

Similar issues

More C# issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.