Skip to content

After a local consumer smoke test, dotnet test --no-build runs no tests and exits 0 #539

Open

Description

@CaffeinatedCoder

Problem

After ./test/consumer-smoke-test.sh has run locally in its own-feed mode, dotnet test <project> --no-build in the repository prints nothing, runs no test and exits 0, until the next dotnet build or dotnet restore.

A run that reports success without running anything is the kind of result this repository's rules exist to prevent: a fix "verified" in that state was not verified.

Measured (2026-11-11, macOS arm64, SDK 11.0.100)

  • After the smoke test, test/CodoMetis.ValueRanges.Conventions.Tests/obj/*.nuget.g.props holds NuGetPackageRoot = /var/folders/…/tmp.5v6t1kfUEf/packages. That is the private NUGET_PACKAGES folder the script restores into, and its cleanup has deleted it.
  • dotnet test test/CodoMetis.ValueRanges.Conventions.Tests -c Release --no-build: no output, exit 0. With -v n: "Build succeeded", 0.16 s. With and without --filter.
  • After dotnet build -c Release, the property is ~/.nuget/packages/ again and the same command reports Passed: 421.

So the test project's package imports (MSTest's props and targets among them) point at a folder that no longer exists, the project stops being a test project for that invocation, and the VSTest target has nothing to do.

CI is not affected: every job is a fresh checkout, and nothing runs dotnet test after the smoke test in the same job. release.yml's verify job runs the smoke test against dist, where the script packs nothing.

Options

  1. The script restores the repository's projects again in its cleanup, with the caller's NUGET_PACKAGES.
  2. The script packs from a copy or an exported tree, so the repository's obj folders are never restored against the private folder.
  3. At least: the script's last line says that the checkout needs a dotnet restore before --no-build is used.

Done when

dotnet test --no-build after a local smoke run either runs the tests or fails loudly, and a test or a line in the script holds that.

Activity

  1. added
    testsAdds or changes tests only (oracles, harnesses); no library code
    area/releaseVersioning, changelogs, release wiring
    on Nov 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/releaseVersioning, changelogs, release wiringtestsAdds or changes tests only (oracles, harnesses); no library code

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions