Skip to content

Fix scoped CSS hot reload for hosted Blazor WebAssembly - #55799

Draft
tmat with Copilot wants to merge 2 commits into
mainfrom
copilot/fix-dotnet-watch-format-exception
Draft

Fix scoped CSS hot reload for hosted Blazor WebAssembly#55799
tmat with Copilot wants to merge 2 commits into
mainfrom
copilot/fix-dotnet-watch-format-exception

Conversation

Copilot AI commented Aug 16, 2026

Copy link
Copy Markdown
Contributor

dotnet watch launched on an ASP.NET Core host could crash while processing scoped CSS changes from its referenced Blazor WebAssembly project. Static-asset resolution used the server project instead of the client project that owns the CSS bundle.

  • Static asset ownership

    • Track a watch process’s static-asset project separately from its launching project.
    • Associate hosted Blazor processes with the WebAssembly client project.
  • Scoped CSS updates

    • Resolve client scoped-CSS bundles from the client static-assets manifest.
    • Deliver resulting updates through the running server’s browser-refresh connection.
  • Regression coverage

    • Extend the hosted Blazor watch test asset with scoped CSS.
    • Verify editing it produces a static-asset update.
public override ProjectGraphNode LaunchingProject => serverProject;
public override ProjectGraphNode StaticAssetProject => clientProject;

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
3 pipeline(s) were filtered out due to trigger conditions.
There may be pipelines that require an authorized user to comment /azp run to run.

Co-authored-by: tmat <41759+tmat@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix dotnet watch crash due to FormatException on scoped CSS edit Fix scoped CSS hot reload for hosted Blazor WebAssembly Aug 16, 2026
Copilot AI requested a review from tmat August 16, 2026 16:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

dotnet watch crashes with a FormatException when editing a scoped CSS file

2 participants