-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Conversation
New combined Blazor Hybrid + Web app solution template with shared UI in a Razor Class Library
There was a problem hiding this 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).
@Redth / @mattleibow - everything is [finally] green on CI. The template content is reviewed by @javiercn and also I had @rmarinho review the |
Debug|Any CPU = Debug|Any CPU | ||
Debug|ARM64 = Debug|ARM64 | ||
Debug|x64 = Debug|x64 | ||
Debug|x86 = Debug|x86 |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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
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:
And from VS you get this template:
With these options:
And here's what the rough layout of files looks like:
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: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)