1

I have a big project that uses Blazor, suddenly when I run it, the Blazor pages do not work anymore, because the blazor.server.js returns 404. This happened after I installed latest version of VS 2026 with the RTM version of .NET 10.

Short story, even if I compile with VS 2022, when I run the program in a system where I have .NET 10 SDK, blazor.server.js returns 404. As soon as I uninstall VS 2026 and .NET 10, the Blazor pages start working again.

This was verified in three different systems, and it is reproducible, install VS 2026 -> 404 -> then remove VS 2026 -> everything works.

The project targets .NET 9, but having .NET 10 build system breaks something.

Funny story, I have at least one other .NET 9 based project with blazor that works even with .NET 10. I wonder what I need to change to have it working.

I know that .NET 10 changes the way in which blazor resources are served, but I really wonder why having .NET 10 breaks Blazor in .NET 9 based project.

Anyone else experienced that?

enter image description here

1 Answer 1

2

Found the problem, the project has a Directory.Build.props that contains

<RollForward>LatestMajor</RollForward>

That actually move forward during execution to latest framework version, actually making it run with .NET 10. The solution is rolling forward only for latest patch.

<RollForward>LatestPatch</RollForward>

This solves the problem

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.