Bug 42928 - Using different AndroidManifest based on configuration incurs deployment issues
Summary: Using different AndroidManifest based on configuration incurs deployment issues
Alias: None
Product: Android
Classification: Xamarin
Component: MSBuild ()
Version: 6.0.99
Hardware: PC Mac OS
: Normal normal
Target Milestone: master
Assignee: dean.ellis
Depends on:
Reported: 2016-07-29 18:14 UTC by Pete Schmitz
Modified: 2017-06-28 21:11 UTC (History)
2 users (show)

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

referenced project in op, reproduction (1.05 MB, application/zip)
2016-07-29 18:14 UTC, Pete Schmitz

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:

Description Pete Schmitz 2016-07-29 18:14:41 UTC
Created attachment 16836 [details]
referenced project in op, reproduction


I'm encountering a deployment failure when I attempt to deploy a configuration that targets a different manifest file.

The deployment error:

Deployment failed because of an internal error: Could not find file "/Users/pete/multiconfigs/multiconfigs/bin/Debug/com.peteschmitz.multiconfigstwo-Signed.apk".

Expected behavior:

Find and deploy the correct apk that was generated in the build process.

More details:
 - There are three configurations in the attached project - Debug, Debug_Two, Release.
 - The debug configurations have MSBuild instructions to target different manifest files (AndroidManifest.xml, AndroidManifest-Two.xml respectively)
 - The only difference within these manifests is the package name.
 - The build process works fine for both configurations - both generate signed apks with the correct manifests, named appropriately to their corresponding package names (com.peteschmitz.multiconfigs-Signed.apk, com.peteschmitz.multiconfigstwo-Signed.apk).
 - Only one of these configurations properly deploys to my simulator after the build process (Debug_Two). For the other configuration (Debug), Xamarin attempts to deploy using the other configuration's package name (com.peteschmitz.multiconfigstwo-Signed.apk), resulting in the above deployment failure.

Are there any workarounds that I may incorporate to retain proper deployment for both configs through Xamarin's IDE?

Mac OS X 10.11.3
Xamarin Studio Indie: 5.10.3
Android SDK Tools: 24.4.1
Android SDK Platform Tools: 23.0.1
Android SDK Build Tools: 23.0.2
Java: 1.7.0_71
Comment 1 Pete Schmitz 2016-08-11 17:06:08 UTC
Any acknowledgement regarding this? 

This essentially nullifies any multi-configuration support on Android since I don't believe I can attach the process externally for debugging.
Comment 2 John Miller [MSFT] 2017-06-28 21:11:18 UTC
Hi Pete,

Unfortunately, we’re unable to reproduce this report using the latest versions of Xamarin.Android ( If this issue is still occurring for you, please reopen this issue and attach a diagnostic build report and any new steps to take with the project.