From a499f0b0dc65154ceb6a94563469a4323a11525c Mon Sep 17 00:00:00 2001 From: Jonathan Peppers Date: Wed, 2 Oct 2024 09:02:14 -0500 Subject: [PATCH] [Xamarin.Android.Build.Tasks] move `Console.WriteLine()` messages to MSBuild log MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When running builds at the command-line (with the default, new "MSBuild Terminal Logger"), `Console.WriteLine()` output can make the text not look so great: > dotnet build -c Release -bl Restore complete (0.6s) You are using a preview version of .NET. See: https://aka.ms/dotnet-support-policy hellomaui _BuildApkEmbed (18.9s) Number of descriptors: 116; index entries: 232 hellomaui succeeded (33.3s) → bin\Release\net9.0-android\android-arm64\hellomaui.dll Build succeeded in 46.8s The message `Number of descriptors: 116; index entries: 232` appears, but so does another one. You can watch the terminal logger clear and rewrite messages, which is not ideal. Let's move these to the MSBuild logger, so they will show up in `.binlog` files, but not in the console output. --- .../Utilities/AssemblyStoreGenerator.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Xamarin.Android.Build.Tasks/Utilities/AssemblyStoreGenerator.cs b/src/Xamarin.Android.Build.Tasks/Utilities/AssemblyStoreGenerator.cs index 010b607f0c7..896c17e43c3 100644 --- a/src/Xamarin.Android.Build.Tasks/Utilities/AssemblyStoreGenerator.cs +++ b/src/Xamarin.Android.Build.Tasks/Utilities/AssemblyStoreGenerator.cs @@ -149,15 +149,15 @@ string Generate (string baseOutputDirectory, AndroidTargetArch arch, List