From 7757dc4f48e62f9d8a00750e9516d0fcbe814f59 Mon Sep 17 00:00:00 2001 From: Dean Ellis Date: Mon, 26 Sep 2016 17:08:11 +0100 Subject: [PATCH] [Xamarin.Android.Build.Tasks] Enabling in some projects causes `classes.dex` to not deploy to device. Context https://bugzilla.xamarin.com/show_bug.cgi?id=44633 For some bizzare reason when running a build vs XS the AfterTargets are NOT being called for _CompileDex. As a result the targets that need to be called to support debugging are not being run. This commit adds a bunch of new property extension points which will allow the debugging targets to inject the additonal target requirements directly rather than relying on Before/After targets. --- .../Xamarin.Android.Common.targets | 33 ++++++++++++------- 1 file changed, 22 insertions(+), 11 deletions(-) diff --git a/src/Xamarin.Android.Build.Tasks/Xamarin.Android.Common.targets b/src/Xamarin.Android.Build.Tasks/Xamarin.Android.Common.targets index d6891a9f95e..eae8eff6973 100755 --- a/src/Xamarin.Android.Build.Tasks/Xamarin.Android.Common.targets +++ b/src/Xamarin.Android.Build.Tasks/Xamarin.Android.Common.targets @@ -361,6 +361,7 @@ Copyright (C) 2011-2012 Xamarin. All rights reserved. - + @@ -537,7 +538,7 @@ Copyright (C) 2011-2012 Xamarin. All rights reserved. + DependsOnTargets="$(_OnResolveMonoAndroidSdks)"> @@ -607,7 +608,7 @@ Copyright (C) 2011-2012 Xamarin. All rights reserved. - + android.support.multidex.MultiDexApplication android.app.Application @@ -615,6 +616,14 @@ Copyright (C) 2011-2012 Xamarin. All rights reserved. + + + <_OnResolveMonoAndroidSdks> + _ResolveMonoAndroidSdks + ;$(_AfterResolveMonoAndroidSdks) + + + @@ -2430,7 +2441,7 @@ because xbuild doesn't support framework reference assemblies. <_BuildApkDependsOnTargets> Build - ;_ResolveMonoAndroidSdks + ;$(_OnResolveMonoAndroidSdks) ;_ValidateAndroidPackageProperties ;_BuildApkEmbed