Skip to content
Closed
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,6 +10,9 @@
<_MauiXamlInflator Condition="' $(MauiXamlInflator)' != '' ">$(MauiXamlInflator)</_MauiXamlInflator>
<_MauiXamlInflator Condition=" '$(MauiXamlInflator)' == '' ">SourceGen</_MauiXamlInflator>

<!-- XAML Hot Reload mode for IDE communication (Legacy or SourceGen) -->
<MauiXamlHotReload Condition="'$(MauiXamlHotReload)' == ''">Legacy</MauiXamlHotReload>

<EnableMauiXamlDiagnostics Condition=" '$(EnableMauiXamlDiagnostics)' == '' ">$(EnableMauiDiagnostics)</EnableMauiXamlDiagnostics>
<EnableMauiXamlDiagnostics Condition=" '$(EnableMauiXamlDiagnostics)' == '' And '$(Configuration)' == 'Debug' ">$(EnableDiagnostics)</EnableMauiXamlDiagnostics>
<EnableMauiXamlDiagnostics Condition=" '$(EnableMauiXamlDiagnostics)' == '' And '$(Configuration)' == 'Debug' ">true</EnableMauiXamlDiagnostics>
Expand Down Expand Up @@ -73,6 +76,23 @@
Condition="'$(_MauiTargetsImportedAgain)' == 'True'" />
</Target>

<!-- Validate MauiXamlHotReload values (case-insensitive) -->
<Target Name="_ValidateMauiXamlHotReload" BeforeTargets="_CheckForInvalidConfigurationAndPlatform">
<PropertyGroup>
<_MauiXamlHotReloadUpper>$([System.String]::Copy('$(MauiXamlHotReload)').Trim().ToUpperInvariant())</_MauiXamlHotReloadUpper>
</PropertyGroup>

<Warning
Code="MAUI1002"
Text="MauiXamlHotReload is set to 'SourceGen'. Source generator-based XAML Hot Reload is experimental and not yet fully implemented. Use at your own risk."
Condition="'$(_MauiXamlHotReloadUpper)' == 'SOURCEGEN'" />

<Warning
Code="MAUI1003"
Text="MauiXamlHotReload is set to an unrecognized value '$(MauiXamlHotReload)'. Supported values are 'Legacy' and 'SourceGen'."
Condition="'$(_MauiXamlHotReloadUpper)' != '' and '$(_MauiXamlHotReloadUpper)' != 'SOURCEGEN' and '$(_MauiXamlHotReloadUpper)' != 'LEGACY'" />
</Target>

<Target Name="_ValidateMSBuild" BeforeTargets="_CheckForInvalidConfigurationAndPlatform">
<Error Code="XF003"
Text="Microsoft.Maui requires msbuild. xbuild is no longer supported."
Expand Down
Loading