Skip to content

Intermittent CI Failure: File Access Issue During Build (.NET MAUI Resizetizer Task) #32472

Closed as not planned

Description

@rmarinho

Description

Intermittent CI failure during the build pipeline involving access to the file 'Microsoft.Maui.Resizetizer.After.targets'.

Example error log:

C:\a_work\1\s.dotnet\sdk\10.0.100\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.targets(1510,3): error MSB4024: The imported project file "C:\a_work\1\s.buildtasks\Microsoft.Maui.Resizetizer.After.targets" could not be loaded. The process cannot access the file 'C:\a_work\1\s.buildtasks\Microsoft.Maui.Resizetizer.After.targets' because it is being used by another process. [C:\a_work\1\s\src\Controls\samples\Controls.Sample\Maui.Controls.Sample.csproj]

Planned investigation/fix steps:

  1. Review all pipeline logs for similar errors in the past to look for patterns.
  2. Audit all places in the build pipeline and tasks where access to this file occurs.
  3. Check for parallel build steps causing file lock or unintentional concurrency.
  4. Add temporary logging around file usage to pinpoint concurrent access if possible.
  5. If possible, try to reproduce locally with "dotnet build" in CI-like environments (Windows agents).
  6. Attempt simple mitigations, such as retry logic or ensuring tasks are sequenced correctly.
  7. Document all findings in this issue.

If anyone finds workarounds or additional examples, please comment below.

Steps to Reproduce

Occurs occasionally in CI on Windows Azure DevOps agents, not easy to reproduce manually.

  1. Run CI build in Azure DevOps.
  2. Observe failure (see link above for example log).

Expected:
Build passes and all tasks complete.
Actual:
"Could not access file because it is being used by another process" error appears and build fails on Resizetizer task.

Link to public reproduction project repository

No response

Version with bug

10.0.0-rc.2

Is this a regression from previous behavior?

No, this is something new

Last version that worked well

Unknown/Other

Affected platforms

Windows

Affected platform versions

Azure DevOps Windows agent, C:\a_work\1\s environment.

Did you find any workaround?

No stable workaround identified. Retry builds may succeed. Adding logging or sequencing of tasks may help identify the cause.

Relevant log output

C:\a\_work\1\s\.dotnet\sdk\10.0.100\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.targets(1510,3): error MSB4024: The imported project file "C:\a\_work\1\s\.buildtasks\Microsoft.Maui.Resizetizer.After.targets" could not be loaded. The process cannot access the file 'C:\a\_work\1\s\.buildtasks\Microsoft.Maui.Resizetizer.After.targets' because it is being used by another process. [C:\a\_work\1\s\src\Controls\samples\Controls.Sample\Maui.Controls.Sample.csproj]

Full log example: https://dev.azure.com/xamarin/public/public%20Team/_build/results?buildId=153523&view=logs&j=5239058e-6f59-5db5-6c0e-6f79eefcd049&t=1d76776d-0a4a-5882-a083-d900bff0e27b&l=12725

Activity

  1. added theissue type on Nov 10, 2025
  2. added
    t/bug
    area-infrastructure
    on Nov 10, 2025
  3. added
    s/triaged
    on Nov 10, 2025
  4. added this to the .NET 10 Servicing milestone on Nov 10, 2025
  5. locked and limited conversation to collaborators on Jul 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Known Build Errorarea-infrastructurebuilds/triagedt/bug

    Type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions