Bug 5276 - Automatically update AndroidManifest property
Summary: Automatically update AndroidManifest property
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: Android Add-in ()
Version: 3.0.x
Hardware: PC Mac OS
: Normal enhancement
Target Milestone: Future Cycle (TBD)
Assignee: Greg Munn
Depends on:
Reported: 2012-05-23 08:22 UTC by Dominique
Modified: 2016-12-19 21:52 UTC (History)
5 users (show)

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 for Bug 5276 on Developer Community or GitHub if you have new information to add and do not yet see a matching new report.

If the latest results still closely match this report, you can use the original description:

  • Export the original title and description: Developer Community HTML or GitHub Markdown
  • Copy the title and description into the new report. Adjust them to be up-to-date if needed.
  • Add your new information.

In special cases on GitHub you might also want the comments: GitHub Markdown with public comments

Related Links:

Description Dominique 2012-05-23 08:22:18 UTC
I'm working on a project that teaches people a language.
The underlying engine/business logic is the same whether you are learning Chinese or Spanish, but obviously the data/content of the language course varies. So there is business need to be able to create separate exes with their own title and individual Icon for each language.

Currently MonoDevelop allows me link to AndroidManifest.xml files that are located outside the Properties sub-directory, but these are ignored when the apk file is created and subsequently deployed to the device.

In comparison I can link to say an Icon.png file that is located outside the drawable sub-directory, but it is correctly picks up and included in the apk and useable once deployed to the device.

Of course I could create separate directory for every single project ( 15 in all ) and then each app would then have its own AndroidManifest.xml, but this seems unnecessary, if linked AndroidManifest.xml files just worked, like they do for drawable images, for example. 

I'm just asking for choices for the developer. If they want to link to an AndroidManifest.xml, they should be able do, because you can link other types of iles, both xml and non xml. If instead they want to have a separate hierarchy for their projects, then that would work as is too.
Comment 1 Jonathan Pobst 2012-05-23 10:41:37 UTC
You can link them, but AndroidManifest is a special file type that the project needs to be told about so it can be used.

For example, say you had 2 AndroidManifests in your project, which one should the project use?

To do this, open up your .csproj and change the path of:

to point to whatever AndroidManifest you want to use.  

This will tell the project to use your specified manifest (it doesn't even have to be included in your project).
Comment 2 Dominique 2012-05-23 12:03:56 UTC
Hi Jonathan,
  I agree that having 2 is not feasable and that is not what I'm asking for. My suggestions is still to ONLY have 1 AndroidManifest.xml file per project, but I want to be able to create link to the AndroidManifest.xml file so that it does not HAVE to exist in Properties\*.

In my real world example I have 15 projects, each corresponds to teaching a different languages ( this is not a localisation issue), so logically each project should have just 1 AndroidManifest.xml file, but they all can't exist in the same location, namely Properties\*. So I want the ability to be able to tell each project where the AndroidManifest.xml for that project should be picked up from. As borrillis on IRC mentioned, maybe the easiest solution is to have MonoDevelop change the <AndroidManifest /> tag to point to the AndroidManifest.xml the developer selects, while still enforcing the only 1 AndroidManifest.xml per project rule.

I hope the above is clearer.
Comment 3 Mikayla Hutchinson [MSFT] 2012-05-23 14:32:10 UTC
MonoDevelop updates the AndroidManifest property when adding/removing/renaming AndroidManifest.xml files, but it doesn't cope with links (LogicalName), nor adding to a location other than the root.
Comment 4 Greg Munn 2016-12-19 21:52:26 UTC
I'm going to mark this in progress since I have a patch that should resolve at least some of the issues here. This will allow a configuration to have support for a different android manifest