Skip to content

Commit 3394bc5

Browse files
[Xamarin.Android.Build.Tasks] add $(EnableProfiler) property (#10083)
Context: dotnet/macios#22685 Context: dotnet/macios#19370 To simplify inclusion of the Mono diagnostics component, the iOS/macOS/etc. workloads are introducing a new `$(EnableProfiler)` MSBuild property. To align with Android, we can add an `$(EnableProfiler)` MSBuild property which works the same way as the existing `$(AndroidEnableProfiler)` MSBuild property. I documented `$(AndroidEnableProfiler)` (which was missing!), and also added an entry about the new, `$(EnableProfiler)` property.
1 parent 6068071 commit 3394bc5

File tree

2 files changed

+24
-0
lines changed

2 files changed

+24
-0
lines changed

Documentation/docs-mobile/building-apps/build-properties.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -395,6 +395,17 @@ final `.apk`.
395395

396396
This property is `False` by default.
397397

398+
## AndroidEnableProfiler
399+
400+
Synonym for the [`$(EnableProfiler)`](#enableprofiler) property.
401+
402+
Required for using `dotnet-trace` or `dotnet-gcdump` in Android
403+
applications. If set to `true`, it includes the Mono diagnostic
404+
component in the application. This component is the
405+
`libmono-component-diagnostics_tracing.so` native library.
406+
407+
This property is `False` by default.
408+
398409
## AndroidEnableObsoleteOverrideInheritance
399410

400411
A boolean property that determines if bound methods automatically inherit `[Obsolete]`
@@ -1554,6 +1565,18 @@ This property is `False` by default.
15541565
This property is ignored unless the
15551566
[`$(AotAssemblies)`](#aotassemblies) MSBuild property is `True`.
15561567

1568+
## EnableProfiler
1569+
1570+
Synonym for the [`$(AndroidEnableProfiler)`](#androidenableprofiler)
1571+
property.
1572+
1573+
Required for using `dotnet-trace` or `dotnet-gcdump` in Android
1574+
applications. If set to `true`, it includes the Mono diagnostic
1575+
component in the application. This component is the
1576+
`libmono-component-diagnostics_tracing.so` native library.
1577+
1578+
This property is `False` by default.
1579+
15571580
## EnableProguard
15581581

15591582
A boolean property that determines

src/Xamarin.Android.Build.Tasks/Microsoft.Android.Sdk/targets/Microsoft.Android.Sdk.DefaultProperties.targets

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@
4343
<AndroidEnableRestrictToAttributes Condition=" '$(AndroidEnableRestrictToAttributes)' == '' ">obsolete</AndroidEnableRestrictToAttributes>
4444

4545
<!-- Mono components -->
46+
<AndroidEnableProfiler Condition=" '$(AndroidEnableProfiler)' == ''">$(EnableProfiler)</AndroidEnableProfiler>
4647
<AndroidEnableProfiler Condition=" '$(AndroidEnableProfiler)' == ''">false</AndroidEnableProfiler>
4748

4849
<!--

0 commit comments

Comments
 (0)