Bug 12083 - Default values should not be configuration dependent
Summary: Default values should not be configuration dependent
Alias: None
Product: Android
Classification: Xamarin
Component: MSBuild ()
Version: 4.8.x
Hardware: PC Mac OS
: High normal
Target Milestone: ---
Assignee: Bugzilla
Depends on:
Reported: 2013-05-02 19:25 UTC by Mikayla Hutchinson [MSFT]
Modified: 2013-05-03 20:45 UTC (History)
2 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 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 Mikayla Hutchinson [MSFT] 2013-05-02 19:25:39 UTC
This code in the targets is very bad. There is nothing special about the default configuration names created by the IDE; users can create whatever configurations they want. This means that configuration names should NEVER be special cased in targets files. That goes doubly so for setting default values.

<EmbedAssembliesIntoApk Condition="'$(EmbedAssembliesIntoApk)' == '' And '$(Configuration)' == 'Debug'">False</EmbedAssembliesIntoApk>
<EmbedAssembliesIntoApk Condition="'$(EmbedAssembliesIntoApk)' == '' And '$(Configuration)' != 'Debug'">True</EmbedAssembliesIntoApk>
Comment 1 Jonathan Pryor 2013-05-03 00:12:35 UTC
How should we fix this?

If Xamarin.Android.Common.targets doesn't special case this, then the template needs to specify it, but no existing templates will have it, which means if we remove the special case then Fast Deployment will be DISABLED for most projects (except those which have explicitly toggled the Fast Deployment checkbox, which I'll assume is a minority of existing projects).

Likewise having Fast Deployment ENABLED would BREAK Release builds.
Comment 2 Mikayla Hutchinson [MSFT] 2013-05-03 20:45:14 UTC
Okay, I don't see way to fix this without breaking existing projects. However, the correct solution would have been for the IDEs to do a migration.

I've added workarounds in XS.

Please, please avoid this in future.