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
A new generated Blazor web app targeting environment Germany generated, throws an exception on navigating to the About page by selecting the "About" menu entry.
This is caused, because the default localization resource file About.resx contains a value that cannot be parsed. In concrete, the resource cultures contains the value cultures, but as the code tries to split the value first by ; (semi-colon) and than by , (comma) this will result in an empty array that is tried to access directly via index.
This is throwing in an out of bound exception in file About.razor in line 34.
I didn't verified this for Belgium targeting projects, but I expect the same behavior there too.
To Reproduce
TL;DR - Steps to reproduce the behavior
Ensure browser cache (local storage + cookies) were deleted
Otherwise possible already selected culture will be used instead of default/fallback
Select "About" page in web app
Super detailed - Steps to reproduce the behavior:
Generate empty solution incl. YARP
Generate backend service
Generate Blazor web app
Register all components in indentity service for being able to authenticate and run the skeleton
Run all three components in debug mode out of Visual Studio or deploy it on a server
If not in debug mode in Visual Studio: Navigate to web app
Open Edge F12 developer tools and select tab "Console"
Ensure browser cache (local storage + cookies) were deleted
Otherwise possible already selected culture will be used instead of default/fallback
In web app click menu entry "About"
In F12 Tools see errors listed and in web app see error at the bottom of the screen
Expected behavior
There's no exception thrown and either the language selection buttons appear or not, depending on the resource file for localization selected.
Screenshots
Exception in web app:
About.resxcultures value:
Desktop (please complete the following information)
.NET SDK v8.0.200
Guidance v2022.2.1.14
Arc4u v8.1.0
Nova v2.3.4-rc4
The text was updated successfully, but these errors were encountered:
Describe the bug
A new generated Blazor web app targeting environment Germany generated, throws an exception on navigating to the About page by selecting the "About" menu entry.
This is caused, because the default localization resource file
About.resx
contains a value that cannot be parsed. In concrete, the resourcecultures
contains the valuecultures
, but as the code tries to split the value first by;
(semi-colon) and than by,
(comma) this will result in an empty array that is tried to access directly via index.This is throwing in an out of bound exception in file
About.razor
in line 34.I didn't verified this for Belgium targeting projects, but I expect the same behavior there too.
To Reproduce
TL;DR - Steps to reproduce the behavior
Super detailed - Steps to reproduce the behavior:
Expected behavior
There's no exception thrown and either the language selection buttons appear or not, depending on the resource file for localization selected.
Screenshots
Exception in web app:
About.resx
cultures
value:Desktop (please complete the following information)
v8.0.200
v2022.2.1.14
v8.1.0
v2.3.4-rc4
The text was updated successfully, but these errors were encountered: