diff --git a/src/Xamarin.Android.Build.Tasks/Microsoft.Android.Sdk/targets/Microsoft.Android.Sdk.NativeAOT.targets b/src/Xamarin.Android.Build.Tasks/Microsoft.Android.Sdk/targets/Microsoft.Android.Sdk.NativeAOT.targets index 14eb57c1134..a356e2fe0a6 100644 --- a/src/Xamarin.Android.Build.Tasks/Microsoft.Android.Sdk/targets/Microsoft.Android.Sdk.NativeAOT.targets +++ b/src/Xamarin.Android.Build.Tasks/Microsoft.Android.Sdk/targets/Microsoft.Android.Sdk.NativeAOT.targets @@ -47,7 +47,7 @@ This file contains the NativeAOT-specific MSBuild logic for .NET for Android. - + _AndroidBeforeIlcCompile; SetupOSSpecificProps; @@ -57,10 +57,22 @@ This file contains the NativeAOT-specific MSBuild logic for .NET for Android. _AndroidComputeIlcCompileInputs; $(IlcCompileDependsOn) + <_AndroidBeforeIlcCompileDependsOn>_PrepareLinking + + + + + _AndroidBeforeIlcCompile; + SetupOSSpecificProps; + ComputeIlcCompileInputs; + _AndroidComputeIlcCompileInputs; + $(IlcCompileDependsOn) + + <_AndroidBeforeIlcCompileDependsOn>_CreatePropertiesCache @@ -110,7 +122,10 @@ This file contains the NativeAOT-specific MSBuild logic for .NET for Android. false + + + true $(_OriginalSuppressTrimAnalysisWarnings) @@ -137,26 +152,27 @@ This file contains the NativeAOT-specific MSBuild logic for .NET for Android. - - <_IlcManagedInputAssemblies Remove="@(_IlcManagedInputAssemblies)" /> - - - - - <_AndroidILLinkAssemblies Include="@(ManagedAssemblyToLink->'$(IntermediateLinkDir)%(Filename)%(Extension)')" Condition="Exists('$(IntermediateLinkDir)%(Filename)%(Extension)')" /> - + + + <_IlcManagedInputAssemblies Remove="@(_IlcManagedInputAssemblies)" /> + + + + + - - + <_AndroidILLinkAssemblies Include="@(ManagedAssemblyToLink->'$(IntermediateLinkDir)%(Filename)%(Extension)')" Condition="Exists('$(IntermediateLinkDir)%(Filename)%(Extension)')" /> - - + + + @@ -265,9 +281,13 @@ This file contains the NativeAOT-specific MSBuild logic for .NET for Android. Restore the old scheduling so NativeCompile runs after ComputeResolvedFilesToPublishList in the inner per-RID build. --> + + <_AndroidRunNativeCompileDependsOn Condition=" '$(_AndroidTypeMapImplementation)' != 'trimmable' ">_PreTrimmingFixLegacyDesignerUpdateItems;NativeCompile + <_AndroidRunNativeCompileDependsOn Condition=" '$(_AndroidTypeMapImplementation)' == 'trimmable' ">NativeCompile + + DependsOnTargets="$(_AndroidRunNativeCompileDependsOn)" />