exception using Window framework 4.0

Topics: Help
Nov 10, 2010 at 1:38 AM

If I change the frame work setting of all projects to Window .net framework 4.0.

the project compile and build sucessfully, when it ran, it generates the following exception, then quite

'Demo.WindowsForms.vshost.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_32\mscorlib\v4.0_4.0.0.0__b77a5c561934e089\mscorlib.dll''Demo.WindowsForms.vshost.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\assembly\GAC_MSIL\Microsoft.VisualStudio.HostingProcess.Utilities\10.0.0.0__b03f5f7f11d50a3a\Microsoft.VisualStudio.HostingProcess.Utilities.dll''Demo.WindowsForms.vshost.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Windows.Forms\v4.0_4.0.0.0__b77a5c561934e089\System.Windows.Forms.dll''Demo.WindowsForms.vshost.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Drawing\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Drawing.dll''Demo.WindowsForms.vshost.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System\v4.0_4.0.0.0__b77a5c561934e089\System.dll''Demo.WindowsForms.vshost.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\assembly\GAC_MSIL\Microsoft.VisualStudio.HostingProcess.Utilities.Sync\10.0.0.0__b03f5f7f11d50a3a\Microsoft.VisualStudio.HostingProcess.Utilities.Sync.dll''Demo.WindowsForms.vshost.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\assembly\GAC_MSIL\Microsoft.VisualStudio.Debugger.Runtime\10.0.0.0__b03f5f7f11d50a3a\Microsoft.VisualStudio.Debugger.Runtime.dll''Demo.WindowsForms.vshost.exe' (Managed (v4.0.30319)): Loaded 'W:\DEW_CSHARP\GMap\greatmaps_bc21f46565cb\Build\Debug\Demo.WindowsForms.vshost.exe''Demo.WindowsForms.vshost.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_32\System.Data\v4.0_4.0.0.0__b77a5c561934e089\System.Data.dll''Demo.WindowsForms.vshost.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Core\v4.0_4.0.0.0__b77a5c561934e089\System.Core.dll''Demo.WindowsForms.vshost.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Xml\v4.0_4.0.0.0__b77a5c561934e089\System.Xml.dll'The thread 'vshost.NotifyLoad' (0x4dc) has exited with code 0 (0x0).The thread '<No Name>' (0xc3c) has exited with code 0 (0x0).The thread '<No Name>' (0xce8) has exited with code 0 (0x0).'Demo.WindowsForms.vshost.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_32\mscorlib\v4.0_4.0.0.0__b77a5c561934e089\mscorlib.dll''Demo.WindowsForms.vshost.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\assembly\GAC_MSIL\Microsoft.VisualStudio.HostingProcess.Utilities\10.0.0.0__b03f5f7f11d50a3a\Microsoft.VisualStudio.HostingProcess.Utilities.dll''Demo.WindowsForms.vshost.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Windows.Forms\v4.0_4.0.0.0__b77a5c561934e089\System.Windows.Forms.dll''Demo.WindowsForms.vshost.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Drawing\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Drawing.dll''Demo.WindowsForms.vshost.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System\v4.0_4.0.0.0__b77a5c561934e089\System.dll''Demo.WindowsForms.vshost.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\assembly\GAC_MSIL\Microsoft.VisualStudio.HostingProcess.Utilities.Sync\10.0.0.0__b03f5f7f11d50a3a\Microsoft.VisualStudio.HostingProcess.Utilities.Sync.dll'The thread 'vshost.LoadReference' (0xea8) has exited with code 0 (0x0).'Demo.WindowsForms.vshost.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\assembly\GAC_MSIL\Microsoft.VisualStudio.Debugger.Runtime\10.0.0.0__b03f5f7f11d50a3a\Microsoft.VisualStudio.Debugger.Runtime.dll''Demo.WindowsForms.vshost.exe' (Managed (v4.0.30319)): Loaded 'W:\DEW_CSHARP\GMap\greatmaps_bc21f46565cb\Build\Debug\Demo.WindowsForms.vshost.exe'The program '[5528] Demo.WindowsForms.vshost.exe: Managed (v4.0.30319)' has exited with code 0 (0x0).A first chance exception of type 'System.IO.FileNotFoundException' occurred in mscorlib.dllThe thread 'vshost.LoadReference' (0x8f4) has exited with code 0 (0x0).'Demo.WindowsForms.vshost.exe' (Managed (v4.0.30319)): Loaded 'W:\DEW_CSHARP\GMap\greatmaps_bc21f46565cb\Build\Debug\Demo.WindowsForms.exe', Symbols loaded.'Demo.WindowsForms.vshost.exe' (Managed (v4.0.30319)): Loaded 'W:\DEW_CSHARP\GMap\greatmaps_bc21f46565cb\Build\Debug\GMap.NET.Core.dll', Symbols loaded.'Demo.WindowsForms.vshost.exe' (Managed (v4.0.30319)): Loaded 'W:\DEW_CSHARP\GMap\greatmaps_bc21f46565cb\Build\Debug\GMap.NET.WindowsForms.dll', Symbols loaded.'Demo.WindowsForms.vshost.exe' (Managed (v4.0.30319)): Loaded 'W:\DEW_CSHARP\GMap\greatmaps_bc21f46565cb\Build\Debug\BSE.Windows.Forms.dll', Symbols loaded.A first chance exception of type 'System.NullReferenceException' occurred in GMap.NET.Core.dllA first chance exception of type 'System.Reflection.TargetInvocationException' occurred in mscorlib.dllA first chance exception of type 'System.TypeInitializationException' occurred in GMap.NET.Core.dllAn unhandled exception of type 'System.TypeInitializationException' occurred in GMap.NET.Core.dll
Additional information: The type initializer for 'SingletonCreator' threw an exception.
The program '[4856] Demo.WindowsForms.vshost.exe: Managed (v4.0.30319)' has exited with code 0 (0x0).

 

the debug exit from singleton.cs class

 

thanks

 

Max

Coordinator
Nov 10, 2010 at 4:53 AM

check the documentation