Bug 5274 - Deployment for a second device fails if project not rebuilt
Summary: Deployment for a second device fails if project not rebuilt
Status: RESOLVED FIXED
Alias: None
Product: Visual Studio Extensions
Classification: Xamarin
Component: Android ()
Version: unspecified
Hardware: PC Windows
: --- normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2012-05-23 07:44 UTC by Goncalo Oliveira
Modified: 2016-08-03 15:23 UTC (History)
5 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 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 Goncalo Oliveira 2012-05-23 07:44:51 UTC
After building and deploying a project to device A, I wanted to deploy the same package to device B, so I changed the selected device and invoked the Deploy using the project context menu.

The output shows the waiting for device message, but fails to show the 'Removing any previous version' and 'Copying application to device' messages.

the output:

Waiting for device..
========== Build: 2 succeeded or up-to-date, 0 failed, 0 skipped ==========
========== Deploy: 1 succeeded, 0 failed, 0 skipped ==========
Comment 1 Jonathan Pobst 2012-05-23 11:18:47 UTC
In order to determine if we need to deploy the package, we check 2 conditions:

- The package has changed.
- The package isn't already on the device.

I can see where this scenario might cause the deploy code to think the package hasn't changed.

But I don't see how checking if the package is already on the device could fail.  We query the device for a list of all packages it has, and if it's not there, we will install it.

Could device B already have the package or a package with the same name?

Is the issue that the package isn't on device B? or that it didn't update the package that was already on device B?
Comment 2 Goncalo Oliveira 2012-05-23 11:40:33 UTC
There is an older version of the package on device B.

So, in sum...
- The package hasn't changed since it has just been deployed into device A
- The package is already on device B (though it's an older version)

These conditions will be considered as "no need for deploy", is this correct?
Comment 3 Jonathan Pobst 2012-05-23 11:43:07 UTC
Ok, that makes sense.  We still need to fix the first condition so it takes different devices into account.  (We had that code before but it somehow got removed.)

I just didn't understand why the second condition wasn't firing.  Now I do.
Comment 4 Jonathan Pobst 2012-05-23 16:07:15 UTC
Fixed in ae59e6cc4d79032936fb92a795a761f6ed19b0cd.

Thanks for the report!
Comment 5 Goncalo Oliveira 2012-05-24 04:01:05 UTC
That's what we're here for! :)
Thanks for the fix!