-
Notifications
You must be signed in to change notification settings - Fork 10k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Blazor Server - Cannot find the fallback endpoint specified by route values: { page: /_Host, area: } exception with RC1 #36535
Comments
@Webreaper thanks for contacting us. We've identified that the underlying issue for this is a bug in the razor source generator that prevents the views from being compiled into the assembly You can try use <PropertyGroup>
<UseRazorSourceGenerator>false</UseRazorSourceGenerator>
</PropertyGroup> |
Thanks for the quick turnaround @javiercn. Confirmed that adding that flag fixes the problem. Will re-test without it when RC2 comes out! :) |
/cc: @pranavkm FYI |
@Webreaper the source generator that you disabled relies on C# 10 features that is not currently supported by the preview of VS4Mac. This should be resolved in the next VS4Mac preview release that is expected to become available in a couple of weeks. In the meanwhile, feel free to continue using the workaround that @javiercn provided. FYI @jmatthiesen |
Ooooh, interesting to know. Thanks for the details @pranavkm. The joys of living on the bleeding edge. 😁 Out of interest, what's the impact of disabling source generators for this? Is it just compile-time performance, or is anything else lost? |
There's some performance improvements in using the source generator, but the biggest benefit is in being able to hot reload .razor and .cshtml files. It does not help with VS4Mac right now as we haven't done the work to enable hot reload, but having it off would prevent hot reload for .razor / .cshtml from working in VS and dotnet-watch. |
Thanks, that's really useful background! |
Seems to also be the case for Visual Studio 16.11.3 Preview 1.0 on Windows 11 Pro Version 10.0.22000 Build 22000 with the .NET 6 RC1 SDK installed. Doesn't work with the flag added for me on Visual Studio 16.11.3 Preview 1.0. Works with or without the flag added for me on Visual Studio 2022 17.0.0 Preview 4. |
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. |
Just to close the loop - confirmed that Blazor works fine without |
Describe the bug
I have a Blazor Server app (here) which has been running fine with all of the .Net 6 previews. It's currently deployed on Preview-7 and working without issue.
Last night I upgraded to .Net 6 RC1, and am now see this exception at startup:
I have made no code changes.
Reverting to Preview-7 by removing the RC1 SDK (per the instructions here) resolved the problem and the app starts as expected.
Is there a breaking change between Preview7 and RC1 I've missed that means I need to make code-changes. I had a look at the breaking changes list but couldn't spot anything that didn't happen in earlier previews.
Exceptions (if any)
Further technical details
The text was updated successfully, but these errors were encountered: