From cc400b689e2721e7272fb912d9f9ad35a19bad46 Mon Sep 17 00:00:00 2001 From: Jonathan Peppers Date: Tue, 28 Feb 2023 11:59:44 -0600 Subject: [PATCH 1/2] [Xamarin.Android.Build.Tasks] guard `AutoImport.props` against empty values There is an email thread about ASP.NET projects in VS -- and something is potentially slowing down builds when optional workloads are installed. One concern is our `AutoImport.props`, take for instance the following `foo.targets` file: In this case `$(MonoAndroidResourcePrefix)` and `$(MonoAndroidAssetsPrefix)` will be blank, and we get: msbuild foo.targets -bl ... MSBUILD : warning MSB5029: The value "\**\.*\**" of the "Exclude" attribute in element in file "foo.targets (13,61)" is a wildcard that results in enumerating all files on the drive, which was likely not intended. Check that referenced properties are always defined. 1 Warning(s) 0 Error(s) Time Elapsed 00:02:45.14 I'm not sure this is causing an actual problem, but I think it's a good idea to add some safety here. I will make a similar change in Xamarin.Legacy.Sdk. --- .../Microsoft.Android.Sdk/Sdk/AutoImport.props | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/Xamarin.Android.Build.Tasks/Microsoft.Android.Sdk/Sdk/AutoImport.props b/src/Xamarin.Android.Build.Tasks/Microsoft.Android.Sdk/Sdk/AutoImport.props index 6d9352695f6..347af6377f6 100644 --- a/src/Xamarin.Android.Build.Tasks/Microsoft.Android.Sdk/Sdk/AutoImport.props +++ b/src/Xamarin.Android.Build.Tasks/Microsoft.Android.Sdk/Sdk/AutoImport.props @@ -22,7 +22,7 @@ https://github.com/dotnet/designs/blob/4703666296f5e59964961464c25807c727282cae/ - + @@ -35,8 +35,14 @@ https://github.com/dotnet/designs/blob/4703666296f5e59964961464c25807c727282cae/ + + + + + + From 89880c3ae0fe27ee1e06ba6fb4fbbbb497669165 Mon Sep 17 00:00:00 2001 From: Jonathan Peppers Date: Wed, 1 Mar 2023 21:16:06 -0600 Subject: [PATCH 2/2] Indentation --- .../Microsoft.Android.Sdk/Sdk/AutoImport.props | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/Xamarin.Android.Build.Tasks/Microsoft.Android.Sdk/Sdk/AutoImport.props b/src/Xamarin.Android.Build.Tasks/Microsoft.Android.Sdk/Sdk/AutoImport.props index 347af6377f6..7bde84e8ee2 100644 --- a/src/Xamarin.Android.Build.Tasks/Microsoft.Android.Sdk/Sdk/AutoImport.props +++ b/src/Xamarin.Android.Build.Tasks/Microsoft.Android.Sdk/Sdk/AutoImport.props @@ -22,7 +22,9 @@ https://github.com/dotnet/designs/blob/4703666296f5e59964961464c25807c727282cae/ - + @@ -37,12 +39,15 @@ https://github.com/dotnet/designs/blob/4703666296f5e59964961464c25807c727282cae/ - + - +