-
Notifications
You must be signed in to change notification settings - Fork 10.3k
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 web app, global InteractiveServer, .NET 9. Localization. During culture change strange exceptions occur #60993
Comments
@nefen thanks for contacting us. Do you see these errors only in Visual Studio or do you also see them when running from the command line? Could you provide a public github repository with a repro project so that we can take a look at your exact changes? |
@javiercn thank you for your prompt reply. |
@javiercn i checked the development machine. I am flood with the exceptions. It runs OS The other machine that didn't throw exceptions is a Windows 11 machine. I can ignore them, but I feel uncomfortable. Is there any additional info that I might extract and send to you to assist me? |
@nefen thanks for the additional details. Does this happen with a non-blazor project? It sounds like it's not something Blazor specific from what I can tell. Those exceptions are coming from the runtime and only happen in VS. If things work from the command line in release mode and you don't see any exception in the app, you should be good. For what I know, those exceptions might not even be from the program itself. |
Hi @nefen. We have added the "Needs: Author Feedback" label to this issue, which indicates that we have an open question for you before we can take further action. This issue will be closed automatically in 7 days if we do not hear back from you by then - please feel free to re-open it if you come back to this issue after that time. |
As I had explained all these exceptions were thrown only to my development laptop and not in another one. I uninstalled Visual Studio and reinstalled it. The exceptions have been gone (although thie time something went wrong on the installation with JIT!) |
I used the Blazor Web App (.net-9.0.3) template to create a project with global interactivity (InteractiveServer).
I followed the localization directions from Microsoft at Globalization and localization in paragraph Dynamically set the server-side culture by user preference.
It didn't work as expected and has also obvious mistakes (like confusing
app.razor
withroutes.razor
).Anyway, I fixed localization with small adaptations with the following change:
Instead of
I use:
So, culture changes, BUT
during debugging, in every culture change, output window is filled with exceptions:
All these exceptions maybe are thrown due to violent app restar. All server interactive components are disposed and re-initialized several times (during prerender then for rendering etc.).
These 5 exceptions are thrown with an empty template project.
By adding a couple of working components the number of exceptions become frightening:
Is this nornal? Have I made something wrong?
The text was updated successfully, but these errors were encountered: