microsoft / microsoft/aspire

When running blazor project via aspire.cli (not Aspire in VS, not separately), blazor.web.js 404s

Open
#13,817 1 comment 1 reaction 0 assignees View on GitHub
area-tooling
Dominant language
C#
Stars
6.3k
Forks
991
Avg merge
2d 15h
Merged PRs (30d)
196

Description

### Is there an existing issue for this?

- [x] I have searched the existing issues

### Describe the bug

https://github.com/dotnet/aspnetcore/issues/64985

When trying to contribute to Wiremock.net I've noticed when the web-project that's part of their Aspire examples is run within the context of *Aspire CLI*, blazor fails due to requests for blazor.web.js failing with 404 (from kestrel).

When the project is run standalone it all works fine. When the project runs from VS (win) as startup aspire host project, it is fine.

### Expected Behavior

It should work.

### Steps To Reproduce

1. Clone https://github.com/petrroll/WireMock.Net/tree/petrhouska/update-aspire
2. Run (using aspire cli) `aspire run ./examples-Aspire/AspireApp1.AppHost/AspireApp1.AppHost.csproj`
3. Open the webfrontend portal
4. Observe 404 error for `blazor.web.js` (and generally broken blazor experience on /weather

### Exceptions (if any)

GET https://localhost:7263/_framework/blazor.web.js net::ERR_ABORTED 404 (Not Found)
Responder is Kestrel, so there's no caching shenanigans

### .NET Version info

10.0.101

### Anything else?

aspire --version
13.1.0+8a4db1775c3fbae1c602022b636299cb04971fde

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.