Skip to content

[XAML Hot Reload] SourceGen application-level resource edits do not reach live consumers #37888

Closed

Description

@StephaneDelcroix

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

  1. Target .NET 11 Preview 7 / MAUI Preview 7 on WinUI and enable:
    <MauiXamlInflator>SourceGen</MauiXamlInflator>
    <MauiXamlHotReload>SourceGen</MauiXamlHotReload>
  2. In App.xaml, declare or merge a dictionary containing:
    <x:String x:Key="ExploratoryCaption">App resource V0</x:String>
  3. Consume it from a page:
    <Label Text="{DynamicResource ExploratoryCaption}" />
  4. Run the app under dotnet watch and verify the label shows App resource V0.
  5. Change the resource to App resource V1 and save.
  6. 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

Activity

  1. added
    t/bug
    area-xaml
    area-tooling
    partner/hot-reload-xaml
    on Aug 27, 2026
  2. added
    s/triaged
    on Aug 27, 2026
  3. added a commit that references this issue on Aug 28, 2026
    00db49a
  4. github-actions commented on Aug 28, 2026

    @github-actions
    Contributor

    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.

  5. JanKrivanek commented on Sep 7, 2026

    @JanKrivanek
    Member

    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 V0 after an update expected V1/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 an x:String in an external ResourceDictionary merged through App.xaml, rather than a pipeline/startup failure.

  6. added a commit that references this issue on Sep 10, 2026
    c8103a9
  7. locked and limited conversation to collaborators on Oct 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

area-toolingarea-xamlpartner/hot-reload-xamlplatform/windowss/triagedt/bug

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions