Skip to content

Commit 829b6c9

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 c9f49e7 commit 829b6c9

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
@@ -398,6 +398,17 @@ final `.apk`.
398398

399399
This property is `False` by default.
400400

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

403414
A boolean property that determines if bound methods automatically inherit `[Obsolete]`
@@ -1548,6 +1559,18 @@ This property is `False` by default.
15481559
This property is ignored unless the
15491560
[`$(AotAssemblies)`](#aotassemblies) MSBuild property is `True`.
15501561

1562+
## EnableProfiler
1563+
1564+
Synonym for the [`$(AndroidEnableProfiler)`](#androidenableprofiler)
1565+
property.
1566+
1567+
Required for using `dotnet-trace` or `dotnet-gcdump` in Android
1568+
applications. If set to `true`, it includes the Mono diagnostic
1569+
component in the application. This component is the
1570+
`libmono-component-diagnostics_tracing.so` native library.
1571+
1572+
This property is `False` by default.
1573+
15511574
## EnableProguard
15521575

15531576
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
@@ -52,6 +52,7 @@
5252
<AndroidEnableRestrictToAttributes Condition=" '$(AndroidEnableRestrictToAttributes)' == '' ">obsolete</AndroidEnableRestrictToAttributes>
5353

5454
<!-- Mono components -->
55+
<AndroidEnableProfiler Condition=" '$(AndroidEnableProfiler)' == ''">$(EnableProfiler)</AndroidEnableProfiler>
5556
<AndroidEnableProfiler Condition=" '$(AndroidEnableProfiler)' == ''">false</AndroidEnableProfiler>
5657

5758
<!--

0 commit comments

Comments
 (0)