Fix BlazorUnitedApp sample missing shared framework references#65292
Merged
ilonatommy merged 1 commit intodotnet:mainfrom Feb 4, 2026
Merged
Fix BlazorUnitedApp sample missing shared framework references#65292ilonatommy merged 1 commit intodotnet:mainfrom
ilonatommy merged 1 commit intodotnet:mainfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Fixes the BlazorUnitedApp sample failing at runtime due to missing shared framework assembly references after the shared-framework dependency flow change in #64863.
Changes:
- Adds explicit
<Reference>items toBlazorUnitedApp.csprojfor required ASP.NET Core runtime dependencies (Hosting, Kestrel, SignalR, DataProtection, etc.). - Ensures the sample has the necessary assemblies available at runtime for interactive server components scenarios.
Member
Author
|
@wtgodbe, please let us know if any neater way comes to your mind. |
This was referenced Feb 2, 2026
Open
Member
|
What about the |
wtgodbe
approved these changes
Feb 3, 2026
Member
wtgodbe
left a comment
There was a problem hiding this comment.
Thanks, this is the right fix
Member
Author
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Problem
After #64863, running the
BlazorUnitedAppsample fails at runtime with:Root Cause
PR #64863 replaced
RemoveSharedFrameworkDependencies.cswithPrivateAssets=allmetadata for shared framework references. As part of this change, sample projects needed explicit<Reference>items added for all their runtime dependencies.The BlazorUnitedApp.csproj was updated with some references, but many were missing - particularly those required for Blazor Server apps with interactive components (Kestrel, SignalR, Authentication, DataProtection, etc.).
Fix
Added the missing
<Reference>items to BlazorUnitedApp.csproj:Microsoft.AspNetCore.AuthenticationMicrosoft.AspNetCore.HostingMicrosoft.AspNetCore.Server.Kestrel(and related transport assemblies)Microsoft.AspNetCore.SignalR(and related assemblies)Microsoft.AspNetCore.DataProtection(and related assemblies)Testing
Verified the sample runs successfully with: