Repository navigation
Description
Description
With source-generated XAML Hot Reload enabled, editing a resource owned by Application.Resources is reported as applied, but neither existing nor newly created consumers observe the updated value. A page-owned resource edited in the same session updates correctly.
The same failure occurs when the resource is declared inline in App.xaml, so this is not limited to merged dictionaries.
Internal tracking: DevDiv 3049805
Steps to Reproduce
- Target .NET 11 Preview 7 / MAUI Preview 7 on WinUI and enable:
<MauiXamlInflator>SourceGen</MauiXamlInflator> <MauiXamlHotReload>SourceGen</MauiXamlHotReload>
- In
App.xaml, declare or merge a dictionary containing:<x:String x:Key="ExploratoryCaption">App resource V0</x:String>
- Consume it from a page:
<Label Text="{DynamicResource ExploratoryCaption}" />
- Run the app under
dotnet watchand verify the label showsApp resource V0. - Change the resource to
App resource V1and save. - Inspect the current page, then create or navigate to a new page that consumes the resource.
Expected Behavior
Existing and newly created consumers show App resource V1.
Actual Behavior
The update is reported as applied, but both consumers continue to show App resource V0. A resource owned by ContentPage.Resources updates successfully in the same session.
Version with bug
.NET 11 Preview 7 / MAUI Preview 7 with SourceGen XAML inflation and Hot Reload enabled.
Affected platforms
Windows was verified. The affected path appears to be cross-platform generated/runtime resource update code.
Related issues
- [XAML Hot Reload] Reconcile complex property and collection updates #36732 tracks unsupported complex-property and collection reconciliation, including merged-dictionary structural edits. This issue also reproduces with an inline application resource and tracks the application-resource propagation boundary specifically.
- [XSG] XamlHotReloadState static cache is brittle across multiple throwaway Roslyn compilations #36937 may be relevant to updates reported as applied with no visible change, but is not required for this repro.
Activity
Fix SourceGen hot reload for application resources (#37896)
github-actions commentedon Aug 28, 2026
Closed by #37896 (merged to
net11.0). GitHub only auto-closes for PRs merged to the default branch; this issue was fixed by a PR merged to a non-default branch.JanKrivanek commentedon Sep 7, 2026
This still reproduces in the VS Code C# Hot Reload E2E pipeline with MAUI
11.0.0-preview.7.26451.9, which contains the fix from #37896.Across the Sep 5–7 daily runs, all 17 executions that reached the assertion failed with the same result: the merged app resource remained
App resource V0after an update expectedV1/B1.Examples: Sep 5 – iOS, Sep 6 – Android, Sep 7 – MacCatalyst.
The Sep 7 diagnostics report
Connection: Connected,Project System: Applied, successful on-device delta confirmation, and no app restart. This suggests the fix is incomplete for anx:Stringin an externalResourceDictionarymerged throughApp.xaml, rather than a pipeline/startup failure.[XAML] Fix classless app resource Hot Reload (#38409)