Skip to content

Add MauiXamlHotReload to the list of CompilerVisibleProperties#34405

Merged
StephaneDelcroix merged 2 commits intodotnet:mainfrom
noiseonwires:mauixamlhotreload-compilervisibleproperty
Mar 10, 2026
Merged

Add MauiXamlHotReload to the list of CompilerVisibleProperties#34405
StephaneDelcroix merged 2 commits intodotnet:mainfrom
noiseonwires:mauixamlhotreload-compilervisibleproperty

Conversation

@noiseonwires
Copy link
Copy Markdown
Contributor

@noiseonwires noiseonwires commented Mar 10, 2026

The MauiXamlHotReload MSBuild property was introduced in #34028 but was not registered as a compiler-visible property. Without this entry, Roslyn source generators cannot read the property value via AnalyzerConfigOptions.GlobalOptions. This change makes it accessible so IDE and source generators can adjust their behavior based on the configured hot reload mode (Legacy or SourceGen).

Copilot AI review requested due to automatic review settings March 10, 2026 13:41
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 10, 2026

🚀 Dogfood this PR with:

⚠️ WARNING: Do not do this without first carefully reviewing the code of this PR to satisfy yourself it is safe.

curl -fsSL https://raw.githubusercontent.com/dotnet/maui/main/eng/scripts/get-maui-pr.sh | bash -s -- 34405

Or

  • Run remotely in PowerShell:
iex "& { $(irm https://raw.githubusercontent.com/dotnet/maui/main/eng/scripts/get-maui-pr.ps1) } 34405"

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR ensures the MauiXamlHotReload MSBuild property is visible to Roslyn (via AnalyzerConfigOptions.GlobalOptions) by registering it as a compiler-visible property in the Controls build-transitive targets. This aligns with the intent of #34028 so IDE tooling and source generators can adapt behavior based on the configured XAML Hot Reload mode.

Changes:

  • Add MauiXamlHotReload to the CompilerVisibleProperty item list in Controls’ common build targets.

@StephaneDelcroix StephaneDelcroix merged commit 76e044d into dotnet:main Mar 10, 2026
3 of 12 checks passed
@dotnet-policy-service dotnet-policy-service bot added the community ✨ Community Contribution label Mar 10, 2026
@dotnet-policy-service
Copy link
Copy Markdown
Contributor

Hey there @@noiseonwires! Thank you so much for your PR! Someone from the team will get assigned to your PR shortly and we'll get it reviewed.

kubaflo pushed a commit to kubaflo/maui that referenced this pull request Mar 10, 2026
…t#34405)

The MauiXamlHotReload MSBuild property was introduced in dotnet#34028 but was
not registered as a compiler-visible property. Without this entry,
Roslyn source generators cannot read the property value via
AnalyzerConfigOptions.GlobalOptions. This change makes it accessible so
IDE and source generators can adjust their behavior based on the
configured hot reload mode (Legacy or SourceGen).

Co-authored-by: Kirill Ovchinnikov <kovchinnikov@microsoft.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

community ✨ Community Contribution

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants