C# winfrom项目打包成exe、安装完成、运行时报错System.TypeInitializationException

路漫漫都是坑 2019-05-31 09:15:22
************** 异常文本 **************
System.TypeInitializationException: “Report.IndexInfoFm.fm_Index_Township”的类型初始值设定项引发异常。 ---> System.ArgumentOutOfRangeException: 长度不能小于 0。
参数名: length
在 System.String.Substring(Int32 startIndex, Int32 length)
在 Report.Common.BackstagePath.getXmlPath(String xmlName) 位置 d:\235svn\trunk\dlriver\Report\Report\Common\BackstagePath.cs:行号 21
在 Report.IndexInfoFm.fm_Index_Township..cctor() 位置 d:\235svn\trunk\dlriver\Report\Report\IndexInfoFm\fm_Index_Township.cs:行号 23
--- 内部异常堆栈跟踪的结尾 ---
在 Report.IndexInfoFm.fm_Index_Township.changeH() 位置 d:\235svn\trunk\dlriver\Report\Report\IndexInfoFm\fm_Index_Township.cs:行号 64
在 Report.IndexInfoFm.fm_Index_Township.fm_Index_Township_SizeChanged(Object sender, EventArgs e) 位置 d:\235svn\trunk\dlriver\Report\Report\IndexInfoFm\fm_Index_Township.cs:行号 70
在 System.Windows.Forms.Control.OnSizeChanged(EventArgs e)
在 System.Windows.Forms.Control.UpdateBounds(Int32 x, Int32 y, Int32 width, Int32 height, Int32 clientWidth, Int32 clientHeight)
在 System.Windows.Forms.Control.UpdateBounds(Int32 x, Int32 y, Int32 width, Int32 height)
在 System.Windows.Forms.Control.SetBoundsCore(Int32 x, Int32 y, Int32 width, Int32 height, BoundsSpecified specified)
在 System.Windows.Forms.Form.SetBoundsCore(Int32 x, Int32 y, Int32 width, Int32 height, BoundsSpecified specified)
在 System.Windows.Forms.Control.SetBounds(Int32 x, Int32 y, Int32 width, Int32 height, BoundsSpecified specified)
在 System.Windows.Forms.Control.set_Size(Size value)
在 System.Windows.Forms.Control.SetClientSizeCore(Int32 x, Int32 y)
在 System.Windows.Forms.Form.SetClientSizeCore(Int32 x, Int32 y)
在 System.Windows.Forms.Control.set_ClientSize(Size value)
在 System.Windows.Forms.Form.set_FormBorderStyle(FormBorderStyle value)
在 Report.Report.fm_index.ChangeInfo(Int32 fm_index) 位置 d:\235svn\trunk\dlriver\Report\Report\Report\fm_index.cs:行号 64
在 Report.Report.fm_index.panel_btn2_MouseHover(Object sender, EventArgs e) 位置 d:\235svn\trunk\dlriver\Report\Report\Report\fm_index.cs:行号 119
在 System.Windows.Forms.Control.OnMouseHover(EventArgs e)
在 System.Windows.Forms.Control.WndProc(Message& m)
在 System.Windows.Forms.ScrollableControl.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)


...全文
227 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
路漫漫都是坑 2019-06-04
  • 打赏
  • 举报
回复
求助求助,大佬们帮帮忙啊

250

社区成员

发帖
与我相关
我的任务
社区描述
其他产品/厂家
社区管理员
  • 其他
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧