Skip to content

Avoid qualified name in x:Type binding for Blazor Hybrid template #29005

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 15, 2025

Conversation

BretJohnson
Copy link

Description of Change

Use an explicit XML namespace for Component, avoiding use qualified name syntax in the x:Type binding. Qualified names (like local:Components.Routes) aren't currently supported by XAML Hot Reload, producing the error
"Nested types are not supported: Components.Routes" and causing XAML Hot Reload to not work. This support is coming in a future VS update, but for now it's best to avoid using of the qualified name syntax in our templates, to keep things broadly compatible and working for new users. We don't use qualified names in XAML bindings anywhere else in MAUI XAML templates; this is the last occurrence.

Issues Fixed

Fixes #20669

Use an explicit XML namespace for Component, avoiding use
qualified name syntax in the x:Type binding. Qualified names
(like `local:Components.Routes`) aren't currently supported by
XAML Hot Reload, producing the error
"Nested types are not supported: Components.Routes"
and causing XAML Hot Reload to not work. This support
is coming in a future VS update, but for now it's best to avoid
using of the qualified name syntax in our templates, to keep
things broadly compatible and working for new users. We
don't use qualified names in XAML bindings anywhere else
in MAUI XAML templates; this is the last occurrence.

Fixes #20669
@Copilot Copilot AI review requested due to automatic review settings April 15, 2025 16:57
@BretJohnson BretJohnson requested a review from a team as a code owner April 15, 2025 16:57
Copy link
Contributor

@Copilot 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.

Copilot wasn't able to review any files in this pull request.

Files not reviewed (1)
  • src/Templates/src/templates/maui-blazor/MainPage.xaml: Language not supported

@mattleibow mattleibow added the area-templates Project templates, Item Templates for Blazor and MAUI label Apr 15, 2025
@mattleibow mattleibow merged commit 793db81 into main Apr 15, 2025
19 checks passed
@mattleibow mattleibow deleted the dev/bretjohn/update-blazor-hybrid-template branch April 15, 2025 21:25
@mattleibow
Copy link
Member

/backport to release/9.0.1xx-sr5

@mattleibow
Copy link
Member

/backport to release/9.0.1xx-sr6

Copy link
Contributor

Started backporting to release/9.0.1xx-sr5: https://github.com/dotnet/maui/actions/runs/14479689953

Copy link
Contributor

Started backporting to release/9.0.1xx-sr6: https://github.com/dotnet/maui/actions/runs/14479691682

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-templates Project templates, Item Templates for Blazor and MAUI fixed-in-9.0.61
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Blazor Hybrid] BlazorWebView ComponentType error blocks XAML Hot Reload updates
4 participants