Skip to content

Commit 1e0e083

Browse files
dellis1972jonpryor
authored andcommitted
[Xamarin.Android.Build.Tasks] Switch to use $(Optimize) to control which runtime is installed. (#528)
Context: https://bugzilla.xamarin.com/show_bug.cgi?id=53787 Context: https://bugzilla.xamarin.com/show_bug.cgi?id=53900 In mono 4.9 `$(DebugType)` Full|Portable|PdbOnly are all the same thing, so we cannot reliably use those values to control which runtime is installed in the package. Instead we should use `$(Optimize)` which is only used on Release configurations (why Optimize a debug build!). This commit switches over to using `$(Optimize)` to control the debug/release runtime selection.
1 parent 2df286b commit 1e0e083

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/Xamarin.Android.Build.Tasks/Xamarin.Android.Common.targets

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -186,10 +186,10 @@ Copyright (C) 2011-2012 Xamarin. All rights reserved.
186186
<AndroidUseSharedRuntime Condition=" '$(AndroidUseSharedRuntime)' == ''">False</AndroidUseSharedRuntime>
187187

188188
<AndroidExplicitCrunch Condition=" '$(AndroidExplicitCrunch)' == '' ">False</AndroidExplicitCrunch>
189-
<AndroidUseDebugRuntime Condition="'$(AndroidUseDebugRuntime)' == '' And '$(AndroidUseSharedRuntime)' == 'False' And '$(EmbedAssembliesIntoApk)' == 'True' And ('$(DebugSymbols)' != 'True' Or '$(DebugType)' != 'Full' Or '$(DebugType)' != 'Embedded')" >False</AndroidUseDebugRuntime>
189+
<AndroidUseDebugRuntime Condition="'$(AndroidUseDebugRuntime)' == '' And '$(Optimize)' == 'True'" >False</AndroidUseDebugRuntime>
190190
<AndroidUseDebugRuntime Condition="'$(AndroidUseDebugRuntime)' == ''" >True</AndroidUseDebugRuntime>
191191

192-
<MonoSymbolArchive Condition=" '$(MonoSymbolArchive)' == '' And '$(AndroidUseSharedRuntime)' == 'False' And '$(EmbedAssembliesIntoApk)' == 'True' And '$(DebugSymbols)' == 'True' And ('$(DebugType)' == 'PdbOnly' Or '$(DebugType)' == 'Portable')" >True</MonoSymbolArchive>
192+
<MonoSymbolArchive Condition=" '$(MonoSymbolArchive)' == '' And '$(AndroidUseSharedRuntime)' == 'False' And '$(EmbedAssembliesIntoApk)' == 'True' And '$(DebugSymbols)' == 'True' And '$(Optimize)' == 'True'" >True</MonoSymbolArchive>
193193
<MonoSymbolArchive Condition=" '$(MonoSymbolArchive)' == '' ">False</MonoSymbolArchive>
194194

195195
<BundleAssemblies Condition="'$(BundleAssemblies)' == ''">False</BundleAssemblies>
@@ -263,7 +263,7 @@ Copyright (C) 2011-2012 Xamarin. All rights reserved.
263263
</PropertyGroup>
264264

265265
<Choose>
266-
<When Condition=" '$(DebugSymbols)' != '' And $(DebugSymbols) And '$(DebugType)' != '' And ('$(DebugType)' == 'Full' Or '$(DebugType)' == 'Embedded') ">
266+
<When Condition=" '$(DebugSymbols)' != '' And $(DebugSymbols) And '$(DebugType)' != '' And '$(Optimize)' == 'False' ">
267267
<PropertyGroup>
268268
<AndroidIncludeDebugSymbols>True</AndroidIncludeDebugSymbols>
269269
</PropertyGroup>

0 commit comments

Comments
 (0)