From 6e3ed774f028f6c986edc4fd2a21ff1e1dabee4f Mon Sep 17 00:00:00 2001 From: Dean Ellis Date: Wed, 14 Feb 2018 11:04:46 +0000 Subject: [PATCH] [Xamarin.Android.Build.Tasks] GetAndroidDependencies should call _SetLatestTargetFrameworkVersion This is a bug in the `` target. It does not call `MonoAndroidHelper.RefreshSupportedVersions`. As a result if called directly it will generate a Null Reference exception because `MonoAndroidHelper.SupportedVersions` will be null. So we should be dependent on `<_SetLatestTargetFrameworkVersion/>`. This will initialize the `MonoAndroidHelper.SupportedVersions`. But it will also resolve the correct `TargetFrameworkVersion` if the user is using `AndroidUseLatestPlatformSdk`. --- src/Xamarin.Android.Build.Tasks/Xamarin.Android.Common.targets | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Xamarin.Android.Build.Tasks/Xamarin.Android.Common.targets b/src/Xamarin.Android.Build.Tasks/Xamarin.Android.Common.targets index 9bf713e2e86..14530962802 100755 --- a/src/Xamarin.Android.Build.Tasks/Xamarin.Android.Common.targets +++ b/src/Xamarin.Android.Build.Tasks/Xamarin.Android.Common.targets @@ -2770,7 +2770,7 @@ because xbuild doesn't support framework reference assemblies. - + <_ProjectAndroidManifest>$(ProjectDir)$(AndroidManifest) <_NdkRequired Condition="'$(BundleAssemblies)' == 'True' Or '$(AotAssemblies)' == 'True'">true