Exception on keyboard layout switch with InvariantGlobalization
See original GitHub issue.NET version
Microsoft.WindowsDesktop.App 7.0.5
Did it work in .NET Framework?
Yes
Did it work in any of the earlier releases of .NET Core or .NET 5+?
No response
Issue description
Unhandled exception. System.Globalization.CultureNotFoundException: Only the invariant culture is supported in globalization-invariant mode. See https://aka.ms/GlobalizationInvariantMode for more information. (Parameter 'culture')
1049 (0x0419) is an invalid culture identifier.
at System.Globalization.CultureData.GetCultureData(Int32 culture, Boolean bUseUserOverride)
at System.Globalization.CultureInfo..ctor(Int32 culture, Boolean useUserOverride)
at System.Windows.Forms.InputLanguage.get_Culture()
at System.Windows.Forms.InputLanguageChangedEventArgs..ctor(InputLanguage inputLanguage, Byte charSet)
at System.Windows.Forms.InputLanguage.CreateInputLanguageChangedEventArgs(Message m)
at System.Windows.Forms.Control.WmInputLangChange(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ListView.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, WM msg, IntPtr wparam, IntPtr lparam)
Steps to reproduce
Issue Analytics
- State:
- Created 4 months ago
- Comments:15 (7 by maintainers)
Top Results From Across the Web
Running .NET 6 project in Docker throws Globalization. ...
Your docker file should look like this for the base section: FROM mcr.microsoft.com/dotnet/aspnet:6.0-alpine AS base WORKDIR /app RUN apk ...
Read more >Globalization config settings - .NET
Learn about run-time settings that configure globalization aspects of a .NET Core app, for example, how it parses Japanese dates.
Read more >Ant Design Blazor/ant-design-blazor
Fixed ResizeObserver work incorrectly cause by wrong key type. #3030 @ElderJames ... Fixed Message that exception casue by Invariant Globalization setting.
Read more >Net | PDF | Xml | Microsoft Visual Studio
Exception events. Garbage collection events. Interop events. Loader and binder events. Method events ThreadPool events. Type-system events
Read more >Free Support Policies
Exception when Setting External Font Directory with Full Path under Linux ... Change the Shape/Form of a DataLabel in a Chart Using Aspose....
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

@OwnageIsMagic and @elachlan you guys did all the work for us 😸 . Thanks a ton!
@elachlan @DJm00n This issue can now be worked around by setting
<PredefinedCulturesOnly>false</PredefinedCulturesOnly>. On WinForms side we can lazy init this property, since we storeInputLanguagefrom which this property value comes. It’s not used internally. https://source.dot.net/#System.Windows.Forms/System/Windows/Forms/InputLanguageChangedEventArgs.cs,5bdc3016f89c5e99,references