Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,13 @@
<_MauiXamlInflator Condition="' $(MauiXamlInflator)' != '' ">$(MauiXamlInflator)</_MauiXamlInflator>
<_MauiXamlInflator Condition=" '$(MauiXamlInflator)' == '' ">SourceGen</_MauiXamlInflator>

<!-- XAML Incremental Hot Reload (XIHR): off by default. Hot reload is a dev-time feature; when
enabled it emits per-page registry calls and keeps the runtime feature switch on. Set
<EnableMauiIncrementalHotReload>true</...> to opt in (legacy XAML Hot Reload remains the
default fallback). Resolves to an explicit true/false so the value always flows to the source
generator and runtime config. -->
<!-- XAML Incremental Hot Reload (XIHR): on by default for .NET 11 projects (Preview 7). Hot reload is a
dev-time feature; when enabled it emits per-page registry calls and keeps the runtime feature
switch on, so it defaults on for Debug builds only and stays off for Release/publish, where the
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>
<EnableMauiIncrementalHotReload Condition="'$(EnableMauiIncrementalHotReload)' == ''">false</EnableMauiIncrementalHotReload>

<!-- XAML Hot Reload mode for IDE communication (Legacy or SourceGen) -->
Expand Down
2 changes: 1 addition & 1 deletion src/Controls/tests/Xaml.UnitTests/MSBuild/MSBuildTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,7 @@ public void HotReloadSupportForXSG(string configuration)
project.Save(projectFile);
// Pin XIHR off: this test covers the legacy ResourceProvider2 hot-reload fallback
// (InitializeComponentRuntime), which XAML Incremental Hot Reload intentionally supersedes
// when enabled. XIHR is off by default (opt-in), but pin it explicitly here. See dotnet/maui#36682.
// when enabled (on by default in Debug). See dotnet/maui#36682.
Build(projectFile, additionalArgs: $"-c {configuration} -p:MauiXamlInflator=SourceGen -p:EnableMauiIncrementalHotReload=false -p:EmitCompilerGeneratedFiles=True -p:CompilerGeneratedFilesOutputPath=Generated");

var generatorDirectory = IOPath.Combine(tempDirectory, "Generated", "Microsoft.Maui.Controls.SourceGen", "Microsoft.Maui.Controls.SourceGen.XamlGenerator");
Expand Down
Loading