Skip to content

Fix XAML intellisense and hot reload in Visual Studio 2022 #20851

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

Conversation

spadapet
Copy link
Contributor

This fix is for MAUI devs that edit and debug sample projects in Visual Studio (like Maui.Controls.Sample.Sandbox).

image

Those sample projects normally don't set UseMaui=true since control library projects are referenced directly in the solution. We need to instead set DefaultXamlRuntime=Maui in order for Visual Studio intellisense and XAML hot reload to work. VS uses either UseMaui or DefaultXamlRuntime to determine the XAML runtime.

For sample MAUI projects that don't set UseMaui=true, we need to instead set DefaultXamlRuntime=true for Visual Studio intellisense and XAML hot reload to work.
@spadapet spadapet requested a review from a team as a code owner February 26, 2024 21:54
@spadapet spadapet enabled auto-merge February 26, 2024 22:02
@rmarinho rmarinho removed their request for review February 26, 2024 22:27
@spadapet spadapet merged commit ad1a203 into main Feb 27, 2024
@spadapet spadapet deleted the dev/peterspa/XamlEditingAndHotReloadForSampleProjects branch February 27, 2024 09:36
@github-actions github-actions bot locked and limited conversation to collaborators Mar 29, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants