Skip to content

XAAMP7024 - Build error due to IOException in AssemblyModifierPipeline #11022

Closed

Description

@molesmoke

Android framework version

net10.0-android

Affected platform version

.NET 10.0.201

Description

When trying to build an Android MAUI app in a Windows container, the build fails with an IOException from AssemblyModifierPipeline

Steps to Reproduce

I will try and come up with a minimal repro, but I note that the SourceFiles parameter to AssemblyModifierPipeline includes duplicate entries, and it appears to perform write operations on files in the .nuget/packages directory e.g.

D:\.nuget\packages\microsoft.maui.controls.core\10.0.50\lib\net10.0-android36.0\ar\Microsoft.Maui.Controls.resources.dll
D:\.nuget\packages\microsoft.maui.controls.core\10.0.50\lib\net10.0-android36.0\ar\Microsoft.Maui.Controls.resources.dll

File.SetLastWriteTimeUtc (destination.ItemSpec, DateTime.UtcNow);

Inspecting those files does show that the file access times are indeed being modified.

Did you find any workaround?

Building on the host works OK, but not in a container.

Relevant log output

C:\Program Files\dotnet\packs\Microsoft.Android.Sdk.Windows\36.1.30\tools\Xamarin.Android.Common.targets(1501,3): error XAAMP7024: The file is locked by: "MSBuild.exe (3028)".
System.IO.IOException: The process cannot access the file 'C:\Users\ContainerUser\.nuget\packages\microsoft.maui.controls.core\10.0.50\lib\net10.0-android36.0\ar\Microsoft.Maui.Controls.resources.dll' because it is being used by another process.
   at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
   at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
   at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize)
   at System.IO.File.OpenFile(String path, FileAccess access, SafeFileHandle& handle)
   at System.IO.File.SetLastWriteTimeUtc(String path, DateTime lastWriteTimeUtc)
   at Xamarin.Android.Tasks.SaveChangedAssemblyStep.ProcessAssembly(AssemblyDefinition assembly, StepContext context)
   at Xamarin.Android.Tasks.AssemblyPipeline.Run(AssemblyDefinition assembly, StepContext context)
   at Xamarin.Android.Tasks.AssemblyModifierPipeline.RunTask()
   at Microsoft.Android.Build.Tasks.AndroidTask.Execute() [C:\src\project\App.csproj]

Activity

  1. added
    Area: App+Library Build
    needs-triage
    on Mar 26, 2026
  2. jeremy-visionaid commented on Jun 19, 2026

    @jeremy-visionaid

    I'm seeing this when building multiple MAUI apps in parallel, but it seems like a collision is also possible just building sequentially. Either way, the build shouldn't be modifying files in the .nuget directory.

  3. changed the title [-]IOException in AssemblyModifierPipeline[/-] [+]XAAMP7024 - Build error due to IOException in AssemblyModifierPipeline[/+] on Jun 19, 2026
  4. added this to the .NET 11 milestone on Aug 13, 2026
  5. added a commit that references this issue on Aug 20, 2026
    66d3f74
  6. locked and limited conversation to collaborators on Sep 20, 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

    Area: App+Library Buildneeds-triage

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions