Bug 24595 - XBuild _run error in Release mode with UseSharedRuntime=True and EmbedAssembliesIntoApk=False
Summary: XBuild _run error in Release mode with UseSharedRuntime=True and EmbedAssembl...
Status: VERIFIED INVALID
Alias: None
Product: Android
Classification: Xamarin
Component: MSBuild ()
Version: 4.20.0
Hardware: Macintosh Mac OS
: Normal normal
Target Milestone: 5.1
Assignee: Jonathan Pryor
URL:
Depends on:
Blocks:
 
Reported: 2014-11-17 18:01 UTC by John Pilczak
Modified: 2015-02-02 12:53 UTC (History)
3 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:
VERIFIED INVALID

Description John Pilczak 2014-11-17 18:01:06 UTC
When attempting to run an android app in Release mode with UseSharedRuntime=True and EmbedAssembliesIntoApk=False on, it gets an error saying that there is a missing manifest file.

Steps to Reproduce:
1. Choose any app and clean it (I just used ActionBarPullToRefreshSample)
2. Install the app with Configuration=Release, UseSharedRuntime=True, and EmbedAssembliesIntoApk=False
3. Execute xbuild /f:_run

Expected result:
The app should run successfully

Actual result:
The run command gets an error: /Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.targets: error : Missing ManifestFile!

Install output: https://gist.github.com/JohnPilczak/59bcd5591b21518212f0
Run output: https://gist.github.com/JohnPilczak/2f789987a43029552aec

Environment Info:
https://gist.github.com/JohnPilczak/8bb6518baed7ba8a26a8
Comment 2 Jonathan Pryor 2014-11-21 12:42:55 UTC
> 1. Choose any app and clean it (I just used ActionBarPullToRefreshSample)
> 2. Install the app with Configuration=Release, UseSharedRuntime=True, and
EmbedAssembliesIntoApk=False
> 3. Execute xbuild /f:_run

The above steps are not the minimal repro. The minimal repro is this:

    $ xbuild /t:Install /p:Configuration=Release
    $ xbuild /t:_Run

This is NOT supported.

The reason this is a problem is because the _Run target requires that there be an obj\$(Configuration)\android\AndroidManifest.xml file in order to determine the app to launch.

The default Configuration, if not specified, is the Debug configuration.

Meaning the above commands are equivalent to:

    $ xbuild /t:Install /p:Configuration=Release
    $ xbuild /t:_Run /p:Configuration=Debug

If you didn't build the Debug configuration, there is no obj\$(Configuration)\android\AndroidManifest.xml, and thus it fails.

The fix? Use the SAME configuration:

    $ xbuild /t:Install /p:Configuration=Release
    $ xbuild /t:_Run /p:Configuration=Release