dotnet / aspnetcore

ASP.NET Core is a cross-platform .NET framework for building modern cloud-based web applications on Windows, Mac, or Linux.
https://asp.net
MIT License
35.47k stars 10.03k forks source link

Blazor pages from RCL does not work in net8 #55843

Closed FLAMESpl closed 5 months ago

FLAMESpl commented 5 months ago

Is there an existing issue for this?

Describe the bug

Blazor in net8 does not load pages from razor class libraries

Expected Behavior

Home page works correctly

Steps To Reproduce

Result: template home page shows up

Result: page not found (404)

reproduction.zip

.NET Version

SDK: 8.0.300 Runtime: Microsoft.AspNetCore.App 8.0.5

javiercn commented 5 months ago

@FLAMESpl thanks for contacting us.

You also need to add the assembly using the call AddAdditionalAssemblies in the call to MapComponents.

FLAMESpl commented 5 months ago

Hi @javiercn thanks for the fast repsonse. Is this somewhere documented? I couldn't find this information on this page: https://learn.microsoft.com/en-us/aspnet/core/blazor/components/class-libraries?view=aspnetcore-8.0&tabs=visual-studio

dotnet-policy-service[bot] commented 5 months ago

This issue has been resolved and has not had any activity for 1 day. It will be closed for housekeeping purposes.

See our Issue Management Policies for more information.