Repository navigation
Flaky test failure: msbuild.binlog file lock (IOException: being used by another process) #54817
Description
Build Information
Build: https://dev.azure.com/dnceng-public/cbb18261-c48f-4abb-8651-8cdcb5474649/_build/results?buildId=1467980
Build error leg or test failing: Various tests (file lock on msbuild.binlog during test execution)
Pull request: #54729
Error Message
DO NOT USE JSON BELOW IF THIS IS A BUILD BREAK otherwise build analysis will allow pull requests to merge that break the build worse. For a build break, do not use this issue form. Make a regular new issue.
Fill the error message using step by step known issues guidance.
{
"ErrorMessage": "",
"ErrorPattern": "System\\.IO\\.IOException : The process cannot access the file '.*msbuild\\.binlog' because it is being used by another process\\.",
"BuildRetry": true,
"ExcludeConsoleLog": false
}Details
Error message
System.IO.IOException : The process cannot access the file '/datadisks/disk1/work/AA09096E/w/AEB00993/uploads/AEB00993-e-msbuild.binlog' because it is being used by another process.
Stack trace
at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize, UnixFileMode openPermissions, Int64& fileLength, UnixFileMode& filePermissions, Boolean failForSymlink, Boolean& wasSymlink, Func`4 createOpenException)
at System.IO.File.Copy(String sourceFileName, String destFileName, Boolean overwrite)
at Microsoft.NET.TestFramework.Commands.TestCommand.Execute(IEnumerable`1 args) in /_/test/Microsoft.NET.TestFramework/Commands/TestCommand.cs:line 227
at Microsoft.DotNet.Cli.Utils.ExponentialRetry.ExecuteAsyncWithRetry[T](Func`1 action, Func`2 shouldStopRetry, Int32 maxRetryCount, Func`1 timer, String taskDescription) in /_/src/Cli/Microsoft.DotNet.Cli.Utils/ExponentialRetry.cs:line 46
at Microsoft.DotNet.Cli.Utils.ExponentialRetry.ExecuteWithRetry[T](Func`1 action, Func`2 shouldStopRetry, Int32 maxRetryCount, Func`1 timer, String taskDescription) in /_/src/Cli/Microsoft.DotNet.Cli.Utils/ExponentialRetry.cs:line 68
at Microsoft.NET.TestFramework.Commands.TestCommand.Execute(String[] args) in /_/test/Microsoft.NET.TestFramework/Commands/TestCommand.cs:line 147
at Microsoft.NET.Publish.Tests.GivenThatWeWantToRunILLink1.ILLink_links_simple_app_without_analysis_warnings_and_it_runs(String targetFramework) in /_/test/Microsoft.NET.Publish.Tests/GivenThatWeWantToRunILLink.cs:line 134
at InvokeStub_GivenThatWeWantToRunILLink1.ILLink_links_simple_app_without_analysis_warnings_and_it_runs(Object, Span`1)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
Known issue validation
Build: 🔎 https://dev.azure.com/dnceng-public/public/_build/results?buildId=1467980
Error message validated: [System\.IO\.IOException : The process cannot access the file '/datadisks/disk1/work/.*-msbuild.binlog' because it is being used by another process\.]
Result validation: ✅ Known issue matched with the provided build.
Validation performed at: 6/17/2026 3:34:51 PM UTC
Report
| Build | Repository | Test | Pull Request |
|---|---|---|---|
| 1467980 | dotnet/sdk | Microsoft.NET.Publish.Tests.GivenThatWeWantToRunILLink1.ILLink_links_simple_app_without_analysis_warnings_and_it_runs | #54729 |
Summary
| 24-Hour Hit Count | 7-Day Hit Count | 1-Month Count |
|---|---|---|
| 1 | 1 | 1 |
Known issue validation
Build: 🔎 https://dev.azure.com/dnceng-public/public/_build/results?buildId=1467980
Error message validated: [System\.IO\.IOException : The process cannot access the file '/datadisks/disk1/work/.*-msbuild.binlog' because it is being used by another process\.]
Result validation: ✅ Known issue matched with the provided build.
Validation performed at: 6/17/2026 3:34:51 PM UTC
Known issue validation
Build: 🔎 https://dev.azure.com/dnceng-public/public/_build/results?buildId=1467980
Error message validated: [System\.IO\.IOException : The process cannot access the file '.*msbuild\.binlog' because it is being used by another process\.]
Result validation: ✅ Known issue matched with the provided build.
Validation performed at: 6/17/2026 7:16:45 PM UTC
Report
Summary
| 24-Hour Hit Count | 7-Day Hit Count | 1-Month Count |
|---|---|---|
| 5 | 5 | 5 |
Known issue validation
Build: 🔎 https://dev.azure.com/dnceng-public/public/_build/results?buildId=1467980
Error message validated: [System\.IO\.IOException : The process cannot access the file '/datadisks/disk1/work/.*-msbuild.binlog' because it is being used by another process\.]
Result validation: ✅ Known issue matched with the provided build.
Validation performed at: 6/17/2026 3:34:51 PM UTC
Known issue validation
Build: 🔎 https://dev.azure.com/dnceng-public/public/_build/results?buildId=1467980
Error message validated: [System\.IO\.IOException : The process cannot access the file '.*msbuild\.binlog' because it is being used by another process\.]
Result validation: ✅ Known issue matched with the provided build.
Validation performed at: 6/17/2026 7:16:45 PM UTC
Activity
[-]Test flakiness[/-][+]Test flakiness with Microsoft.NET.Publish.Tests.GivenThatWeWantToRunILLink1.ILLink_links_simple_app_without_analysis_warnings_and_it_runs[/+]github-actions commentedon Jun 17, 2026
This Known Build Error has had 0 hits in the past month and has been labeled
stale. It will be auto-closed in 7 days if the hit count remains at 0. Add thekeep-openlabel to prevent auto-closure.[-]Test flakiness with Microsoft.NET.Publish.Tests.GivenThatWeWantToRunILLink1.ILLink_links_simple_app_without_analysis_warnings_and_it_runs[/-][+]Flaky test failure: msbuild.binlog file lock (IOException: being used by another process)[/+]MichaelSimons commentedon Jun 17, 2026
Pattern Updated
Updated the Known Build Error pattern to cover both Linux and Windows paths:
Old pattern (Linux-only):
New pattern (cross-platform):
Other changes:
BuildRetrychanged fromfalsetotrue— this is a transient file lock issue that typically clears on retryTriggered by: Build 1468429 (PR #54804) — same IOException but on Windows (
C:\h\w\...\msbuild.binlog)Validation: