From 9eaca87e72d90c219948e05596e8d1d980649417 Mon Sep 17 00:00:00 2001 From: Jonathan Peppers Date: Tue, 19 Nov 2024 21:24:24 -0600 Subject: [PATCH 1/4] [Xamarin.Android.Build.Tasks] close `XAAssemblyResolvers` Context: https://discord.com/channels/732297728826277939/732297916680765551/1308554103206580244 Fixes: https://github.com/dotnet/android/issues/9133 Context: 86260ed3 Various customers have been reporting `UnauthorizedAccessExceptions` in incremental builds, which seems to be a new problem in .NET 9. We were not able to reproduce the issue locally, but with the number of reports it seems to be a real issue. One customer shared a `MSBuild.dmp` file (while the file was locked), where I could observe the objects in memory: MemoryMappedViewStream 132 Mono.Cecil.PE.Image 100 Mono.Cecil.ModuleDefinition 100 Mono.Cecil.TypeDefinition 100 Mono.Cecil.TypeDefinition[] 100 List 1 Xamarin.Android.Tasks.NativeCodeGenState [Static variable Xamarin.Android.Tasks.NativeCodeGenState.