From 20123b569151eea9faaa859de902ca9b09a17a5d Mon Sep 17 00:00:00 2001 From: Dean Ellis Date: Wed, 31 Jan 2018 20:34:20 +0000 Subject: [PATCH] [Xamarin.Android.Build.Tasks] Stop IncrementalClean removing assemblies. (#1255) Fixes: https://github.com/xamarin/xamarin-android/issues/1164 Fixes: https://bugzilla.xamarin.com/show_bug.cgi?id=61108 The `IncrementalClean` target basically deletes a ton of stuff if it's not in the `@(FileWrites)` group. Under certain conditons this include assemblies in `$(OutDir)`. It mainly effects projects which use a shared `$(OutDir)`. So if a third level dependency is copied to the `$(OutDir)` but is not referenced by the main app project we end up with the `IncrementalClean` target deleting the file. This then breaks packaging since we expect the file to exist. This causes problems with TFS because it seems to ALWAYS use a shared `$(OutDir)`. To work around this problem we just need to tell the `IncrementalClean` target to ignore any dll in the `$(OutDir)`. Since we already have a target in place to handle this we can just expand the list of files it should be ignoring. --- .../ImportAfter/Xamarin.Android.Windows.targets | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Xamarin.Android.Build.Tasks/MSBuild/Xamarin/Android/Xamarin.Android.Common/ImportAfter/Xamarin.Android.Windows.targets b/src/Xamarin.Android.Build.Tasks/MSBuild/Xamarin/Android/Xamarin.Android.Common/ImportAfter/Xamarin.Android.Windows.targets index 0134033df..7902eedd7 100644 --- a/src/Xamarin.Android.Build.Tasks/MSBuild/Xamarin/Android/Xamarin.Android.Common/ImportAfter/Xamarin.Android.Windows.targets +++ b/src/Xamarin.Android.Build.Tasks/MSBuild/Xamarin/Android/Xamarin.Android.Common/ImportAfter/Xamarin.Android.Windows.targets @@ -11,16 +11,16 @@ Copyright (C) 2014 Xamarin. All rights reserved. Xamarin + <_IsRunningXBuild Condition=" '$(MSBuildRuntimeVersion)' == '' ">true - - - - + + + + -