Skip to content

Blazor WebAssembly: Placeholder in index.html not replaced after publish in hosted configuration (.NET 10 RC2) #64199

@rkttu

Description

@rkttu

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

When publishing a hosted Blazor WebAssembly application using Visual Studio 2026 Insider's publish profile, the placeholder #[.{fingerprint}] in index.html is not being replaced with the actual fingerprinted filename, resulting in a broken application.

Expected Behavior

The index.html file should contain a script reference with the actual fingerprinted filename:

<script src="_framework/blazor.webassembly.abc123.js"></script>

Actual Behavior
The index.html file contains an unreplaced placeholder:

<script src="_framework/blazor.webassembly#[.{fingerprint}].js"></script>

This causes the application to fail to load in the browser.

Steps To Reproduce

  1. Create a hosted Blazor WebAssembly project targeting .NET 10:
dotnet new blazorwasm -ho -o MyBlazorApp -f net10.0
  1. Create an ASP.NET empty web application project targeting .NET 10.

  2. Verify Server project references Client project in Server/Server.csproj:

<ItemGroup>
  <ProjectReference Include="..\Client\Client.csproj" />
</ItemGroup>
  1. Create a publish profile in Visual Studio with the following configuration (or use the attached profile):
Target: FileSystem
Configuration: Release
Target Framework: net10.0
Runtime Identifier: win-x64
Self-contained: true
  1. Publish the Server project using Visual Studio 2026 Insider or:
cd Server
dotnet publish -c Release -r win-x64 --self-contained true
  1. Inspect bin/Release/net10.0/win-x64/publish/wwwroot/index.html

Exceptions (if any)

No response

.NET Version

10.0.100-rc.2.25502.107

Anything else?

  • The application works correctly when running locally with dotnet run or F5 in Visual Studio
  • The issue only occurs after publishing (using either Visual Studio or dotnet publish)
  • The _framework directory in the publish output contains the WebAssembly files, but the script filename doesn't match the placeholder pattern
  • Client project uses Microsoft.NET.Sdk.BlazorWebAssembly SDK

Metadata

Metadata

Assignees

No one assigned

    Labels

    Needs: Author FeedbackThe author of this issue needs to respond in order for us to continue investigating this issue.Status: No Recent Activityarea-blazorIncludes: Blazor, Razor Components

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions