Repository navigation
Description
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]
- Failure occurs sometimes only and is not easy to reproduce manually.
- One example recent failure: 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
Planned investigation/fix steps:
- Review all pipeline logs for similar errors in the past to look for patterns.
- Audit all places in the build pipeline and tasks where access to this file occurs.
- Check for parallel build steps causing file lock or unintentional concurrency.
- Add temporary logging around file usage to pinpoint concurrent access if possible.
- If possible, try to reproduce locally with "dotnet build" in CI-like environments (Windows agents).
- Attempt simple mitigations, such as retry logic or ensuring tasks are sequenced correctly.
- 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.
- Run CI build in Azure DevOps.
- 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