質問

I created a C# installer application. When I try to run the desktop application, it's throwing exceptions and I am not able to get any value in the Combo Box(though remaining code works well). The code when run through Visual Studio 2010 runs perfectly fine. Here is the description of various exceptions I get when I click on the the icon. Can anyone provide some assistance as to why i am getting this?

See the end of this message for details on invoking 
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.Globalization.CultureNotFoundException: Culture is not supported.
Parameter name: name
????? is an invalid culture identifier.
   at System.Globalization.CultureInfo..ctor(String name, Boolean useUserOverride)
   at System.Globalization.CultureInfo..ctor(String name)
   at SampleResourceBundle.Loginpage.fillAppLangueCombo()
   at SampleResourceBundle.Loginpage.Form1_Load(Object sender, EventArgs e)
   at System.Windows.Forms.Form.OnLoad(EventArgs e)
   at System.Windows.Forms.Form.OnCreateControl()
   at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
   at System.Windows.Forms.Control.CreateControl()
   at System.Windows.Forms.Control.WmShowWindow(Message& m)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
   at System.Windows.Forms.ContainerControl.WndProc(Message& m)
   at System.Windows.Forms.Form.WmShowWindow(Message& m)
   at System.Windows.Forms.Form.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


************** Loaded Assemblies **************
役に立ちましたか?

解決

Problem: Language CultureInfo enforced is not supported by your Operating System.

How to Test:

  1. Goto AppData folder in the User settings.
  2. Locate application folder and find User.config file.
  3. Modify value of Properties.Settings.Default.LastCulture in XML to any common language for example: "en-GB".
  4. Test the executable.

Solution: Download language pack for your Operating System.

For Windows 7 language packs can be found here: http://windows.microsoft.com/en-us/windows/language-packs#lptabs=win7

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top