Skip to content
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

Add .NET MAUI Blazor Hybrid + Web App solution template #22234

Merged
merged 6 commits into from
May 9, 2024

Conversation

Eilon
Copy link
Member

@Eilon Eilon commented May 6, 2024

Description of Change

This adds a new template to dotnet new and in Visual Studio that creates a solution with .NET MAUI Blazor Hybrid app with a Blazor Web app, which share common code in a Razor Class Library project.

Here's what you'll see from the command line:

image

And from VS you get this template:

image

With these options:

image

And here's what the rough layout of files looks like:

image

And when you run the apps they look the same (because all the UI components are shared) - and include additional sample code for an IFormFactor interface to show how to write platform-specific services:

image

Most of the options from the Blazor Web project template are also available in this new template.

Issues Fixed

Fixes #1069

(This is a replacement for PR #21867)

New combined Blazor Hybrid + Web app solution template with shared UI in a Razor Class Library
@Eilon Eilon requested a review from javiercn May 6, 2024 20:06
@Eilon Eilon requested a review from a team as a code owner May 6, 2024 20:06
@Eilon Eilon requested review from mattleibow and rmarinho May 6, 2024 20:06
@Eilon Eilon added the area-blazor Blazor Hybrid / Desktop, BlazorWebView label May 6, 2024
javiercn
javiercn previously approved these changes May 6, 2024
Copy link
Member

@javiercn javiercn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great (to the extent that one can review these changes).

@Eilon Eilon enabled auto-merge (squash) May 8, 2024 15:49
@Eilon
Copy link
Member Author

Eilon commented May 8, 2024

@Redth / @mattleibow - everything is [finally] green on CI. The template content is reviewed by @javiercn and also I had @rmarinho review the eng changes. But I still need a sign-off for the auto-merge. Would one of you be able to assist?

Comment on lines +18 to +21
Debug|Any CPU = Debug|Any CPU
Debug|ARM64 = Debug|ARM64
Debug|x64 = Debug|x64
Debug|x86 = Debug|x86
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The only note here is do you need the platform achitectures here? Any CPU should be fine?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, it seems needed due to the Blazor Web side of things, as seen in the Blazor Web SLN template (used when there's an optional WebAssembly project): https://github.com/dotnet/aspnetcore/blob/main/src/ProjectTemplates/Web.ProjectTemplates/content/BlazorWeb-CSharp/BlazorWeb-CSharp.sln

@Eilon Eilon merged commit 837f579 into net9.0 May 9, 2024
49 checks passed
@Eilon Eilon deleted the eilon/blazor-solution-net9 branch May 9, 2024 16:35
@github-actions github-actions bot locked and limited conversation to collaborators Jun 9, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-blazor Blazor Hybrid / Desktop, BlazorWebView fixed-in-9.0.0-preview.5.24307.10
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants