Summary
The Microsoft.DotNet.Cli.Run.Tests.RunFileTests_* tests (file-based program / dotnet run & dotnet build <file>.cs) fail intermittently in CI. They are not associated with any particular PR — they fail across unrelated PR merge builds and on otherwise-clean changes.
Affected tests (non-exhaustive)
RunFileTests_BuildCommands.Build_Library_MultiTarget
RunFileTests_BuildCommands.Build_Exe_MultiTarget
RunFileTests_BuildCommands.Pack / Pack_CustomPath
RunFileTests_BuildCommands.NoBuild_02
RunFileTests_CscOnlyAndApi.MSBuildGet_Consistent
Symptom
The generated file-based-program project is restored and then immediately reported missing:
<tmp>/Build_Library---XXXX/lib.cs.csproj : error MSB4025: The project file could not be loaded. Could not find file '<tmp>/Build_Library---XXXX/lib.cs.csproj'.
i.e. a race between generating/restoring the implicit *.cs.csproj and loading it (also seen as No such file or directory for the generated program, MSB4104). The failures are non-deterministic and clear on re-run.
Impact
This is currently the dominant source of red CI on the MSTest-migration PR series and on unrelated PRs (observed in the majority of recent PR builds).
Known issue error message
{
"ErrorMessage": "Microsoft.DotNet.Cli.Run.Tests.RunFileTests",
"BuildRetry": false
}
Known issue validation
Build: 🔎
Result validation: ⚠️ Validation could not be done without an Azure DevOps build URL on the issue. Please add it to the "Build: 🔎" line.
Validation performed at: 6/17/2026 11:43:32 AM UTC
Summary
The
Microsoft.DotNet.Cli.Run.Tests.RunFileTests_*tests (file-based program /dotnet run&dotnet build <file>.cs) fail intermittently in CI. They are not associated with any particular PR — they fail across unrelated PR merge builds and on otherwise-clean changes.Affected tests (non-exhaustive)
RunFileTests_BuildCommands.Build_Library_MultiTargetRunFileTests_BuildCommands.Build_Exe_MultiTargetRunFileTests_BuildCommands.Pack/Pack_CustomPathRunFileTests_BuildCommands.NoBuild_02RunFileTests_CscOnlyAndApi.MSBuildGet_ConsistentSymptom
The generated file-based-program project is restored and then immediately reported missing:
i.e. a race between generating/restoring the implicit
*.cs.csprojand loading it (also seen asNo such file or directoryfor the generated program, MSB4104). The failures are non-deterministic and clear on re-run.Impact
This is currently the dominant source of red CI on the MSTest-migration PR series and on unrelated PRs (observed in the majority of recent PR builds).
Known issue error message
{ "ErrorMessage": "Microsoft.DotNet.Cli.Run.Tests.RunFileTests", "BuildRetry": false }Known issue validation
Build: 🔎⚠️ Validation could not be done without an Azure DevOps build URL on the issue. Please add it to the "Build: 🔎" line.
Result validation:
Validation performed at: 6/17/2026 11:43:32 AM UTC