Skip to content

.NET 11 RC2 regression: Web SDK app referencing a Web SDK library fails in Debug: "scoped css bundles do not have matching endpoints" #56656

Open

Description

@Tragetaschen

Describe the bug

Since 11.0.100-rc.2, a Debug build of a Microsoft.NET.Sdk.Web project fails when it has a ProjectReference to another Microsoft.NET.Sdk.Web project with OutputType=Library. Neither project has a wwwroot, Razor components or other static web assets of its own.

The asset in the error is the dotnet-watch browser-tools JS initializer added in #56118 (backported to release/11.0.1xx in #56362). As far as I can tell, each referenced Web SDK project contributes its own build-only initializer as a JSModule/JSLibraryModule asset. The consuming project's GenerateJSModuleManifestBuildStaticWebAssets then finds no endpoint for it. The error shows up once per referenced Web SDK project.

Steps to reproduce

Full repro: https://gist.github.com/Tragetaschen/94386201172001758266a244b371a745

Equivalent steps:

dotnet new web -o App
dotnet new web -o Lib
  • In Lib/Lib.csproj, set <OutputType>Library</OutputType> and delete Lib/Program.cs.
  • Add the reference: dotnet add App reference Lib/Lib.csproj.
dotnet build App -c Debug

Expected behavior

The build succeeds, as it does with 11.0.100-rc.1.26425.128 and .NET 10

Actual behavior

...\Sdks\Microsoft.NET.Sdk.StaticWebAssets\targets\Microsoft.NET.Sdk.StaticWebAssets.JSModules.targets(233,3): error : The following scoped css bundles do not have matching endpoints: _framework/Microsoft.NET.Sdk.BlazorWeb.DotNetWatch#[.{fingerprint}]!.lib.module.js [...\App\App.csproj]

Is this a regression?

yes

SDK / configuration Result
11.0.100-rc.2.26504.105, Debug fails
11.0.100-rc.2.26504.105, Release builds
11.0.100-rc.2.26504.105, Debug, EnableHotReloadInRuntimeConfigDevFile=false in Lib builds
11.0.100-rc.1.26425.128, Debug builds

Are there any workarounds?

Set <EnableHotReloadInRuntimeConfigDevFile>false</EnableHotReloadInRuntimeConfigDevFile> in the referenced library project.

dotnet --info output

.NET SDK:
 Version:           11.0.100-rc.2.26504.105
 Commit:            820230c386
 Workload version:  11.0.100-manifests.939e2b91
 MSBuild version:   18.12.0-1.26504.105+820230c38

Runtime Environment:
 OS Name:     Windows
 OS Version:  10.0.26200
 OS Platform: Windows
 RID:         win-x64
 Base Path:   C:\Program Files\dotnet\sdk\11.0.100-rc.2.26504.105

.NET workloads installed:
There are no installed workloads to display.
Configured to use workload sets when installing new manifests.
No workload sets are installed. Run "dotnet workload restore" to install a workload set.

Host:
  Version:      11.0.0-rc.2.26504.105
  Architecture: x64
  Commit:       820230c386

.NET SDKs installed:
  11.0.100-rc.1.26425.128 [C:\Program Files\dotnet\sdk]
  11.0.100-rc.2.26504.105 [C:\Program Files\dotnet\sdk]

.NET runtimes installed:
  Microsoft.AspNetCore.App 8.0.32 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 9.0.21 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 10.0.13 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 11.0.0-rc.1.26425.128 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 11.0.0-rc.2.26504.105 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 8.0.32 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 9.0.21 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 10.0.13 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 11.0.0-rc.1.26425.128 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 11.0.0-rc.2.26504.105 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.WindowsDesktop.App 8.0.32 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
  Microsoft.WindowsDesktop.App 9.0.21 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
  Microsoft.WindowsDesktop.App 10.0.13 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
  Microsoft.WindowsDesktop.App 11.0.0-rc.1.26425.128 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
  Microsoft.WindowsDesktop.App 11.0.0-rc.2.26504.105 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]

Other architectures found:
  x86   [C:\Program Files (x86)\dotnet]
    registered at [HKLM\SOFTWARE\dotnet\Setup\InstalledVersions\x86\InstallLocation]

Environment variables:
  Not set

global.json file:
  Not found

IDE version

No response

Other details

No response

Activity

  1. added
    untriaged
    on Oct 15, 2026
  2. locked and limited conversation to collaborators on Oct 15, 2026
  3. unlocked this conversation on Oct 15, 2026
  4. github-actions commented on Oct 15, 2026

    @github-actions
    Contributor

    🎯 Agentic Issue Triage

    Triage Assessment:

    • 🏷️ Labels: Area-StaticWebAssets Bug
    • 💻 Assignment: @javiercn | @dotnet/aspnet-blazor-eng
    • 🟩 Confidence: high - The error comes from the Static Web Assets JS module targets and is a clear regression.

    ➡️ Summary: A Debug build of a Web SDK app referencing a Web SDK library fails in RC2 with a missing-endpoint error for the dotnet-watch initializer. Investigate the build-only initializer asset not getting an endpoint in the consuming project.

    Generated by 🏷️ Issue Triage for #56656 · copilot · auto · 18.6 AIC · ⌖ 0.671 AIC · ⊞ 14.4K · ◷

  5. removed
    untriaged
    on Oct 15, 2026
  6. andygjp commented on Oct 25, 2026

    @andygjp

    rc.3 has the same issue

  7. SamWilliamsGS commented on Oct 27, 2026

    @SamWilliamsGS

    Also running into this while rehearsing the RC2/3 candidates against our repo!

  8. added a commit that references this issue on Nov 6, 2026
  9. thomhurst commented on Nov 10, 2026

    @thomhurst

    Still reproduces on 11.0.100 GA (macOS arm64), including when both projects target net10.0. Release builds are fine. Same projects build on 10.0.403.

  10. erwinkramer commented on Nov 10, 2026

    @erwinkramer

    @thomhurst same for me on Windows, .NET 11 GA.

  11. boukenka commented on Nov 11, 2026

    @boukenka

    Same for me on on Windows, .NET 11 GA.

  12. added a commit that references this issue on Nov 11, 2026
  13. 7 remaining items

  14. stiwa-petm commented on Nov 12, 2026

    @stiwa-petm

    Can confirm issue description to be correct, same case here.

  15. lfpraca commented on Nov 12, 2026

    @lfpraca

    Same issue after updating Visual Studio to 18.12, but still with a .NET 10 project that worked fine in Visual Studio 18.11. As mentioned in the original report, adding <EnableHotReloadInRuntimeConfigDevFile>false</EnableHotReloadInRuntimeConfigDevFile> to the libraries that use the Web SDK fixes the issue.

  16. verbedr commented on Nov 13, 2026

    @verbedr
  17. explorer14 commented on Nov 13, 2026

    @explorer14

    Literally just ran into the same problem. Installed .NET SDK 11.0.100. Tried building my solution. Error: C:\Program Files\dotnet\sdk\11.0.100\Sdks\Microsoft.NET.Sdk.StaticWebAssets\targets\Microsoft.NET.Sdk.StaticWebAssets.JSModules.targets(233,3): error The following scoped css bundles do not have matching endpoints: _framework/Microsoft.NET.Sdk.BlazorWeb.HotReload#[.{fingerprint}]!.lib.module.js

    Solution setup (all projects target net10.0):

    • ASP.NET Core Web API project
    • An Xunit integration test project that uses Microsoft.NET.Sdk.Web to be able to use WebApplicationFactory related pieces. (Worth pointing out that the error happens whilst building this project)
    • Coincidentally a Blazor WASM frontend but its not referenced by any project (except its own test project which seems to build with no errors).

    Work around 1

    Adding a global.json to repo root seems to work around it.

    {
      "sdk": {
        "version": "10.0.404",
        "rollForward": "latestFeature"
      }
    }

    Work around 2

    Changing the integration test project from Microsoft.NET.Sdk.Web to just Microsoft.NET.Sdk and explicitly adding using Microsoft.AspNetCore.* namespace references in test files, also seems to get around this problem.


    Though, I don't recall facing this problem with previous versions of the SDK so I find both these workarounds just a hack especially considering the integration test project has no reference to Blazor whatsoever. Direct or transitive. I am also not seeing this in the official breaking changes list on MS website. For now I am going with the least intrusive workaround # 1.

  18. marcpopMSFT commented on Nov 17, 2026

    @marcpopMSFT
    Member

    I believe the fix from javiercn should make it for the December 11.0.101 release.

  19. primo-ppcg commented on Nov 18, 2026

    @primo-ppcg

    This got pushed to stable nearly a month after it was reported.

  20. added a commit that references this issue on Nov 18, 2026
  21. HugoVG commented on Nov 19, 2026

    @HugoVG

    Also affected on Mac, but only select projects

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions