0

I use Visual Studio 2005 to create an empty C# WinForm application where only Form1 is showing. Whenever I run it, either from within Visual Studio or by double-clicking the .exe-file, and then switch language on my keyboard I get the following exception and my application crashes:

Culture ID 9216 (0x2400) is not a supported culture. Parameter name: culture

If I debug it from Visual Studio, then the exception happens in Program.cs on the following line:

Application.Run(new Form1());

How can I solve this in my application? I don't want to switch to a newer .NET Framework and I don't want to have to make changes on all the computers this application is running on.

arnold_w
  • 59
  • 9
  • 1
    Does this answer your question? [How to solve this Exception "Culture is not Supported"?](https://stackoverflow.com/questions/42554944/how-to-solve-this-exception-culture-is-not-supported) – demonplus Aug 26 '22 at 08:42
  • OT VS2005 means .Net version 2.0 - both are *ancient*, there have been many releases of both since. Any particular reason to stay there? – Hans Kesting Aug 26 '22 at 08:56
  • demonplus: No, that link did not solve my problem. Once in a while I need to change language and I'm working with WinForms, not ASP. Hans Kesting: Yes, I like Visual Studio 2005 (Express). It's free, no registration needed, the C# syntax is very easy so most C-programmers can understand and maintain it. The application is only used in-house so no security concerns. – arnold_w Aug 26 '22 at 09:09
  • What is your keyboard language ? – Robabeh Ghasemi Aug 26 '22 at 09:32
  • Mahsan Ghasemi: Danish. But every once in a while foreign employees need to write in their native language and, hence, need to switch language of their keyboard. – arnold_w Aug 26 '22 at 09:36
  • The Community Editions are also free, plus up-to-date. The C# syntax has evolved quite a bit though – Hans Kesting Aug 26 '22 at 09:53
  • Hans Kesting: Another reason, the required framework (.NET 2.0) can easily be installed without an Internet connection. – arnold_w Aug 26 '22 at 10:13

1 Answers1

0

I think these links can help you solve your problem

https://support.microsoft.com/en-us/topic/error-message-when-you-run-an-application-or-try-to-access-a-web-site-on-a-computer-that-has-a-particular-net-framework-2-0-software-update-installed-culture-name-culture-is-not-supported-e23d2e4b-7d56-d234-8834-6874108381da

https://www.csharp-examples.net/culture-names/

GuidoG
  • 11,359
  • 6
  • 44
  • 79
Matteo
  • 11
  • 4
  • 1
    I want to make the application handle the exception. I don't want to have to go to every employee, that uses the application, and change something on their computers. – arnold_w Aug 26 '22 at 09:13