直接调试就可以正常运行,但是直接运行(不调试)就会出现错误

zhouzhouqiang_com 2008-07-08 05:36:30
我点击调试按钮程序却可以正常运行,但是点击开始执行(不调试)却出现下面的错误

今天我在运行C#程序时,遇到了:值不能为空,参数名:path的错误
详细信息是:System.ArgumentNullException: 值不能为空。
参数名: path
在 System.IO.StreamWriter..ctor(String path, Boolean append, Encoding encoding, Int32 bufferSize)
在 System.IO.StreamWriter..ctor(String path)
在 thss.tpcc.utility.MsgConsole.Initialize(ControlCenter cc)
在 thss.tpcc.userInterface.ControlCenter.ControlCenter_Load(Object sender, EventArgs e)
在 System.Windows.Forms.Form.OnLoad(EventArgs e)
在 System.Windows.Forms.Form.OnCreateControl()
在 System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
在 System.Windows.Forms.Control.CreateControl()
在 System.Windows.Forms.Control.WmShowWindow(Message& m)
在 System.Windows.Forms.Control.WndProc(Message& m)
在 System.Windows.Forms.ScrollableControl.WndProc(Message& m)
在 System.Windows.Forms.ContainerControl.WndProc(Message& m)
在 System.Windows.Forms.Form.WmShowWindow(Message& m)
在 System.Windows.Forms.Form.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)
希望哪位帮助看看为什么会出这样的错误?
...全文
344 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
renxiaolan 2008-07-08
  • 打赏
  • 举报
回复
看看你的路径有没有问题。
Ador3 2008-07-08
  • 打赏
  • 举报
回复
跟一下吧!
GhostAdai 2008-07-08
  • 打赏
  • 举报
回复
看看你的路径有没有问题。
asdfgh_5982 2008-07-08
  • 打赏
  • 举报
回复
可能楼主在对文件操作中文件的路径使用的是相对路径
billclinton8 2008-07-08
  • 打赏
  • 举报
回复
是不是对文件进行了操作
如果是 请检查在不调试的状态下IIS用户有没有权限访问你操作的权限 

110,571

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 C#
社区管理员
  • C#
  • Web++
  • by_封爱
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

让您成为最强悍的C#开发者

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