-
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 empty (no sample content) option for Blazor Hybrid #23615
Conversation
@javiercn / @MackinnonBuck / @SteveSandersonMS - could I please get a Blazor code review for this change? |
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.
Only have 1 comment.
Does the template match the option on the web template? Doesn't the checkbox on the web template say something like "Include Sample content"?
And perhaps to clarify... or make things more confusing... the UI option in VS is Here's the rough logic from the template.json: "IncludeSampleContent": { // this is the UI option in VS (also available in command line)
"defaultValue": "true",
"displayName": "_Include sample pages",
},
"Empty": { // this UI option is command-line only
"defaultValue": "false",
},
"SampleContent": { // this is the computed value that uses the two previous options to decide what should be generated
"type": "computed",
"value": "(IncludeSampleContent) || (!Empty)"
} |
@mattleibow / @Redth / @rmarinho - can I get a MAUI review so that this can get merged? It's been Blazor-approved. |
Also removed unneeded favicon.
The option is available via command line by running
dotnet new maui-blazor --Empty
, or in Visual Studio:To see the effect of the new option, check out this PR diff comparing the default option (with sample content) to the empty option (no sample content): https://github.com/Eilon/MauiBlazorHybridEmpty/pull/1/files
The change is based on what the Blazor Web template does, and what was already replicated in the .NET 9 MAUI Blazor + Web App template (which already has the Empty option).
Fixes #9126, #16542