应用程序也必须通过调试进行编译 已启用. 例如: < configuration> ; < system.windows.forms jitDebugging ="true" /> </configuration> 启用JIT调试后,任何未处理的异常都会发送到在 不会在应用程序中的所有表单上发生,只是在某些情况下会发生.在某些情况下会发生这种情况.运行XP的系统,并且该应用在运行XP的其他系统上运行良好.因此,它已经在运行Vista的所有系统上运行.在Windows 7上的某些时间会发生这种情况. 任何帮助都非常感谢 解决方案 根据错误消息,确保将 Microsoft.VisualBasic.PowerPacks.dll文件复制到您的应用程序目录中. 也请阅读类似的线程 http://social.msdn .microsoft.com/Forums/en/vbpowerpacks/thread/5698933f-e9e1-497d-a06b-2d86cdb1effe kaymaf In the process of finnishing up the application.   Some NOT all beta testers have had the same problem. An error box that states:Unhandled exceptions has occurred in your application.  If you click Continue, the application will ignor this error and attempt to continue.  If you click Quit, the applicatiob will close immediatly.An error occurred creating the form. See Exception.InnerException for detailes.   The error is:  Could not load file or assembly "Microsoft VisualBasic PowerPacks vs, Version = 9.0.0.0, Culture=neutral, PublicKeyToken=b03f50a3a' or one of its dependencies.  The system cannot find the file specified. The details displays this:See the end of this message for details on invokingjust-in-time (JIT) debugging instead of this dialog box. ************** Exception Text **************System.InvalidOperationException: An error occurred creating the form. See Exception.InnerException for details.  The error is: Could not load file or assembly 'Microsoft.VisualBasic.PowerPacks.Vs, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified. ---> System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.VisualBasic.PowerPacks.Vs, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.File name: 'Microsoft.VisualBasic.PowerPacks.Vs, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'   at Option_Traders_Tools_V_1._0.Naked.InitializeComponent()   at Option_Traders_Tools_V_1._0.Naked..ctor() WRN: Assembly binding logging is turned OFF.To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.Note: There is some performance penalty associated with assembly bind failure logging.To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].    --- End of inner exception stack trace ---   at Option_Traders_Tools_V_1._0.My.MyProject.MyForms.Create__Instance__[T](T Instance)   at Option_Traders_Tools_V_1._0.Home.ShortToolStripMenuItem_Click(Object sender, EventArgs e)   at System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e)   at System.Windows.Forms.ToolStripMenuItem.OnClick(EventArgs e)   at System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)   at System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e)   at System.Windows.Forms.ToolStripItem.FireEventInteractive(EventArgs e, ToolStripItemEventType met)   at System.Windows.Forms.ToolStripItem.FireEvent(EventArgs e, ToolStripItemEventType met)   at System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea)   at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)   at System.Windows.Forms.Control.WndProc(Message& m)   at System.Windows.Forms.ScrollableControl.WndProc(Message& m)   at System.Windows.Forms.ToolStrip.WndProc(Message& m)   at System.Windows.Forms.MenuStrip.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 **************mscorlib    Assembly Version: 2.0.0.0    Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)    CodeBase: file:///c:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll----------------------------------------Option Traders Tools V 1.0    Assembly Version: 1.0.0.0    Win32 Version: 1.0.0.0    CodeBase: file:///C:/Temp/Richard%20Hiatt%20Option%20Analysis%20Program/Option%20Traders%20Tools%20V%201.0.exe----------------------------------------Microsoft.VisualBasic    Assembly Version: 8.0.0.0    Win32 Version: 8.0.50727.1433 (REDBITS.050727-1400)    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/Microsoft.VisualBasic/8.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualBasic.dll----------------------------------------System    Assembly Version: 2.0.0.0    Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll----------------------------------------System.Windows.Forms    Assembly Version: 2.0.0.0    Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll----------------------------------------System.Drawing    Assembly Version: 2.0.0.0    Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll----------------------------------------System.Configuration    Assembly Version: 2.0.0.0    Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Configuration/2.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll----------------------------------------System.Xml    Assembly Version: 2.0.0.0    Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll----------------------------------------System.Runtime.Remoting    Assembly Version: 2.0.0.0    Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Runtime.Remoting/2.0.0.0__b77a5c561934e089/System.Runtime.Remoting.dll---------------------------------------- ************** JIT Debugging **************To enable just-in-time (JIT) debugging, the .config file for thisapplication or computer (machine.config) must have thejitDebugging value set in the system.windows.forms section.The application must also be compiled with debuggingenabled. For example: <configuration>    <system.windows.forms jitDebugging="true" /></configuration> When JIT debugging is enabled, any unhandled exception will be sent to the JIT debugger registered on the computer rather than be handled by this dialog box.This does not happen on all the forms within the app, just some.This happens on some systems running XP and the app runs fine on others running XP.    So foar it has run on all systems running Vista.    It happens some of the time on Windows 7Any help is much appreciated 解决方案 Based on the error message, make sure the Microsoft.VisualBasic.PowerPacks.dll file is copied to your application directory. Also read similar thread http://social.msdn.microsoft.com/Forums/en/vbpowerpacks/thread/5698933f-e9e1-497d-a06b-2d86cdb1effe kaymaf 这篇关于未处理的异常错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云!
09-05 13:13