Skip to content

Docs (.NET 11): modernize MAUI profiling guidance - #3517

Merged
jfversluis merged 6 commits into
dotnet:mainfrom
vitek-karas:vitkaras-microsoft-doc-003-modernize-profiling
Sep 24, 2026
Merged

jfversluis merged 6 commits into
dotnet:mainfrom
vitek-karas:vitkaras-microsoft-doc-003-modernize-profiling

Conversation

@vitek-karas

@vitek-karas vitek-karas commented Sep 11, 2026 •

Copy link
Copy Markdown
Member

Summary

  • Preserve the existing .NET 10-and-earlier Mono profiling guidance under versioned monikers.
  • Add .NET 11 CoreCLR EventPipe and diagnostic-port guidance for Android, iOS, Mac Catalyst, and Windows.
  • Point the performance guidance to the local profiling article and name the supported .NET MAUI platforms explicitly.

Relationship to other documentation work

This PR is based directly on main and contains no commits from #3511 or vitek-karas#2. It can be reviewed independently. However, #3511 should merge first so the runtime overview establishes the CoreCLR terminology before this profiling guidance is published.

The experimental maui profile CLI page and the general .NET diagnostic-port reference are tracked separately and are intentionally out of scope.

Validation

  • Targeted markdownlint passed with 0 issues.
  • DocFX completed successfully with no errors and only the existing baseline UnknownContentType warning.
  • Rendered .NET 10 and .NET 11 moniker views were checked separately.
  • The diff against main contains only docs/fundamentals/profiling.md and docs/deployment/performance.md.

Remaining pre-merge validation

Owner approval and end-to-end .NET 11 validation are still required for the custom TCP listen workflow on both an iOS simulator and a physical iOS device, including the exact address, port, launch order, suspend/later-attach behavior, readable trace output, and dotnet-gcdump collection.


Internal previews

File Preview link
docs/deployment/performance.md Learn preview
docs/fundamentals/profiling.md Learn preview

Build report

vitek-karas and others added 3 commits September 11, 2026 18:58
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI lite review requested due to automatic review settings September 11, 2026 17:00
@learn-build-service-prod

Copy link
Copy Markdown
Contributor

PoliCheck Scan Report

The following report lists PoliCheck issues in PR files. Before you merge the PR, you must fix all severity-1 and severity-2 issues. The AI Review Details column lists suggestions for either removing or replacing the terms. If you find a false positive result, mention it in a PR comment and include this text: #policheck-false-positive. This feedback helps reduce false positives in future scans.

✅ No issues found

More information about PoliCheck

Information: PoliCheck | Severity Guidance | Term
For any questions: Try searching the learn.microsoft.com contributor guides or post your question in the Learn support channel.

@learn-build-service-prod

Copy link
Copy Markdown
Contributor

Learn Build status updates of commit 40da357:

✅ Validation status: passed

File Status Preview URL Details
docs/deployment/performance.md ✅Succeeded View (>=net-maui-8.0)
docs/fundamentals/profiling.md ✅Succeeded View (>=net-maui-8.0)

For more details, please refer to the build report.

Comment thread docs/fundamentals/profiling.md Resolved

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

Several documented workflows need correction or clarification before approval.

Pull request overview

Updates .NET MAUI profiling documentation for .NET 11 while preserving earlier Mono guidance.

Changes:

  • Adds CoreCLR/EventPipe and diagnostic-port workflows.
  • Versions platform-specific profiling instructions.
  • Updates performance documentation and platform coverage.
File summaries
File Summary
docs/fundamentals/profiling.md Adds versioned .NET 10 and .NET 11 profiling guidance.
docs/deployment/performance.md Updates platform coverage and links to profiling documentation.
Review details

Suppressed comments (14)

docs/fundamentals/profiling.md:40

  • This blanket statement conflicts with the runtime matrix in docs/deployment/runtimes-compilation.md:112-120,158-168, which documents Mono as the default on iOS and Mac Catalyst, CoreCLR as experimental on iOS, and CoreCLR as the .NET 11 default only for Android Release and Windows. As written, the following Diagnostic* and local-CoreCLR instructions are presented as the normal path for default Mono iOS/Mac Catalyst builds. Please scope these instructions to apps configured for CoreCLR (and document that configuration) or update the runtime overview and all affected examples together before publishing.
> .NET MAUI applications normally use CoreCLR on Android, iOS, Mac
> Catalyst, and Windows in .NET 11 and later. NativeAOT has different
> diagnostics limitations; see [NativeAOT deployment](~/deployment/nativeaot.md).
> For runtime selection, see [Runtime and compilation](~/deployment/runtimes-compilation.md).

docs/fundamentals/profiling.md:503

  • This physical iOS runtime-profiling command also lacks the target device selection. Add -p:RuntimeIdentifier=ios-arm64 and -p:_DeviceName=<UDID> so the command actually launches the physical device described by the heading.
dotnet build -t:Run -c Release -f net11.0-ios -p:DiagnosticAddress=127.0.0.1 -p:DiagnosticPort=9000 -p:DiagnosticSuspend=false -p:DiagnosticListenMode=listen
dotnet-trace collect --dsrouter ios --format speedscope
**docs/fundamentals/profiling.md:830**
* The physical iOS memory-dump command has the same target-selection problem: `-f net11.0-ios` does not identify a physical device. Include the `ios-arm64` RID and `_DeviceName` UDID before documenting this as a USB-device workflow.

dotnet build -t:Run -c Release -f net11.0-ios -p:DiagnosticAddress=127.0.0.1 -p:DiagnosticPort=9000 -p:DiagnosticSuspend=false -p:DiagnosticListenMode=listen
dotnet-gcdump collect --dsrouter ios


Run the physical iOS workflow from a macOS development host.

docs/fundamentals/profiling.md:293

  • This physical-device example does not actually select a physical iOS target: net11.0-ios alone leaves the device/simulator selection implicit. The iOS CLI guidance requires -p:RuntimeIdentifier=ios-arm64 and -p:_DeviceName=<UDID> for a device, so this command can deploy to the wrong target instead of the USB device described below.
Use the same `net11.0-ios` settings as the iOS simulator, but run
`dotnet-trace collect --dsrouter ios` from a macOS development host.
The `ios` router mode uses the USB-connected physical iOS device.

docs/fundamentals/profiling.md:434

  • The startup workflow repeats the simulator settings for a physical device, so it still omits the ios-arm64 runtime identifier and the device UDID required to deploy to a USB-connected device. Replace this with an explicit physical-device build command; otherwise the documented startup trace may run against a simulator or fail to select the device.
Use the same `net11.0-ios` settings as the iOS simulator and
`dotnet-trace collect --dsrouter ios` from a macOS development host.
Keep the physical-device and simulator workflows separate.

docs/fundamentals/profiling.md:839

  • The .NET 11 memory-dump block has no Windows collection workflow. This article now presents Windows as a local CoreCLR diagnostic target and tells readers to use dotnet-gcdump, but this monikered section only provides Android, iOS, and Mac Catalyst commands. Add the equivalent Windows dotnet-gcdump collect -p <pid> flow (or link to an existing one).
**Mac Catalyst:**

Use the direct local CoreCLR endpoint instead of `--dsrouter`:

```sh
dotnet-trace ps
dotnet-gcdump collect -p <pid>
**docs/fundamentals/profiling.md:221**
* `ios-sim` and `ios` have opposite TCP topologies: the simulator router accepts a runtime TCP client, while the physical-device router connects over usbmux to a runtime TCP server. Therefore the simulator must use `connect` and only a physical device should use `listen`; the current description makes the simulator workflow incorrect.
  • DiagnosticListenMode: Uses connect for Android, where the
    app connects to the router. The .NET 11 iOS SDK uses listen,
    where the app listens for the router. Keep the iOS simulator and
    physical iOS device workflows separate.
**docs/fundamentals/profiling.md:286**
* This iOS simulator command sets `DiagnosticListenMode=listen`, but `dotnet-dsrouter ios-sim` accepts a runtime TCP client. The simulator app therefore needs `connect`; with `listen`, both sides wait for the other to connect and collection cannot start.

dotnet build -t:Run -c Release -f net11.0-ios -p:DiagnosticAddress=127.0.0.1 -p:DiagnosticPort=9000 -p:DiagnosticSuspend=false -p:DiagnosticListenMode=listen

**docs/fundamentals/profiling.md:293**
* The physical-device workflow cannot use the simulator's settings: the simulator must use `connect`, whereas the `ios` router for a USB-connected device connects to an app listening on the diagnostic port. This text would carry the simulator's incorrect `listen`/topology into the physical-device instructions.

Use the same net11.0-ios settings as the iOS simulator, but run
dotnet-trace collect --dsrouter ios from a macOS development host.
The ios router mode uses the USB-connected physical iOS device.

**docs/fundamentals/profiling.md:427**
* This startup command repeats the iOS simulator topology with `DiagnosticListenMode=listen`. `dotnet-dsrouter ios-sim` expects the simulator runtime to connect to its TCP server, so this value must be `connect`; `listen` is for the physical-device `ios` router.

dotnet build -t:Run -c Release -f net11.0-ios -p:DiagnosticAddress=127.0.0.1 -p:DiagnosticPort=9000 -p:DiagnosticSuspend=true -p:DiagnosticListenMode=listen

**docs/fundamentals/profiling.md:434**
* The physical startup workflow cannot reuse the simulator's listen mode. The simulator must use `connect`, while the USB `ios` router connects to a physical device that listens on the diagnostic port; this instruction should state the physical-device `listen` setting explicitly.

Use the same net11.0-ios settings as the iOS simulator and
dotnet-trace collect --dsrouter ios from a macOS development host.
Keep the physical-device and simulator workflows separate.

**docs/fundamentals/profiling.md:494**
* This runtime-profiling command also sets `DiagnosticListenMode=listen` for the simulator. The `ios-sim` router is the TCP server and requires the app to use `connect`; otherwise this collector cannot attach.

dotnet build -t:Run -c Release -f net11.0-ios -p:DiagnosticAddress=127.0.0.1 -p:DiagnosticPort=9000 -p:DiagnosticSuspend=false -p:DiagnosticListenMode=listen

**docs/fundamentals/profiling.md:819**
* The memory-dump simulator command has the same reversed topology: `ios-sim` expects the simulator runtime to connect to the router, so `DiagnosticListenMode` must be `connect`, not `listen`. The physical `ios` workflow can keep `listen`.

dotnet build -t:Run -c Release -f net11.0-ios -p:DiagnosticAddress=127.0.0.1 -p:DiagnosticPort=9000 -p:DiagnosticSuspend=false -p:DiagnosticListenMode=listen

**docs/fundamentals/profiling.md:50**
* This paragraph is outside a moniker, but its routing claim is only true for the new CoreCLR workflow. The `<=net-maui-10.0` section below packages the Mono diagnostic component for Mac Catalyst, and the repository's NativeAOT guidance describes Mac Catalyst tracing through `dotnet-dsrouter`; a .NET 10 reader is therefore told to use the wrong endpoint. Make this sentence version-neutral or scope it by moniker.

To profile .NET MAUI applications with the .NET diagnostic tools, you
need to install the following .NET global tools. The router is used
for the Android and iOS TCP workflows; Mac Catalyst and Windows use
their local diagnostic endpoints.


- **Files reviewed:** 2/2 changed files
- **Comments generated:** 0
- **Review effort level:** Lite
</details>

---

💡 <a href="/dotnet/docs-maui/new/main?filename=.github/skills/code-review/SKILL.md" class="Link--inTextBlock" target="_blank" rel="noopener noreferrer">Add a `code-review` agent skill</a> or configure MCP servers for context-aware, tailored reviews. <a href="https://docs.github.com/copilot/how-tos/use-copilot-agents/request-a-code-review/use-code-review?tool=webui#mcp-servers-and-agent-skills" class="Link--inTextBlock" target="_blank" rel="noopener noreferrer">Learn more in the docs.</a>

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@learn-build-service-prod

Copy link
Copy Markdown
Contributor

Learn Build status updates of commit 1760c79:

✅ Validation status: passed

File Status Preview URL Details
docs/deployment/performance.md ✅Succeeded View (>=net-maui-8.0)
docs/fundamentals/profiling.md ✅Succeeded View (>=net-maui-8.0)

For more details, please refer to the build report.

@learn-build-service-prod

Copy link
Copy Markdown
Contributor

PoliCheck Scan Report

The following report lists PoliCheck issues in PR files. Before you merge the PR, you must fix all severity-1 and severity-2 issues. The AI Review Details column lists suggestions for either removing or replacing the terms. If you find a false positive result, mention it in a PR comment and include this text: #policheck-false-positive. This feedback helps reduce false positives in future scans.

✅ No issues found

More information about PoliCheck

Information: PoliCheck | Severity Guidance | Term
For any questions: Try searching the learn.microsoft.com contributor guides or post your question in the Learn support channel.

Comment thread docs/fundamentals/profiling.md Resolved
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@learn-build-service-prod

Copy link
Copy Markdown
Contributor

Learn Build status updates of commit dfebe05:

✅ Validation status: passed

File Status Preview URL Details
docs/deployment/performance.md ✅Succeeded View (>=net-maui-8.0)
docs/fundamentals/profiling.md ✅Succeeded View (>=net-maui-8.0)

For more details, please refer to the build report.

@learn-build-service-prod

Copy link
Copy Markdown
Contributor

PoliCheck Scan Report

The following report lists PoliCheck issues in PR files. Before you merge the PR, you must fix all severity-1 and severity-2 issues. The AI Review Details column lists suggestions for either removing or replacing the terms. If you find a false positive result, mention it in a PR comment and include this text: #policheck-false-positive. This feedback helps reduce false positives in future scans.

✅ No issues found

More information about PoliCheck

Information: PoliCheck | Severity Guidance | Term
For any questions: Try searching the learn.microsoft.com contributor guides or post your question in the Learn support channel.

@vitek-karas
vitek-karas marked this pull request as ready for review September 11, 2026 20:32
@vitek-karas
vitek-karas requested a review from a team as a code owner September 11, 2026 20:32
@vitek-karas

Copy link
Copy Markdown
Member Author

@jonathanpeppers could you please review this? (I can't assign reviewers still waiting on getting into the right team to get write access into the repo)

Comment thread docs/fundamentals/profiling.md Resolved
Comment thread docs/fundamentals/profiling.md Resolved
Comment thread docs/fundamentals/profiling.md Resolved
Comment thread docs/fundamentals/profiling.md Resolved
Comment thread docs/fundamentals/profiling.md Resolved
Comment thread docs/fundamentals/profiling.md Resolved
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@learn-build-service-prod

Copy link
Copy Markdown
Contributor

PoliCheck Scan Report

The following report lists PoliCheck issues in PR files. Before you merge the PR, you must fix all severity-1 and severity-2 issues. The AI Review Details column lists suggestions for either removing or replacing the terms. If you find a false positive result, mention it in a PR comment and include this text: #policheck-false-positive. This feedback helps reduce false positives in future scans.

✅ No issues found

More information about PoliCheck

Information: PoliCheck | Severity Guidance | Term
For any questions: Try searching the learn.microsoft.com contributor guides or post your question in the Learn support channel.

@learn-build-service-prod

Copy link
Copy Markdown
Contributor

Learn Build status updates of commit ab84dae:

✅ Validation status: passed

File Status Preview URL Details
docs/deployment/performance.md ✅Succeeded View (>=net-maui-8.0)
docs/fundamentals/profiling.md ✅Succeeded View (>=net-maui-8.0)

For more details, please refer to the build report.

@jfversluis
jfversluis merged commit 797aff8 into dotnet:main Sep 24, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants