Bug 15106 - When just building (not deploying), Xamarin Studio doesn't generate .APK files
Summary: When just building (not deploying), Xamarin Studio doesn't generate .APK files
Status: RESOLVED NOT_ON_ROADMAP
Alias: None
Product: Android
Classification: Xamarin
Component: Tools and Addins ()
Version: 4.8.x
Hardware: Macintosh Mac OS
: --- normal
Target Milestone: ---
Assignee: Jonathan Pryor
URL:
Depends on:
Blocks:
 
Reported: 2013-10-01 15:31 UTC by bryan costanich
Modified: 2014-07-28 18:30 UTC (History)
1 user (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 NOT_ON_ROADMAP

Description bryan costanich 2013-10-01 15:31:26 UTC
If you:
 *  open up a Xamarin.Android application in Xamarin.Studio (try this one: https://github.com/xamarin/mobile-samples/tree/master/TaskyPro)
 * set the startup project to be the android app 
 * select either "Debug" or "Release" in the build config toolbar
 * right click on the android project and choose build

it creates the Tasky.Android.dll and Tasky.Android.dll.mdb, but no .apk or -Signed.apk files. 

it should.

if you want those to get generated, you have to actually deploy to a simulator or the device.
Comment 1 Mikayla Hutchinson [MSFT] 2013-10-01 15:38:06 UTC
This is by design ( and the VS addin does the same). The sign/package targets are only invoked when deploying. This was intended to reduce build iteration time.
Comment 2 bryan costanich 2013-10-01 15:48:55 UTC
So then what's the point of building? just to make sure you don't have any errors?

This is actually kind of a problematic and confusing feature. imagine, for instance, you're trying to build for Test Cloud. users aren't going to understand why, when the _build_, they're not actually building.
Comment 3 Jonathan Pryor 2013-10-01 16:03:14 UTC
The rationale is that IDE users tend to Build _constantly_, to syntax check their code, etc. With that in mind, it was felt that _any_ delay to the Build would be met with annoyance, as we expect developers to Build many dozens or hundreds of times a day.

> imagine, for instance, you're trying to build for Test Cloud

That's already going to be problematic, because you can't use Debug builds with Test Cloud (if Fast Deployment is enabled, which is the default, because the .apk won't contain any assemblies). We'll need to document this, at minimum.
Comment 4 Mikayla Hutchinson [MSFT] 2013-10-01 16:08:16 UTC
If you'd like to try this workflow in practice, you could modify your MSBuild file to run the deploy target post-build. i'd recommend trying it on something bigger than a sample.