My program was developed in .Net 7 (VS 2022) and running on non-English Windows 10 (x64). Most of the time my program works normally. However, the following error (in Event Viewer) was thrown sometimes, then it will show a dialog and my program quits.
How can I solve the issue? It seems that it is a problem related to .Net...
Thanks.
Application: XXX.EXE
CoreCLR Version: 7.0.1323.51816
.NET Version: 7.0.13
Description: The application requested process termination through
System.Environment.FailFast.
Message: Encountered infinite recursion while looking up
resource 'Arg_NullReferenceException' in System.Private.CoreLib.
Verify the installation of .NET is complete and does not need
repairing, and that the state of the process has not become corrupted.
Stack:
at System.Environment.FailFast(System.String)
at System.SR.InternalGetResourceString(System.String)
at System.SR.GetResourceString(System.String)
at System.NullReferenceException..ctor()
at System.Globalization.CultureInfo.get_CurrentUICulture()
at System.Resources.ResourceManager.GetString(System.String, System.Globalization.CultureInfo)
at System.SR.InternalGetResourceString(System.String)
at System.SR.GetResourceString(System.String)
at System.NullReferenceException..ctor()
at xxx (related to my code)
CultureInfo.CurrentUICultureat all?