You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[dotnet-sdk-10.0.100-preview.1.25110.2] Some blazor apps get "Failed to load resource: the server responded with a status of 404" error after retagrt to .NET 10
#60366
Open
1 task done
Junjun-zhao opened this issue
Feb 13, 2025
· 5 comments
According to this bug, we need to retarget the blazor apps to corresponding .NET to use the required JaveScript.
When retargeting Blazorise and BlazorStrap apps to .NET 10, it still get "Failed to load resource: the server responded with a status of 404" error.
These blazor apps are big solution, which is difficult to locate where the issue is. We have retargeted all projects to .NET 10 and also the related asp.net core packages to 10.0.0-preview.1.*, but the problem still exists.
For Blazorise app, when launch the page with http://localhost:5000/docs, it failed to load the page and get the 404 error.
For BlazorStrap app, when launch the page with http://localhost:5000, it failed to load the page and get the 404 error.
App Repro Steps on repro machine: The machine has dotnet-sdk-10.0.100-preview.1.25110.2 installed. Please get the repro machine information at devdiv bug
Launch Blazorise.Docs.Server.exe from C:\Users\Test01\Desktop\App\Blazorise.
Page load without left side menu shows. And there is error "Failed to load resource: the server responded with a status of 404 (Not Found)" in browser Develop Tool:
.NET Version
10.0.100-preview.1.25110.2
Anything else?
DotNet Info
.NET SDK:
Version: 10.0.100-preview.1.25110.2
Commit: 014e3fbe98
Workload version: 10.0.100-manifests.bf5105ba
MSBuild version: 17.14.0-preview-25107-06+a51113d69
Runtime Environment:
OS Name: Windows
OS Version: 10.0.26100
OS Platform: Windows
RID: win-x64
Base Path: C:\Program Files\dotnet\sdk\10.0.100-preview.1.25110.2\
Host:
Version: 10.0.0-preview.1.25080.5
Architecture: x64
Commit: b98cabca12
.NET SDKs installed:
10.0.100-preview.1.25110.2 [C:\Program Files\dotnet\sdk]
.NET runtimes installed:
Microsoft.AspNetCore.App 10.0.0-preview.1.25107.4 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.NETCore.App 10.0.0-preview.1.25080.5 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.WindowsDesktop.App 10.0.0-preview.1.25080.4 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.
Did a bit more of investigation. This is caused by the way their project is setup. Since we don't want to include the JS files in all projects, we use the presence of .razor files as a hint to include blazor.server.js and blazor.web.js.
These projects are setup in an unusual way that doesn't include any .razor file on the main project so as a result they don't get included.
There's a setting that can be used <RequiresAspNetWebAssets>true</RequiresAspNetWebAssets> to force the inclusion unconditionally.
Is there an existing issue for this?
Describe the bug
According to this bug, we need to retarget the blazor apps to corresponding .NET to use the required JaveScript.
When retargeting Blazorise and BlazorStrap apps to .NET 10, it still get "Failed to load resource: the server responded with a status of 404" error.
These blazor apps are big solution, which is difficult to locate where the issue is. We have retargeted all projects to .NET 10 and also the related asp.net core packages to 10.0.0-preview.1.*, but the problem still exists.
For Blazorise app, when launch the page with http://localhost:5000/docs, it failed to load the page and get the 404 error.
For BlazorStrap app, when launch the page with http://localhost:5000, it failed to load the page and get the 404 error.
Application Name: Blazorise,BlazorStrap
OS: Windows 10 22H2
CPU: X64
.NET Build Number: dotnet-sdk-10.0.100-preview.1.25110.2
App Source Location on repro machine checking at: https://devdiv.visualstudio.com/DevDiv/_workitems/edit/2382443
Github Link:
https://github.com/Megabit/Blazorise
https://github.com/chanan/BlazorStrap
Expected Behavior
Page load successful with left menu shows.
Steps To Reproduce
App Repro Steps on repro machine:
The machine has dotnet-sdk-10.0.100-preview.1.25110.2 installed. Please get the repro machine information at devdiv bug
Exceptions (if any)
Page load without left side menu shows. And there is error "Failed to load resource: the server responded with a status of 404 (Not Found)" in browser Develop Tool:
.NET Version
10.0.100-preview.1.25110.2
Anything else?
DotNet Info
@dotnet-actwx-bot @dotnet/compat
The text was updated successfully, but these errors were encountered: