Skip to content

Conversation

@ilonatommy
Copy link
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 finished reviewing on behalf of ilonatommy December 3, 2025 09:16
Copy link
Contributor

Copilot AI left a 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

@javiercn
Copy link
Member

javiercn commented Dec 3, 2025

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

@ilonatommy
Copy link
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
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

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 Samples

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants