-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Aspnetcore has a sample of Blazor wasm standalone in-tree #64624
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
base: main
Are you sure you want to change the base?
Conversation
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.
Pull request overview
This PR adds a new in-tree sample application for Blazor WebAssembly Standalone to complement the existing Blazor Web sample. The sample demonstrates pure client-side hosting and provides a canonical reference project for developers and automated tools working with standalone WebAssembly applications.
Key Changes
- New BlazorWasmStandalone sample project with standard Blazor components (Counter, Weather, Home pages)
- Complete project structure including layouts, styling, and static assets
- Added DevServer project reference to ProjectReferences.props
Reviewed changes
Copilot reviewed 17 out of 20 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| BlazorWasmStandalone.csproj | Project configuration for Blazor WebAssembly SDK with necessary references |
| Program.cs | Application entry point with WebAssembly host configuration |
| App.razor | Router setup with NotFound page handling |
| Layout components | MainLayout and NavMenu for consistent navigation structure |
| Page components | Home, Counter, and Weather demonstration pages |
| wwwroot files | Static assets including index.html, CSS, Bootstrap, favicon, and sample data |
| ProjectReferences.props | Added DevServer project reference for build integration |
|
@ilonatommy have you checked under webassembly/samples? I believe there is one there. |
yes but old one and not standalone: |
We can check it this way: searching for |
We should keep our samples aligned with the scenarios we actively invest in. We already ship an in-tree sample for Blazor Web (https://github.com/dotnet/aspnetcore/tree/main/src/Components/Samples/BlazorUnitedApp) , but we still lacked a counterpart for Blazor WebAssembly Standalone. Adding this sample fills that gap and gives both developers and automated agents a canonical project to reference when troubleshooting or experimenting with pure client-side hosting.
I am not sure about the placing of the sample. Another location would be next to wasm hosted sample: https://github.com/dotnet/aspnetcore/tree/main/src/Components/WebAssembly/Samples/HostedBlazorWebassemblyApp
that is the old version of blazor web.