有关调用实时(JIT)调试而不是此对话框的详细信息,
请参见此消息的结尾。************** 异常文本 **************
System.NullReferenceException: 未将对象引用设置到对象的实例。
在 DataSyncTool.DataSyncForm.OrcToSqlceBtn_Click(Object sender, EventArgs e)
在 System.Windows.Forms.Control.OnClick(EventArgs e)
在 System.Windows.Forms.Button.OnClick(EventArgs e)
在 System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
在 System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
在 System.Windows.Forms.Control.WndProc(Message& m)
在 System.Windows.Forms.ButtonBase.WndProc(Message& m)
在 System.Windows.Forms.Button.WndProc(Message& m)
在 System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
在 System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
在 System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
************** 已加载的程序集 **************
mscorlib
程序集版本: 2.0.0.0
Win32 版本: 2.0.50727.1433 (REDBITS.050727-1400)
基本代码: file:///C:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
----------------------------------------
CopyTableDemo
程序集版本: 1.0.0.0
Win32 版本: 1.0.0.0
基本代码: file:///C:/Program%20Files/DataSyncSetup/CopyTableDemo.exe
----------------------------------------
System.Windows.Forms
程序集版本: 2.0.0.0
Win32 版本: 2.0.50727.1433 (REDBITS.050727-1400)
基本代码: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System
程序集版本: 2.0.0.0
Win32 版本: 2.0.50727.1433 (REDBITS.050727-1400)
基本代码: file:///C:/WINDOWS/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Drawing
程序集版本: 2.0.0.0
Win32 版本: 2.0.50727.1433 (REDBITS.050727-1400)
基本代码: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
System.Configuration
程序集版本: 2.0.0.0
Win32 版本: 2.0.50727.1433 (REDBITS.050727-1400)
基本代码: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Configuration/2.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
----------------------------------------
System.Xml
程序集版本: 2.0.0.0
Win32 版本: 2.0.50727.1433 (REDBITS.050727-1400)
基本代码: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
OpenNETCF.Desktop.Communication
程序集版本: 2.9.2244.24857
Win32 版本: 2.9.2244.24857
基本代码: file:///C:/Program%20Files/DataSyncSetup/OpenNETCF.Desktop.Communication.DLL
----------------------------------------
CssPnet.SyncBase
程序集版本: 1.2.3.0
Win32 版本: 1.2.3.0
基本代码: file:///C:/Program%20Files/DataSyncSetup/CssPnet.SyncBase.DLL
----------------------------------------
mscorlib.resources
程序集版本: 2.0.0.0
Win32 版本: 2.0.50727.1433 (REDBITS.050727-1400)
基本代码: file:///C:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
----------------------------------------
System.Windows.Forms.resources
程序集版本: 2.0.0.0
Win32 版本: 2.0.50727.1433 (REDBITS.050727-1400)
基本代码: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Windows.Forms.resources/2.0.0.0_zh-CHS_b77a5c561934e089/System.Windows.Forms.resources.dll
----------------------------------------************** JIT 调试 **************
要启用实时(JIT)调试,
该应用程序或计算机的 .config 文件(machine.config)的 system.windows.forms 节中必须设置
jitDebugging 值。
编译应用程序时还必须启用
调试。例如: <configuration>
<system.windows.forms jitDebugging="true" />
</configuration>启用 JIT 调试后,任何无法处理的异常
都将被发送到在此计算机上注册的 JIT 调试器,
而不是由此对话框处理。
以上是生成的打包EXE文件运行的时候报的错误,但是我在程序中看没有为空的值。还有就是BIN下的解决方案EXE能正常运行,把BIN拷出来运行也报如上错误。在程序中跑的很欢快,只要打包成EXE文件就会报如上错误。先谢过!
请参见此消息的结尾。************** 异常文本 **************
System.NullReferenceException: 未将对象引用设置到对象的实例。
在 DataSyncTool.DataSyncForm.OrcToSqlceBtn_Click(Object sender, EventArgs e)
在 System.Windows.Forms.Control.OnClick(EventArgs e)
在 System.Windows.Forms.Button.OnClick(EventArgs e)
在 System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
在 System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
在 System.Windows.Forms.Control.WndProc(Message& m)
在 System.Windows.Forms.ButtonBase.WndProc(Message& m)
在 System.Windows.Forms.Button.WndProc(Message& m)
在 System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
在 System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
在 System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
************** 已加载的程序集 **************
mscorlib
程序集版本: 2.0.0.0
Win32 版本: 2.0.50727.1433 (REDBITS.050727-1400)
基本代码: file:///C:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
----------------------------------------
CopyTableDemo
程序集版本: 1.0.0.0
Win32 版本: 1.0.0.0
基本代码: file:///C:/Program%20Files/DataSyncSetup/CopyTableDemo.exe
----------------------------------------
System.Windows.Forms
程序集版本: 2.0.0.0
Win32 版本: 2.0.50727.1433 (REDBITS.050727-1400)
基本代码: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System
程序集版本: 2.0.0.0
Win32 版本: 2.0.50727.1433 (REDBITS.050727-1400)
基本代码: file:///C:/WINDOWS/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Drawing
程序集版本: 2.0.0.0
Win32 版本: 2.0.50727.1433 (REDBITS.050727-1400)
基本代码: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
System.Configuration
程序集版本: 2.0.0.0
Win32 版本: 2.0.50727.1433 (REDBITS.050727-1400)
基本代码: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Configuration/2.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
----------------------------------------
System.Xml
程序集版本: 2.0.0.0
Win32 版本: 2.0.50727.1433 (REDBITS.050727-1400)
基本代码: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
OpenNETCF.Desktop.Communication
程序集版本: 2.9.2244.24857
Win32 版本: 2.9.2244.24857
基本代码: file:///C:/Program%20Files/DataSyncSetup/OpenNETCF.Desktop.Communication.DLL
----------------------------------------
CssPnet.SyncBase
程序集版本: 1.2.3.0
Win32 版本: 1.2.3.0
基本代码: file:///C:/Program%20Files/DataSyncSetup/CssPnet.SyncBase.DLL
----------------------------------------
mscorlib.resources
程序集版本: 2.0.0.0
Win32 版本: 2.0.50727.1433 (REDBITS.050727-1400)
基本代码: file:///C:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
----------------------------------------
System.Windows.Forms.resources
程序集版本: 2.0.0.0
Win32 版本: 2.0.50727.1433 (REDBITS.050727-1400)
基本代码: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Windows.Forms.resources/2.0.0.0_zh-CHS_b77a5c561934e089/System.Windows.Forms.resources.dll
----------------------------------------************** JIT 调试 **************
要启用实时(JIT)调试,
该应用程序或计算机的 .config 文件(machine.config)的 system.windows.forms 节中必须设置
jitDebugging 值。
编译应用程序时还必须启用
调试。例如: <configuration>
<system.windows.forms jitDebugging="true" />
</configuration>启用 JIT 调试后,任何无法处理的异常
都将被发送到在此计算机上注册的 JIT 调试器,
而不是由此对话框处理。
以上是生成的打包EXE文件运行的时候报的错误,但是我在程序中看没有为空的值。还有就是BIN下的解决方案EXE能正常运行,把BIN拷出来运行也报如上错误。在程序中跑的很欢快,只要打包成EXE文件就会报如上错误。先谢过!
解决方案 »
- wpf 图片缩放和旋转后如何确定大小
- DataGridView 根据 当前鼠标的坐标,得到该坐标的单元格?
- datagridview如何使用下拉框??
- 如何使用正则表达式将上面的换成下面的:<a href="bcs.asp?AL=HU&CC=Y">规定</a>
- winform+webservice中,两客户端怎么能实现通信?
- 请各位大侠帮忙:用户权限设置
- Office打包遇到奇怪的问题。
- 急急急急急急急急急急急急急急急急!!!随机数问题
- 有没有人愿意一起做PP点点通来练练C#?
- 如何清空datatable中的image类型的字段?
- C#中的string到底是什么类型?
- winform子窗口的按钮如何刷新父窗口的dataGridview控件?...等........
楼主先修改下代码,把尽可能出现NULL的地方Catch出来看看Message~
<system.windows.forms jitDebugging="true" />
</configuration>网上说吧这个值设置为FALSE ,我也试过啦。还是不行!
然后在运行时看不就能看到到底是什么错误了嘛~既然Debug不报错,就不要debug了啊
{
XmlDocument xmldo = new XmlDocument();
xmldo.Load("../../\\XmlDataInfo.xml");
this.XmlToSqlce(xmldo);
dbBase = new SyncBase(syncBaseModel);
this.dbBase.SyncOrcToSqlCETranPartConnInc(syncBaseModel.Userid, syncBaseModel.DatabaseSource, syncBaseModel.PassWord, syncBaseModel.TargetUserid, syncBaseModel.TargetDatabaseSource, syncBaseModel.TargetPassword, syncBaseModel.DataTable);
this.dbBase.InsertXmlContent();
MessageBox.Show("数据同步成功!" + syncBaseModel.Contents, "系统提示");
}
catch (Exception sqlex)
{
this.dbBase.InsertXmlContent();
MessageBox.Show("[发生错误]错误编码:" + sqlex.Message.ToString() + "→如需要获得更多信息请查看错误日志\n" + syncBaseModel.Contents, "系统提示");
}以上是我BUTTON事件中的代码 从XML中获取然后调用一个方法不知那个为空。。看啦每个都有值!
有关调用实时(JIT)调试而不是此对话框的详细信息,
请参见此消息的结尾。************** 异常文本 **************
System.Data.OleDb.OleDbException: 未指定的错误
在 System.Data.OleDb.OleDbConnectionInternal..ctor(OleDbConnectionString constr, OleDbConnection connection)
在 System.Data.OleDb.OleDbConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningObject)
在 System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbConnection owningConnection, DbConnectionPoolGroup poolGroup)
在 System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection)
在 System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory)
在 System.Data.OleDb.OleDbConnection.Open()
在 DataAccess.DataSelect.GetProdBySearch(String id)
在 DataAccess.DataSelect.btnSele_Click(Object sender, EventArgs e)
在 System.Windows.Forms.Control.OnClick(EventArgs e)
在 System.Windows.Forms.Button.OnClick(EventArgs e)
在 System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
在 System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
在 System.Windows.Forms.Control.WndProc(Message& m)
在 System.Windows.Forms.ButtonBase.WndProc(Message& m)
在 System.Windows.Forms.Button.WndProc(Message& m)
在 System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
在 System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
在 System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
************** 已加载的程序集 **************
mscorlib
程序集版本: 2.0.0.0
Win32 版本: 2.0.50727.3623 (GDR.050727-3600)
基本代码: file:///C:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
----------------------------------------
DataAccess
程序集版本: 1.0.0.0
Win32 版本: 1.0.0.0
基本代码: file:///D:/Program%20Files/炉号管理系统/System/DataAccess.exe
----------------------------------------
System.Windows.Forms
程序集版本: 2.0.0.0
Win32 版本: 2.0.50727.3623 (GDR.050727-3600)
基本代码: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System
程序集版本: 2.0.0.0
Win32 版本: 2.0.50727.3624 (GDR.050727-3600)
基本代码: file:///C:/WINDOWS/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Drawing
程序集版本: 2.0.0.0
Win32 版本: 2.0.50727.3053 (netfxsp.050727-3000)
基本代码: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
Business
程序集版本: 1.0.0.0
Win32 版本: 1.0.0.0
基本代码: file:///D:/Program%20Files/炉号管理系统/System/Business.DLL
----------------------------------------
DataAccessm
程序集版本: 1.0.0.0
Win32 版本: 1.0.0.0
基本代码: file:///D:/Program%20Files/炉号管理系统/System/DataAccessm.DLL
----------------------------------------
System.Data
程序集版本: 2.0.0.0
Win32 版本: 2.0.50727.3053 (netfxsp.050727-3000)
基本代码: file:///C:/WINDOWS/assembly/GAC_32/System.Data/2.0.0.0__b77a5c561934e089/System.Data.dll
----------------------------------------
System.Configuration
程序集版本: 2.0.0.0
Win32 版本: 2.0.50727.3053 (netfxsp.050727-3000)
基本代码: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Configuration/2.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
----------------------------------------
System.Xml
程序集版本: 2.0.0.0
Win32 版本: 2.0.50727.3053 (netfxsp.050727-3000)
基本代码: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
System.Windows.Forms.resources
程序集版本: 2.0.0.0
Win32 版本: 2.0.50727.3053 (netfxsp.050727-3000)
基本代码: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Windows.Forms.resources/2.0.0.0_zh-CHS_b77a5c561934e089/System.Windows.Forms.resources.dll
----------------------------------------
System.Transactions
程序集版本: 2.0.0.0
Win32 版本: 2.0.50727.3053 (netfxsp.050727-3000)
基本代码: file:///C:/WINDOWS/assembly/GAC_32/System.Transactions/2.0.0.0__b77a5c561934e089/System.Transactions.dll
----------------------------------------
System.EnterpriseServices
程序集版本: 2.0.0.0
Win32 版本: 2.0.50727.3053 (netfxsp.050727-3000)
基本代码: file:///C:/WINDOWS/assembly/GAC_32/System.EnterpriseServices/2.0.0.0__b03f5f7f11d50a3a/System.EnterpriseServices.dll
----------------------------------------
mscorlib.resources
程序集版本: 2.0.0.0
Win32 版本: 2.0.50727.3623 (GDR.050727-3600)
基本代码: file:///C:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
----------------------------------------************** JIT 调试 **************
要启用实时(JIT)调试,
该应用程序或计算机的 .config 文件(machine.config)的 system.windows.forms 节中必须设置
jitDebugging 值。
编译应用程序时还必须启用
调试。例如: <configuration>
<system.windows.forms jitDebugging="true" />
</configuration>启用 JIT 调试后,任何无法处理的异常
都将被发送到在此计算机上注册的 JIT 调试器,
而不是由此对话框处理。
请参见此消息的结尾。************** 异常文本 **************
System.ComponentModel.Win32Exception: 操作成功完成。
在 NSScreenKeyboard.ScreenKeyboard.SendKeyDown(Int16 key) 位置 D:\原E盘里面的东西\ScreenKeyboard\CnBlogs.Youzai.ScreenKeyboard\ScreenKeyboard.cs:行号 478
在 NSScreenKeyboard.ScreenKeyboard.SendKeyCommand(KeyboardButton keyButton) 位置 D:\原E盘里面的东西\ScreenKeyboard\CnBlogs.Youzai.ScreenKeyboard\ScreenKeyboard.cs:行号 463
在 NSScreenKeyboard.ScreenKeyboard.ButtonOnClick(Object sender, EventArgs e) 位置 D:\原E盘里面的东西\ScreenKeyboard\CnBlogs.Youzai.ScreenKeyboard\ScreenKeyboard.cs:行号 454
在 System.Windows.Forms.Control.OnClick(EventArgs e)
在 System.Windows.Forms.Button.OnClick(EventArgs e)
在 System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
在 NSScreenKeyboard.KeyboardButton.OnMouseUp(MouseEventArgs mevent) 位置 D:\原E盘里面的东西\ScreenKeyboard\CnBlogs.Youzai.ScreenKeyboard\KeyboardButton.cs:行号 295
在 System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
在 System.Windows.Forms.Control.WndProc(Message& m)
在 System.Windows.Forms.ButtonBase.WndProc(Message& m)
在 System.Windows.Forms.Button.WndProc(Message& m)
在 System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
在 System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
在 System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
************** 已加载的程序集 **************
mscorlib
程序集版本: 2.0.0.0
Win32 版本: 2.0.50727.4961 (win7RTMGDR.050727-4900)
基本代码: file:///E:/Windows/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
----------------------------------------
ScreenKeyboard
程序集版本: 1.0.0.0
Win32 版本: 1.0.0.0
基本代码: file:///D:/原E盘里面的东西/ScreenKeyboard/Bin/ScreenKeyboard.exe
----------------------------------------
System.Windows.Forms
程序集版本: 2.0.0.0
Win32 版本: 2.0.50727.4961 (win7RTMGDR.050727-4900)
基本代码: file:///E:/Windows/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System
程序集版本: 2.0.0.0
Win32 版本: 2.0.50727.4962 (win7RTMGDR.050727-4900)
基本代码: file:///E:/Windows/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Drawing
程序集版本: 2.0.0.0
Win32 版本: 2.0.50727.4927 (NetFXspW7.050727-4900)
基本代码: file:///E:/Windows/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
KeyBoardHookEx
程序集版本: 1.0.0.0
Win32 版本: 1.0.0.0
基本代码: file:///D:/原E盘里面的东西/ScreenKeyboard/Bin/KeyBoardHookEx.DLL
----------------------------------------
System.Configuration
程序集版本: 2.0.0.0
Win32 版本: 2.0.50727.4927 (NetFXspW7.050727-4900)
基本代码: file:///E:/Windows/assembly/GAC_MSIL/System.Configuration/2.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
----------------------------------------
System.Xml
程序集版本: 2.0.0.0
Win32 版本: 2.0.50727.4927 (NetFXspW7.050727-4900)
基本代码: file:///E:/Windows/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
Accessibility
程序集版本: 2.0.0.0
Win32 版本: 2.0.50727.4927 (NetFXspW7.050727-4900)
基本代码: file:///E:/Windows/assembly/GAC_MSIL/Accessibility/2.0.0.0__b03f5f7f11d50a3a/Accessibility.dll
----------------------------------------
System.Windows.Forms.resources
程序集版本: 2.0.0.0
Win32 版本: 2.0.50727.4927 (NetFXspW7.050727-4900)
基本代码: file:///E:/Windows/assembly/GAC_MSIL/System.Windows.Forms.resources/2.0.0.0_zh-CHS_b77a5c561934e089/System.Windows.Forms.resources.dll
----------------------------------------
mscorlib.resources
程序集版本: 2.0.0.0
Win32 版本: 2.0.50727.4961 (win7RTMGDR.050727-4900)
基本代码: file:///E:/Windows/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
----------------------------------------************** JIT 调试 **************
要启用实时(JIT)调试,
该应用程序或计算机的 .config 文件(machine.config)的 system.windows.forms 节中必须设置
jitDebugging 值。
编译应用程序时还必须启用
调试。例如: <configuration>
<system.windows.forms jitDebugging="true" />
</configuration>启用 JIT 调试后,任何无法处理的异常
都将被发送到在此计算机上注册的 JIT 调试器,
而不是由此对话框处理。
我也有这种问题,楼主您解决了吗?可以告诉我,这个是什么原因吗?急
************** 异常文本 **************
System.ComponentModel.Win32Exception: 操作成功完成。
说的是成功完成了,我在程序里面也找了,不知道怎么回事