Skip to content

Tests are not running in PR validation #16535

@MichaelSimons

Description

@MichaelSimons

Problem

Commit e5101e573 ("[main] Source code updates from dotnet/dotnet") introduced a regression that silently broke Helix test submission. It made two changes simultaneously:

  1. Added Sdk="Microsoft.Build.NoTargets" to UnitTests.proj — This SDK imports its targets at the very end of the project, after the explicit Helix SDK imports. This means Directory.Build.targets → Arcade's Tests.targets defines a Test target last, overriding the Helix SDK's Test target (last definition wins in MSBuild).

  2. Refactored the Helix SDK's Microsoft.DotNet.Helix.Sdk.targets — Moved TestDependsOn, BeforeTest, AfterTest, and the Test target definition from inline into NoBuild.targets, which is conditionally skipped when UsingMicrosoftNoTargetsSdk=true.

The result: Arcade's Tests.targets Test target (conditioned on IsUnitTestProject=true, which is false for this project) silently replaced the Helix SDK's Test target. The Test target became a no-op — no Helix jobs were ever submitted. The build reported success with zero tests run.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions