[release/11.0.1xx-preview7] [XAML] Re-enable Incremental Hot Reload by default in Debug - #37163
Merged
PureWeen merged 1 commit intoAug 6, 2026
Conversation
<!-- Please let the below note in for people that find this PR --> > [!NOTE] > Are you waiting for the changes in this PR to be merged? > It would be very helpful if you could [test the resulting artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from this PR and let us know in a comment if this change resolves your issue. Thank you! ### Description Re-enables XAML Incremental Hot Reload (XIHR) by default for Debug builds on `net11.0`. This undoes the temporary opt-out from #36832 now that the deterministic generation and Edit-and-Continue stability fixes from #36833 are merged. ### Behavior | Configuration | `EnableMauiIncrementalHotReload` | `MauiXamlHotReload` | |---|---|---| | Debug (default) | `true` | `SourceGen` | | Release / publish (default) | `false` | `Legacy` | | Debug + explicit `false` | `false` | `Legacy` | | Release + explicit `true` | `true` | `SourceGen` | The legacy fallback test remains explicitly pinned to XIHR-off and its comment now reflects the restored Debug default. ### Testing - Evaluated the MSBuild property cascade for the four configurations above. - `MSBuildTests.BuildAProject` - `MSBuildTests.HotReloadSupportForXSG` (Debug and Release) Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
|
Azure Pipelines: Successfully started running 1 pipeline(s). There may be pipelines that require an authorized user to comment /azp run to run. |
Redth
approved these changes
Aug 6, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
This PR backports the change to re-enable XAML Incremental Hot Reload (XIHR) by default for Debug builds while keeping Release/publish defaults disabled, and updates the related MSBuild unit test comment to reflect the new default behavior.
Changes:
- Sets
EnableMauiIncrementalHotReloadto defaulttruein Debug (when unset) andfalseotherwise. - Keeps
MauiXamlHotReloaddefaulting toSourceGenwhen XIHR is enabled, otherwiseLegacy. - Updates the MSBuild test comment to reflect XIHR being on-by-default in Debug.
Show a summary per file
| File | Description |
|---|---|
| src/Controls/tests/Xaml.UnitTests/MSBuild/MSBuildTests.cs | Updates test commentary to reflect the restored Debug default while still pinning XIHR off for the legacy fallback scenario. |
| src/Controls/src/Build.Tasks/nuget/buildTransitive/netstandard2.0/Microsoft.Maui.Controls.targets | Implements the Debug-default property cascade for XIHR and ties the IDE hot reload mode default to that value. |
Copilot's findings
- Files reviewed: 2/2 changed files
- Comments generated: 1
| registry calls and runtime switch trim away. Set <EnableMauiIncrementalHotReload>false</...> to | ||
| opt out (legacy XAML Hot Reload remains available as a fallback). Resolves to an explicit | ||
| true/false so the value always flows to the source generator and runtime config. --> | ||
| <EnableMauiIncrementalHotReload Condition="'$(EnableMauiIncrementalHotReload)' == '' and '$(Configuration)' == 'Debug'">true</EnableMauiIncrementalHotReload> |
PureWeen
temporarily deployed
to
copilot-pat-pool
August 6, 2026 23:17 — with
GitHub Actions
Inactive
Contributor
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/dotnet/maui/main/eng/scripts/get-maui-pr.sh | bash -s -- 37163Or
iex "& { $(irm https://raw.githubusercontent.com/dotnet/maui/main/eng/scripts/get-maui-pr.ps1) } 37163" |
PureWeen
temporarily deployed
to
copilot-pat-pool
August 6, 2026 23:17 — with
GitHub Actions
Inactive
PureWeen
temporarily deployed
to
copilot-pat-pool
August 6, 2026 23:18 — with
GitHub Actions
Inactive
PureWeen
temporarily deployed
to
copilot-pat-pool
August 6, 2026 23:20 — with
GitHub Actions
Inactive
PureWeen
had a problem deploying
to
copilot-pat-pool
August 6, 2026 23:22 — with
GitHub Actions
Failure
PureWeen
temporarily deployed
to
copilot-pat-pool
August 6, 2026 23:22 — with
GitHub Actions
Inactive
davidortinau
added a commit
to davidortinau/docs-maui
that referenced
this pull request
Aug 11, 2026
…binding fallback XAML Incremental Hot Reload is enabled by default for Debug builds and disabled for Release and publish builds, per dotnet/maui#37163 (backport of #37157), which reverted the temporary opt-out in #36832. Show the MSBuild property as an opt-out instead of an opt-in, and note that edits are applied by .NET Hot Reload hosts such as dotnet watch, because the engine uses a MetadataUpdateHandler. Correct the AOT-safe compiled RelativeSource binding fallback. For an x:Reference binding the compiler resolves the referenced element's type and compiles against it, and falls back to the runtime binding path only when the binding path can't be compiled against that type. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 35c845e8-c26a-4489-b9de-2c1d32638c6d
This was referenced Aug 11, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Note
Are you waiting for the changes in this PR to be merged?
It would be very helpful if you could test the resulting artifacts from this PR and let us know in a comment if this change resolves your issue. Thank you!
Backport of #37157 to release/11.0.1xx-preview7
Re-enables XAML Incremental Hot Reload by default for Debug builds while preserving the opt-out and keeping Release/publish builds disabled by default. The legacy hot-reload fallback MSBuild test remains explicitly pinned to XIHR off.
Validation
6bb9daf7aa47bde8e750635959e7c4db3c46561eexactly (git range-diff).dotnet build Microsoft.Maui.BuildTasks.slnfpassed with 0 warnings and 0 errors.MSBuildTests.HotReloadSupportForXSGpassed for Debug and Release (2/2).git diff --checkpasses.cc @PureWeen @Redth