Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GenerateToolsSettingsFile races to write DotnetToolSettings.xml in parallel MTFM builds. #47696

Open
peterwald opened this issue Mar 18, 2025 · 0 comments
Labels
Area-NetSDK untriaged Request triage from a team member

Comments

@peterwald
Copy link
Member

Describe the bug

This seems to be a flaky build error caused by the fact the GenerateToolsSettingsFile task writes to the DotnetToolSettings.xml file simultaneously from multiple parallel builds.

##[error].dotnet\sdk\10.0.100-preview.3.25125.5\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.PackTool.targets(98,5): error MSB4018: (NETCORE_ENGINEERING_TELEMETRY=Build) The "GenerateToolsSettingsFile" task failed unexpectedly. System.IO.IOException: The process cannot access the file 'D:\a\_work\1\s\artifacts\obj\Microsoft.Extensions.AI.Evaluation.Console\DotnetToolSettings.xml' because it is being used by another process.

To Reproduce

Here is an example of the error happening in a build pipeline. In this case we have a dotnet tool package being built with 3 TargetFrameworks (net8, net9, net10) and it fails pretty regularly trying to access the file.

Exceptions (if any)

System.IO.IOException: The process cannot access the file 'D:\a\_work\1\s\artifacts\obj\Microsoft.Extensions.AI.Evaluation.Console\DotnetToolSettings.xml' because it is being used by another process.

Further technical details

  • This is happening in a linked Azure DevOps pipeline.
  • The version of the SDK is 10.0.100-preview.3.25125.5.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-NetSDK untriaged Request triage from a team member
Projects
None yet
Development

No branches or pull requests

1 participant