求教 Microsoft.VisualBasic.FileSystem.Rename调用出问题 调试时没问题,生成EXE时调用失败

qq_39429431 2018-08-07 10:31:41
求教 Microsoft.VisualBasic.FileSystem.Rename调用出问题
调试时没问题,生成EXE时调用失败

有关调用实时(JIT)调试而不是此对话框的详细信息,
请参见此消息的结尾。

************** 异常文本 **************
System.ArgumentException: 过程调用或参数无效。
在 Microsoft.VisualBasic.FileSystem.Rename(String OldPath, String NewPath)
在 WindowsApplication1.Form1.Button3_Click(Object sender, EventArgs e) 位置 C:\Users\Administrator\Documents\Visual Studio 2010\Projects\WindowsApplication1\WindowsApplication1\Form1.vb:行号 108
在 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
程序集版本:4.0.0.0
Win32 版本:4.7.2633.0 built by: NET471REL1LAST_C
基本代码:file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/mscorlib.dll
----------------------------------------
WindowsApplication1
程序集版本:1.0.0.0
Win32 版本:1.0.0.0
基本代码:file:///C:/Users/Administrator/Documents/Visual%20Studio%202010/Projects/WindowsApplication1/WindowsApplication1/obj/x86/Debug/WindowsApplication1.exe
----------------------------------------
Microsoft.VisualBasic
程序集版本:10.0.0.0
Win32 版本:14.7.2556.0 built by: NET471REL1
基本代码:file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/Microsoft.VisualBasic/v4.0_10.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualBasic.dll
----------------------------------------
System
程序集版本:4.0.0.0
Win32 版本:4.7.2556.0 built by: NET471REL1
基本代码:file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Core
程序集版本:4.0.0.0
Win32 版本:4.7.2633.0 built by: NET471REL1LAST_C
基本代码:file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.dll
----------------------------------------
System.Windows.Forms
程序集版本:4.0.0.0
Win32 版本:4.7.2556.0 built by: NET471REL1
基本代码:file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System.Drawing
程序集版本:4.0.0.0
Win32 版本:4.7.2556.0 built by: NET471REL1
基本代码:file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
System.Configuration
程序集版本:4.0.0.0
Win32 版本:4.7.2556.0 built by: NET471REL1
基本代码:file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Configuration/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
----------------------------------------
System.Xml
程序集版本:4.0.0.0
Win32 版本:4.7.2612.0 built by: NET471REL1LAST_B
基本代码:file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
System.Runtime.Remoting
程序集版本:4.0.0.0
Win32 版本:4.7.2556.0 built by: NET471REL1
基本代码:file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Runtime.Remoting/v4.0_4.0.0.0__b77a5c561934e089/System.Runtime.Remoting.dll
----------------------------------------
Microsoft.VisualBasic.resources
程序集版本:10.0.0.0
Win32 版本:14.7.2556.0 built by: NET471REL1
基本代码:file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/Microsoft.VisualBasic.resources/v4.0_10.0.0.0_zh-Hans_b03f5f7f11d50a3a/Microsoft.VisualBasic.resources.dll
----------------------------------------
System.Windows.Forms.resources
程序集版本:4.0.0.0
Win32 版本:4.7.2556.0 built by: NET471REL1
基本代码:file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms.resources/v4.0_4.0.0.0_zh-Hans_b77a5c561934e089/System.Windows.Forms.resources.dll
----------------------------------------
mscorlib.resources
程序集版本:4.0.0.0
Win32 版本:4.7.2556.0 built by: NET471REL1
基本代码:file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/mscorlib.resources/v4.0_4.0.0.0_zh-Hans_b77a5c561934e089/mscorlib.resources.dll
----------------------------------------

************** JIT 调试 **************
要启用实时(JIT)调试,
该应用程序或计算机的 .config 文件(machine.config)的 system.windows.forms 节中必须设置
jitDebugging 值。
编译应用程序时还必须启用
调试。

例如:

<configuration>
<system.windows.forms jitDebugging="true" />
</configuration>

启用 JIT 调试后,任何未经处理的异常
都将被发送到在此计算机上注册的 JIT 调试程序,
...全文
360 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
threenewbee 2018-08-07
  • 打赏
  • 举报
回复
看看是不是没有权限,试试看 System.IO.File.Move (同一个目录移动就是改名)
jhone99 2018-08-07
  • 打赏
  • 举报
回复
C:\Users\Administrator\Documents\Visual Studio 2010\Projects\WindowsApplication1\WindowsApplication1\Form1.vb:行号 108

这个查什么问题?

是否路径问题?

16,555

社区成员

发帖
与我相关
我的任务
社区描述
VB技术相关讨论,主要为经典vb,即VB6.0
社区管理员
  • VB.NET
  • 水哥阿乐
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

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