dotnet / android

.NET for Android provides open-source bindings of the Android SDK for use with .NET managed languages such as C#
MIT License
1.93k stars 525 forks source link

Deploy log is too verbose when set to Minimum #6770

Closed vsfeedback closed 2 years ago

vsfeedback commented 2 years ago

This issue has been moved from a ticket on Developer Community.


When I build a Xamarin.Android project when an APK is produced, the build output is full of information about what internal targets got skipped and many other things that I, as an app dev, don't really need to see. My MSBuild project build output verbosity is set to Minimal and the Xamarin Diagnostics output verbosity is set to the default Normal but I tried changing it to Minimal and Quiet with no difference to this behavior. I think it'd be better to make the output less verbose or allow us to change it.


Original Comments

Feedback Bot on 5/3/2020, 06:55 AM:

We have directed your feedback to the appropriate engineering team for further evaluation. The team will review the feedback and notify you about the next steps.

Feedback Bot on 5/4/2020, 11:53 AM:

Thank you for sharing your feedback! Our teams prioritize action on product issues with broad customer impact. See details at: https://docs.microsoft.com/en-us/visualstudio/ide/report-a-problem?view=vs-2019#faq. In case you need answers to common questions or need assisted support, be sure to use https://visualstudio.microsoft.com/vs/support/. We’ll keep you posted on any updates to this feedback.

Feedback Bot on 6/4/2020, 08:01 PM:

I have detected that for the last 35 days, this issue didn't have much product team activity and a very small amount of new votes or comments. Based on this, its severity, and affected area, it’s my experience that this issue is very unlikely to be fixed.


Original Solutions

(no solutions)

jpobst commented 2 years ago

The Build output when set to Minimum seems pretty minimal:

Build started...
1>------ Build started: Project: App21, Configuration: Debug Any CPU ------
1>  App21 -> C:\code\temp\App21\bin\Debug\App21.dll
========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========

However, the Deploy output is quite a bit longer than expected:

Build started...
1>------ Build started: Project: App21, Configuration: Debug Any CPU ------
1>  App21 -> C:\code\temp\App21\bin\Debug\App21.dll
2>Starting deployment to Google Pixel 3a XL ...
2>Deploying to Google Pixel 3a XL ...
Build started.
Project "App21.csproj" (Install target(s)):
Found Java SDK version 11.0.12.
Found Java SDK version 11.0.12.
Dex Fast Deployment Enabled: False
MonoAndroid Tools: C:\Program Files\Microsoft Visual Studio\2022\Preview\MSBuild\Xamarin\Android\
Android Platform API level: 31
TargetFrameworkVersion: v12.0
Android NDK: 
Android SDK: C:\Program Files (x86)\Android\android-sdk\
Android SDK Build Tools: C:\Program Files (x86)\Android\android-sdk\build-tools\30.0.3\
Java SDK: C:\Program Files\Microsoft\jdk-11.0.12.7-hotspot\
Application Java class: android.app.Application
Skipping target "_ResolveLibraryProjectImports" because all output files are up-to-date with respect to the input files.
Skipping target "_BuildLibraryImportsCache" because all output files are up-to-date with respect to the input files.
Skipping target "_GenerateAndroidResourceDir" because all output files are up-to-date with respect to the input files.
Skipping target "_GenerateLayoutBindings" because it has no outputs.
Skipping target "_ConvertResourcesCases" because all output files are up-to-date with respect to the input files.
Skipping target "_CompileResources" because all output files are up-to-date with respect to the input files.
Skipping target "_PrepareUpdateAndroidResgen" because all output files are up-to-date with respect to the input files.
Skipping target "_UpdateAndroidResgen" because all output files are up-to-date with respect to the input files.
  Adding assembly reference for App21, recursively...
  Adding assembly reference for Java.Interop, recursively...
  Adding assembly reference for Mono.Android, recursively...
    Adding assembly reference for System.Net.Http, recursively...
    Adding assembly reference for System.Drawing.Common, recursively...
  Adding assembly reference for mscorlib, recursively...
  Adding assembly reference for System.Core, recursively...
  Adding assembly reference for System, recursively...
    Adding assembly reference for Mono.Security, recursively...
  Adding assembly reference for System.Numerics, recursively...
  Adding assembly reference for System.Numerics.Vectors, recursively...
  Adding assembly reference for System.Runtime, recursively...
    Adding assembly reference for System.ComponentModel.Composition, recursively...
  Adding assembly reference for System.Xml, recursively...
  Adding assembly reference for Xamarin.AndroidX.Activity, recursively...
  Adding assembly reference for Xamarin.AndroidX.Annotation, recursively...
  Adding assembly reference for Xamarin.AndroidX.AppCompat.AppCompatResources, recursively...
  Adding assembly reference for Xamarin.AndroidX.AppCompat, recursively...
  Adding assembly reference for Xamarin.AndroidX.Arch.Core.Common, recursively...
  Adding assembly reference for Xamarin.AndroidX.Arch.Core.Runtime, recursively...
  Adding assembly reference for Xamarin.AndroidX.AsyncLayoutInflater, recursively...
  Adding assembly reference for Xamarin.AndroidX.Browser, recursively...
  Adding assembly reference for Xamarin.AndroidX.CardView, recursively...
  Adding assembly reference for Xamarin.AndroidX.Collection, recursively...
  Adding assembly reference for Xamarin.AndroidX.CoordinatorLayout, recursively...
  Adding assembly reference for Xamarin.AndroidX.Core, recursively...
  Adding assembly reference for Xamarin.AndroidX.CursorAdapter, recursively...
  Adding assembly reference for Xamarin.AndroidX.CustomView, recursively...
  Adding assembly reference for Xamarin.AndroidX.DocumentFile, recursively...
  Adding assembly reference for Xamarin.AndroidX.DrawerLayout, recursively...
  Adding assembly reference for Xamarin.AndroidX.Fragment, recursively...
  Adding assembly reference for Xamarin.AndroidX.Interpolator, recursively...
  Adding assembly reference for Xamarin.AndroidX.Legacy.Support.Core.UI, recursively...
  Adding assembly reference for Xamarin.AndroidX.Legacy.Support.Core.Utils, recursively...
  Adding assembly reference for Xamarin.AndroidX.Lifecycle.Common, recursively...
  Adding assembly reference for Xamarin.AndroidX.Lifecycle.LiveData.Core, recursively...
  Adding assembly reference for Xamarin.AndroidX.Lifecycle.Runtime, recursively...
  Adding assembly reference for Xamarin.AndroidX.Lifecycle.ViewModel, recursively...
  Adding assembly reference for Xamarin.AndroidX.Lifecycle.ViewModelSavedState, recursively...
  Adding assembly reference for Xamarin.AndroidX.Loader, recursively...
  Adding assembly reference for Xamarin.AndroidX.LocalBroadcastManager, recursively...
  Adding assembly reference for Xamarin.AndroidX.MultiDex, recursively...
  Adding assembly reference for Xamarin.AndroidX.Print, recursively...
  Adding assembly reference for Xamarin.AndroidX.RecyclerView, recursively...
  Adding assembly reference for Xamarin.AndroidX.SavedState, recursively...
  Adding assembly reference for Xamarin.AndroidX.SlidingPaneLayout, recursively...
  Adding assembly reference for Xamarin.AndroidX.SwipeRefreshLayout, recursively...
  Adding assembly reference for Xamarin.AndroidX.Transition, recursively...
  Adding assembly reference for Xamarin.AndroidX.VectorDrawable.Animated, recursively...
  Adding assembly reference for Xamarin.AndroidX.VectorDrawable, recursively...
  Adding assembly reference for Xamarin.AndroidX.VersionedParcelable, recursively...
  Adding assembly reference for Xamarin.AndroidX.ViewPager, recursively...
  Adding assembly reference for Xamarin.Essentials, recursively...
  Adding assembly reference for Xamarin.Google.Android.Material, recursively...
  Adding assembly reference for Xamarin.Google.Guava.ListenableFuture, recursively...
Skipping target "_CopyConfigFiles" because it has no inputs.
Skipping target "_ConvertPdbFiles" because it has no outputs.
Skipping target "_LinkAssembliesNoShrink" because all output files are up-to-date with respect to the input files.
Skipping target "_CopyConfigFiles" because it has no inputs.
Skipping target "_ConvertPdbFiles" because it has no outputs.
Skipping target "_GenerateJavaStubs" because all output files are up-to-date with respect to the input files.
Skipping target "_ManifestMerger" because all output files are up-to-date with respect to the input files.
Skipping target "_ConvertCustomView" because all output files are up-to-date with respect to the input files.
Skipping target "_AddStaticResources" because all output files are up-to-date with respect to the input files.
Skipping target "_GeneratePackageManagerJava" because all output files are up-to-date with respect to the input files.
Skipping target "_GenerateAndroidAssetsDir" because it has no outputs.
Skipping target "_PrepareCreateBaseApk" because all output files are up-to-date with respect to the input files.
Skipping target "_CreateBaseApk" because all output files are up-to-date with respect to the input files.
Skipping target "_CompileJava" because all output files are up-to-date with respect to the input files.
Skipping target "_CompileNativeAssemblySources" because all output files are up-to-date with respect to the input files.
Skipping target "_CreateApplicationSharedLibraries" because all output files are up-to-date with respect to the input files.
Skipping target "_CompileToDalvik" because all output files are up-to-date with respect to the input files.
Copying file from "C:\code\temp\App21\obj\Debug\120\android\bin\com.companyname.app21.apk" to "C:\code\temp\App21\bin\Debug\com.companyname.app21.apk".
Creating "obj\Debug\120\android_debug_keystore.flag" because "AlwaysCreate" was specified.
C:\Program Files (x86)\Android\android-sdk\build-tools\30.0.3\zipalign.exe -p 4 "obj\Debug\120\android\bin\com.companyname.app21.apk" "bin\Debug\\com.companyname.app21-Signed.apk" 
C:\Program Files\Microsoft\jdk-11.0.12.7-hotspot\bin\java.exe -jar "C:\Program Files\Microsoft Visual Studio\2022\Preview\MSBuild\Xamarin\Android\apksigner.jar" sign --ks "C:\Users\jopobst\AppData\Local\Xamarin\Mono for Android\debug.keystore" --ks-pass pass:android --ks-key-alias androiddebugkey --key-pass pass:android --min-sdk-version 31 --max-sdk-version 31  bin\Debug\com.companyname.app21-Signed.apk 
Signed android package 'bin\Debug\com.companyname.app21-Signed.apk'
Using cached value from RegisterTaskObject
Found device: 95PAX0FZTG
Creating "obj\Debug\120\upload.flag" because "AlwaysCreate" was specified.
Creating directory "obj\.cache\".
Done building project "App21.csproj".
Build succeeded.
2>Deployment was successful to Google Pixel 3a XL.
========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========
========== Deploy: 1 succeeded, 0 failed, 0 skipped ==========

@jonathanpeppers Do you know who would control Deploy logging? Is that us or the VS extension team?

jonathanpeppers commented 2 years ago

@jpobst yes this one would probably have been better off left on Developer Community. I've noticed myself that the Deploy logging doesn't respect the MSBuild verbosity options.

@tondat would you know if there is something custom during deploy, where it has its own verbosity setting?

tondat commented 2 years ago

@jonathanpeppers the verbosity for deploy is set to normal by default, when we did this change, if we assigned minimal verbosity then the tracing of deploy progress is empty and users has a lot of time without feedback and we tries to reduce this noise showing the deploy progress

tondat commented 2 years ago

I will add a task to verify it

jonathanpeppers commented 2 years ago

I think if it just followed the MSBuild verbosity setting it would be fine:

image

ghost commented 2 years ago

We suspect this issue is stale and no longer relevant. It will be closed if no further activity occurs within 14 more days. Any new comment (by anyone, not necessarily the author) will undo this process.

ghost commented 2 years ago

This issue will now be closed since it had been marked possibly-stale but received no further activity in the past 14 days. It is still possible to reopen or comment on the issue, but please note that the issue will be locked if it remains inactive for another 30 days.