Bug 30372 - Android "Enable developer instrumentation" setting corresponds to DevInstrumentationEnabled in XVS, but DebugSymbols in XS
Summary: Android "Enable developer instrumentation" setting corresponds to DevInstrume...
Alias: None
Product: Visual Studio Extensions
Classification: Xamarin
Component: Android ()
Version: 3.11 (C5)
Hardware: PC Windows
: --- normal
Target Milestone: ---
Assignee: Bugzilla
Depends on:
Blocks: 30335 30376
  Show dependency tree
Reported: 2015-05-22 19:37 UTC by Brendan Zagaeski (Xamarin Team, assistant)
Modified: 2015-11-26 10:38 UTC (History)
4 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 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 Brendan Zagaeski (Xamarin Team, assistant) 2015-05-22 19:37:14 UTC
Android "Enable developer instrumentation" setting corresponds to DevInstrumentationEnabled in XVS, but DebugSymbols in XS

A side-effect of this problem is that (as far as I can tell), there is no way to disable `DebugSymbols` in the Debug configuration in XVS using the project properties GUI (but it _is_ possible in XS). I will file a separate bug with a test case for that problem because I think it's probably worth having QA also verify that particular use-case once this bug is fixed.

## Regression status: NOT a recent regression

### Bad
Xamarin   3.11.576.0 (b28d0a1)
Xamarin.Android (2485523223ffb88567f101866d5f73da7a37ca53)

### Bad
Xamarin   3.9.547.0 (20fd2f0)
Xamarin.Android (86274adfc6418b4c3a9d67734eb871163859b51c)

### Bad
Xamarin (10cfd178d55287f09c85f5a1e604dfe20889a40f)
Xamarin.Android (ba9bbbdd44cfdc4bf485e8885bd2ad24fba525f7)

## Steps to reproduce

1. Create a new "Visual C# -> Android -> Blank App (Android)" project.

2. Open "Project Properties -> Android Options".

3. Un-check "Enable developer instrumentation (debugging and profiling)".

4. Save the project properties.

5. View the contents of the `.csproj`

## Results

For the purposes of this bug, please ignore everything except the `<DebugSymbols>` and `<DevInstrumentationEnabled>` elements.

### Properties shared across all configurations

> <PropertyGroup>

>   <DevInstrumentationEnabled>False</DevInstrumentationEnabled>

> </PropertyGroup>

### Contents of the "Debug|AnyCPU" `PropertyGroup` after step 5

> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
>   <DebugSymbols>true</DebugSymbols>
>   <DebugType>full</DebugType>
>   <Optimize>false</Optimize>
>   <OutputPath>bin\Debug\</OutputPath>
>   <DefineConstants>DEBUG;TRACE</DefineConstants>
>   <ErrorReport>prompt</ErrorReport>
>   <WarningLevel>4</WarningLevel>
>   <AndroidUseSharedRuntime>True</AndroidUseSharedRuntime>
>   <AndroidLinkMode>None</AndroidLinkMode>
> </PropertyGroup>

## Expected results

The `DevInstrumentationEnabled` property appears nowhere within the file.

### Contents of the "Debug|AnyCPU" `PropertyGroup` after step 5 in XS on Windows

> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
>   <DebugType>full</DebugType>
>   <Optimize>false</Optimize>
>   <OutputPath>bin\Debug</OutputPath>
>   <DefineConstants>DEBUG;</DefineConstants>
>   <ErrorReport>prompt</ErrorReport>
>   <WarningLevel>4</WarningLevel>
>   <ConsolePause>false</ConsolePause>
>   <AndroidLinkMode>None</AndroidLinkMode>
>   <EmbedAssembliesIntoApk>True</EmbedAssembliesIntoApk>
> </PropertyGroup>

The key difference is that the `<DebugSymbols>` element has been _removed_ after step 5 in XS on Windows. Presumably the Xamarin.Android build process uses a default value of "False" for that property, so Xamarin Studio simply removes it when setting it to "False".

## Additional version info

### Windows 8.1 (64-bit) in VMWare Fusion 6.0.6 (2684343) (with 2 CPU cores assigned to the VM)
Microsoft Visual Studio Professional 2013
Version 12.0.31101.00 Update 4
Microsoft .NET Framework
Version 4.6.00057
Comment 1 Brendan Zagaeski (Xamarin Team, assistant) 2015-05-22 20:36:41 UTC
In order to satisfy the "practical use scenario" described in the companion Bug 30376, it might be desirable to match the Xamarin Studio behavior that automatically sets  $(EmbedAssembliesIntoApk) to True (i.e., disables Fast Deployment) when setting "Enable developer instrumentation" to False.
Comment 2 Joaquin Jares 2015-10-21 15:57:32 UTC
Fixed via 33d9a186b78b6eb3314d59e538bbe5feb9ea624c
Comment 3 xamarin-release-manager 2015-11-26 10:38:52 UTC
Fixed in version (cycle6)

Author: Daniel Cazzulino
Commit: 0dc1e3c13bc723382111ef4cf627c7d512218a5d (xamarin/XamarinVS)