dotnet / dotnet/msbuild

[Flaky Test] Microsoft.Build.Engine.UnitTests.MSBuildTaskHostTests.CompileNet35WinFormsApp

Open
#13,933 4 comments 0 reactions 0 assignees View on GitHub
flaky-test
Dominant language
C#
Stars
5.5k
Forks
1.5k
Avg merge
1d 8h
Merged PRs (30d)
141

Description

**Flaky test detected** by automated CI scan (14-day window, 3+ independent evidence sources).

## Evidence

- **Distinct sources:** 3 (1 PR + 2 rolling `main` builds)
- **PR:** [#13825](https://github.com/dotnet/msbuild/pull/13825)
- **Rolling builds:** 1437213, 1445319
- **Legs / TFMs:** FullOnWindows Release / net472
- **Assembly:** `Microsoft.Build.Engine.UnitTests`
- **First seen:** 2026-05-25 | **Last seen:** 2026-06-02
- **Error signatures:** 3 distinct (fc2e13bf, a48b74ff, b53aad1a) — multiple signatures strongly confirm flakiness
- **Sample build:** https://dev.azure.com/dnceng-public/public/_build/results?buildId=1434027

## Sample error

```
System.TimeoutException : Test failed due to timeout: process 4640 is active for more than 30 sec.
```

## Fix guidance

The test times out intermittently (30 sec timeout) when launching a .NET 3.5 WinForms app compilation via the MSBuild task host. Multiple distinct error signatures confirm non-determinism. Root cause likely involves task host process lifecycle and is non-trivial to fix without environment access. Quarantine with:

```csharp
[ActiveIssue("https://github.com/dotnet/msbuild/issues/")]
[Fact]
public void CompileNet35WinFormsApp() { ... }
```

(`ActiveIssue` is from `Microsoft.DotNet.XUnitV3Extensions`, namespace `Xunit` — **not** `[Fact(Skip=...)]`)

> [!WARNING]
>
> Firewall blocked 1 domain
>
> The following domain was blocked by the firewall during workflow execution:
>
> - `dnceng.pkgs.visualstudio.com`
>> To allow these domains, add them to the `network.allowed` list in your workflow frontmatter:
>
> ```yaml
> network:
> allowed:
> - defaults
> - "dnceng.pkgs.visualstudio.com"
> ```
>
> See [Network Configuration](https://github.github.com/gh-aw/reference/network/) for more information.
>
>

> Generated by [Flaky Test Triage and Fix](https://github.com/dotnet/msbuild/actions/runs/26877237491) · sonnet46 4.9M · [◷](https://github.com/search?q=repo%3Adotnet%2Fmsbuild+is%3Aissue+%22gh-aw-workflow-call-id%3A+dotnet%2Fmsbuild%2Fflaky-test-detector.agent%22&type=issues)

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.