Unhandled Exception: System.TypeInitializationException: The type initializer for 'System.Windows.Forms.WindowsFormsSynchronizationContext' threw an exception. ---> System.TypeInitializationException: The type initializer for 'System.Windows.Forms.XplatUI' threw an exception. ---> System.ArgumentException: Value does not fall within the expected range. at System.Net.Sockets.Socket.SetSocketOption (System.Net.Sockets.SocketOptionLevel optionLevel, System.Net.Sockets.SocketOptionName optionName, System.Int32 optionValue) [0x00029] in <5641e4edad4f4464ba58c620a7b8ea48>:0 at System.Net.Sockets.Socket.set_DontFragment (System.Boolean value) [0x00021] in <5641e4edad4f4464ba58c620a7b8ea48>:0 at System.Net.Sockets.Socket.SocketDefaults () [0x0000c] in <5641e4edad4f4464ba58c620a7b8ea48>:0 at System.Net.Sockets.Socket..ctor (System.Net.Sockets.AddressFamily addressFamily, System.Net.Sockets.SocketType socketType, System.Net.Sockets.ProtocolType protocolType) [0x0005e] in <5641e4edad4f4464ba58c620a7b8ea48>:0 at System.Windows.Forms.XplatUIX11.SetDisplay (System.IntPtr display_handle) [0x001ad] in :0 at System.Windows.Forms.XplatUIX11..ctor () [0x00077] in :0 at System.Windows.Forms.XplatUIX11.GetInstance () [0x0001c] in :0 at System.Windows.Forms.XplatUI..cctor () [0x0007d] in :0 --- End of inner exception stack trace --- at System.Windows.Forms.Theme.get_MenuAccessKeysUnderlined () [0x00000] in :0 at System.Windows.Forms.SystemInformation.get_MenuAccessKeysUnderlined () [0x00005] in :0 at System.Windows.Forms.Control..ctor () [0x000ea] in :0 at (wrapper remoting-invoke-with-check) System.Windows.Forms.Control:.ctor () at System.Windows.Forms.WindowsFormsSynchronizationContext..cctor () [0x00000] in :0 --- End of inner exception stack trace --- at System.Windows.Forms.Control..ctor () [0x00014] in :0 at System.Windows.Forms.ScrollableControl..ctor () [0x00000] in :0 at System.Windows.Forms.ContainerControl..ctor () [0x0000e] in :0 at System.Windows.Forms.Form..ctor () [0x00012] in :0 at CSharpGUI.WinFormExample..ctor () [0x00000] in <36f359adc9624e4db4077c135f6ebd41>:0 at (wrapper remoting-invoke-with-check) CSharpGUI.WinFormExample:.ctor () at CSharpGUI.WinFormExample.Main (System.String[] args) [0x00000] in <36f359adc9624e4db4077c135f6ebd41>:0 [ERROR] FATAL UNHANDLED EXCEPTION: System.TypeInitializationException: The type initializer for 'System.Windows.Forms.WindowsFormsSynchronizationContext' threw an exception. ---> System.TypeInitializationException: The type initializer for 'System.Windows.Forms.XplatUI' threw an exception. ---> System.ArgumentException: Value does not fall within the expected range. at System.Net.Sockets.Socket.SetSocketOption (System.Net.Sockets.SocketOptionLevel optionLevel, System.Net.Sockets.SocketOptionName optionName, System.Int32 optionValue) [0x00029] in <5641e4edad4f4464ba58c620a7b8ea48>:0 at System.Net.Sockets.Socket.set_DontFragment (System.Boolean value) [0x00021] in <5641e4edad4f4464ba58c620a7b8ea48>:0 at System.Net.Sockets.Socket.SocketDefaults () [0x0000c] in <5641e4edad4f4464ba58c620a7b8ea48>:0 at System.Net.Sockets.Socket..ctor (System.Net.Sockets.AddressFamily addressFamily, System.Net.Sockets.SocketType socketType, System.Net.Sockets.ProtocolType protocolType) [0x0005e] in <5641e4edad4f4464ba58c620a7b8ea48>:0 at System.Windows.Forms.XplatUIX11.SetDisplay (System.IntPtr display_handle) [0x001ad] in :0 at System.Windows.Forms.XplatUIX11..ctor () [0x00077] in :0 at System.Windows.Forms.XplatUIX11.GetInstance () [0x0001c] in :0 at System.Windows.Forms.XplatUI..cctor () [0x0007d] in :0 --- End of inner exception stack trace --- at System.Windows.Forms.Theme.get_MenuAccessKeysUnderlined () [0x00000] in :0 at System.Windows.Forms.SystemInformation.get_MenuAccessKeysUnderlined () [0x00005] in :0 at System.Windows.Forms.Control..ctor () [0x000ea] in :0 at (wrapper remoting-invoke-with-check) System.Windows.Forms.Control:.ctor () at System.Windows.Forms.WindowsFormsSynchronizationContext..cctor () [0x00000] in :0 --- End of inner exception stack trace --- at System.Windows.Forms.Control..ctor () [0x00014] in :0 at System.Windows.Forms.ScrollableControl..ctor () [0x00000] in :0 at System.Windows.Forms.ContainerControl..ctor () [0x0000e] in :0 at System.Windows.Forms.Form..ctor () [0x00012] in :0 at CSharpGUI.WinFormExample..ctor () [0x00000] in <36f359adc9624e4db4077c135f6ebd41>:0 at (wrapper remoting-invoke-with-check) CSharpGUI.WinFormExample:.ctor () at CSharpGUI.WinFormExample.Main (System.String[] args) [0x00000] in <36f359adc9624e4db4077c135f6ebd41>:0