Bug 3122 - Failure to install from command line suppressed by /v:quiet
Summary: Failure to install from command line suppressed by /v:quiet
Status: RESOLVED FIXED
Alias: None
Product: Android
Classification: Xamarin
Component: MSBuild ()
Version: 4.0
Hardware: Macintosh Mac OS
: Normal normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2012-01-27 17:23 UTC by adam.lickel
Modified: 2013-05-21 14:58 UTC (History)
4 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED FIXED

Description adam.lickel 2012-01-27 17:23:37 UTC
If xbuild is run with /v:quiet any installation errors are suppressed.
It then returns with RC=0.
Since this is a failure condition, it should be displayed to the user.
Ideally, xbuild should also return a non zero return code to suggest there was an error.

It is visible with /v:minimal, but should be upgraded.
Comment 1 Jonathan Pobst 2012-01-28 20:50:21 UTC
Can you post the error you are getting?
Comment 2 adam.lickel 2012-01-30 13:23:52 UTC
So my original problem isn't as bad as I thought.
Some errors are at least displayed with a bad return code and a (very) generic error message.

The problem I was seeing for a while that made me open this was:

## make install ; echo RC=$?
xbuild  /v:minimal /p:Configuration=Debug /p:TargetFrameworkVersion=v4.0 /t:install Rdio/Rdio.csproj
XBuild Engine Version 2.10.8.1
Mono, Version 2.10.8.1
Copyright (C) Marek Sieradzki 2005-2008, Novell 2008-2011.
	Configuration: Debug Platform: AnyCPU
	Configuration: Debug Platform: AnyCPU
Failure [INSTALL_FAILED_CONFLICTING_PROVIDER]
RC=0

The failure [INSTALL_FAILED_CONFLICTING_PROVIDER] is completely suppressed when running as quiet.

-----

Sometimes the failure is present but without reason (in this case, two devices plugged in simultaneously):

 $ make VERBOSITY=quiet install ; echo RC=$?
xbuild  /v:quiet /p:Configuration=Debug /p:TargetFrameworkVersion=v4.0 /t:install Rdio/Rdio.csproj
XBuild Engine Version 2.10.8.1
Mono, Version 2.10.8.1
Copyright (C) Marek Sieradzki 2005-2008, Novell 2008-2011.
/Library/Frameworks/Mono.framework/External/xbuild/Novell/Novell.MonoDroid.Common.targets: error : Error executing task InstallPackageAssemblies: 
make: *** [install] Error 1
RC=2

But the error is available to you via ADB:

 $ adb install Market/Rdio-v4.0.apk 
error: more than one device and emulator


The error that caused this failure is gobbled up even when running with /v:verbose

[skipping to relevant section]
	Target _Upload:
		  ResolvedUserAssemblies:
		    /Users/lickea/Documents/Software/Rdio/Mobile/astromech/Rdio/bin/Debug/Rdio.dll
		    /Users/lickea/Documents/Software/Rdio/Mobile/astromech/Rdio/bin/Debug/Rdio.Net.Android.dll
/Library/Frameworks/Mono.framework/External/xbuild/Novell/Novell.MonoDroid.Common.targets: error : Error executing task InstallPackageAssemblies: 
	Task "InstallPackageAssemblies" execution -- FAILED
	Done building target "_Upload" in project "/Users/lickea/Documents/Software/Rdio/Mobile/astromech/Rdio/Rdio.csproj".-- FAILED
Done building project "/Users/lickea/Documents/Software/Rdio/Mobile/astromech/Rdio/Rdio.csproj".-- FAILED

Build FAILED.
Errors:

/Users/lickea/Documents/Software/Rdio/Mobile/astromech/Rdio/Rdio.csproj (install) ->
/Library/Frameworks/Mono.framework/External/xbuild/Novell/Novell.MonoDroid.Common.targets (_Upload target) ->

	/Library/Frameworks/Mono.framework/External/xbuild/Novell/Novell.MonoDroid.Common.targets: error : Error executing task InstallPackageAssemblies: 

	 0 Warning(s)
	 1 Error(s)

Time Elapsed 00:00:01.9340690
make: *** [install] Error 1
RC=2
Comment 3 Jonathan Pobst 2012-01-30 16:27:33 UTC
Thanks, we should be able to track down the error now!
Comment 4 Peter Collins 2013-05-21 14:58:21 UTC
Tested this against XA 4.6.6 (6d7480e9), and it looks like we now properly display and error out when build / installation errors occur during a quiet xbuild execution. Please reopen this bug if you are still able to reproduce.