Skip to content

Aspnetcore has a sample of Blazor wasm standalone in-tree - #64624

Closed
ilonatommy wants to merge 5 commits into
dotnet:mainfrom
ilonatommy:add-standalone-sample
Closed

Aspnetcore has a sample of Blazor wasm standalone in-tree#64624
ilonatommy wants to merge 5 commits into
dotnet:mainfrom
ilonatommy:add-standalone-sample

Conversation

@ilonatommy

Copy link
Copy Markdown
Member

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.

@ilonatommy ilonatommy self-assigned this Dec 3, 2025
Copilot AI review requested due to automatic review settings December 3, 2025 09:14
@ilonatommy
ilonatommy requested review from a team and wtgodbe as code owners December 3, 2025 09:14
@ilonatommy ilonatommy added area-blazor Includes: Blazor, Razor Components Samples labels Dec 3, 2025

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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

Comment thread src/Components/Samples/BlazorWasmStandalone/App.razor
Comment thread src/Components/Samples/BlazorWasmStandalone/Pages/Weather.razor
Comment thread src/Components/Samples/BlazorWasmStandalone/Pages/Counter.razor
Comment thread src/Components/Samples/BlazorWasmStandalone/Layout/NavMenu.razor
Comment thread src/Components/Samples/BlazorWasmStandalone/Layout/MainLayout.razor
@javiercn

javiercn commented Dec 3, 2025

Copy link
Copy Markdown
Member

@ilonatommy have you checked under webassembly/samples? I believe there is one there.

@ilonatommy

Copy link
Copy Markdown
Member Author

@ilonatommy have you checked under webassembly/samples? I believe there is one there.

yes but old one and not standalone:
https://github.com/dotnet/aspnetcore/tree/main/src/Components/WebAssembly/Samples

@ilonatommy

Copy link
Copy Markdown
Member Author

@ilonatommy have you checked under webassembly/samples? I believe there is one there.

We can check it this way: searching for Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" in the repo: https://github.com/search?q=repo%3Adotnet%2Faspnetcore%20Include%3D%22Microsoft.AspNetCore.Components.WebAssembly.DevServer%22&type=code

@dotnet-policy-service

Copy link
Copy Markdown
Contributor

Looks like this PR hasn't been active for some time and the codebase could have been changed in the meantime.
To make sure no conflicting changes have occurred, please rerun validation before merging. You can do this by leaving an /azp run comment here (requires commit rights), or by simply closing and reopening.

@dotnet-policy-service dotnet-policy-service Bot added the pending-ci-rerun When assigned to a PR indicates that the CI checks should be rerun label Dec 18, 2025
@javiercn

javiercn commented Aug 7, 2026

Copy link
Copy Markdown
Member

@ilonatommy I think this was superseded by #67497

@ilonatommy

Copy link
Copy Markdown
Member Author

@ilonatommy ilonatommy closed this Aug 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-blazor Includes: Blazor, Razor Components pending-ci-rerun When assigned to a PR indicates that the CI checks should be rerun Samples

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants