System TypeInitializationEx ception An exception was thrown by the typ

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
System.TypeInitializationException: An exception was thrown by the type initializer for System.Windows.Forms.Theming.ThemeElements ---> System.InvalidCastException: Cannot cast from source type to destination type.
at System.Windows.Forms.Theming.ThemeElements.LoadTheme (System.String themeName) [0x00069] in /root/mono/mcs/class/Managed.Windows.Forms/System.Windows.Forms.Theming/ThemeElements.cs:68
at System.Windows.Forms.Theming.ThemeElements..cctor () [0x00023] in /root/mono/mcs/class/Managed.Windows.Forms/System.Windows.Forms.Theming/ThemeElements.cs:50
--- End of inner exception stack trace ---
at System.Windows.Forms.ThemeWin32Classic.DrawButtonBackground (System.Drawing.Graphics g, System.Windows.Forms.Button button, Rectangle clipArea) [0x00034] in /root/mono/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ThemeWin32Classic.cs:178
at System.Windows.Forms.ThemeWin32Classic.DrawButton (System.Drawing.Graphics g, System.Windows.Forms.Button b, Rectangle textBounds, Rectangle imageBounds, Rectangle clipRectangle) [0x00000] in /root/mono/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ThemeWin32Classic.cs:158
at System.Windows.Forms.Button.Draw (System.Windows.Forms.PaintEventArgs pevent) [0x0002f] in /root/mono/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Button.cs:193
at System.Windows.Forms.ButtonBase.OnPaint (System.Windows.Forms.PaintEventArgs pevent) [0x00000] in /root/mono/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ButtonBase.cs:642
at System.Windows.Forms.Control.WmPaint (System.Windows.Forms.Message& m) [0x0008a] in /root/mono/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Control.cs:5569
at System.Windows.Forms.Control.WndProc (System.Windows.Forms.Message& m) [0x0016c] in /root/mono/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Control.cs:5327
at System.Windows.Forms.ButtonBase.WndProc (System.Windows.Forms.Message& m) [0x00055] in /root/mono/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ButtonBase.cs:692
at System.Windows.Forms.Button.WndProc (System.Windows.Forms.Message& m) [0x00000] in /root/mono/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Button.cs:150
at System.Windows.Forms.Control+ControlWindowTarget.OnMessage (System.Windows.Forms.Message& m) [0x00000] in /root/mono/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Control.cs:228
at System.Windows.Forms.Control+ControlNativeWindow.WndProc (System.Windows.Forms.Message& m) [0x00000] in /root/mono/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Control.cs:209
at System.Windows.Forms.NativeWindow.WndProc (IntPtr hWnd, Msg msg, IntPtr wParam, IntPtr lParam) [0x00085] in /root/mono/mcs/class/Managed.Windows.Forms/System.Windows.Forms/NativeWindow.cs:242