当我调试我的项目时,给我这个错误 [英] when i debug my project give me this error

查看:59
本文介绍了当我调试我的项目时,给我这个错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我调试项目时,给我这个错误
无法将文件obj \ Debug \ call_phone.exe复制到bin \ Debug \ call_phone.exe.该进程无法访问文件bin \ Debug \ call_phone.exe;因为它正在被另一个进程使用. call_phone

when i debug my project give me this error
Unable to copy file obj\Debug\call_phone.exe to bin\Debug\call_phone.exe. The process cannot access the file bin\Debug\call_phone.exe; because it is being used by another process. call_phone

推荐答案

另一软件正在使用call_phone.exe.

运行任务管理器并检查正在运行的进程的列表.您可能会发现call_phone.exe是正在运行的进程之一.终止进程,然后重试.
The call_phone.exe is being used by another piece of software.

Run task manager and check the list of running processes. You''ll probably find call_phone.exe is one of the running processes. Kill the process and try again.


首先,在这里多次问过类似的问题,从我的经验中我知道:在大多数情况下,阻塞过程是您自己的过程.您可能忘记了在同一应用程序中处理/关闭某些内容.因此,首先,进行检查.要探索这种可能性,请查看我过去的回答:
在C#中清除句柄 [ Winternals 公司,目前在Microsoft)是必须具备的对于任何开发人员,请参见:
http://technet.microsoft.com/en-us/sysinternals/bb842062 [ ^ ],
http://technet.microsoft.com/en-us/sysinternals/bb545027 [ ^ ].

您需要的实用程序是" handle.exe ",请参见:
http://technet.microsoft.com/en-us/sysinternals/bb896655 [ ^ ].

在您的情况下,可以将其与文件名参数一起使用:
First of all, the similar question was asked here many times, and from this experience I know: in most cases the blocking process is your own process. You could have forgotten to dispose/close something in the same application. So, first of all, check it up. To explore this possibility, please see my past answer:
Clearing a Handle in C#[^].

In same cases, you really need to investigate which process holds which file. For this, I recommend using one utility from the Sysinternals Suite. This set of utilities (formerly from Winternals company, presently at Microsoft) is a must-have for any developer, please see:
http://technet.microsoft.com/en-us/sysinternals/bb842062[^],
http://technet.microsoft.com/en-us/sysinternals/bb545027[^].

The utility you need is "handle.exe", please see:
http://technet.microsoft.com/en-us/sysinternals/bb896655[^].

In your case, you use it with file name parameter:
handle.exe <file_name>



该实用程序将扫描所有类型的句柄,而不仅仅是文件句柄.对于文件,它将扫描与文件名匹配的所有文件句柄(因此它不必是完整的路径名),并返回足以标识每个进程的信息,包括其 pid .因此,如果您需要有关该进程的更多信息,则还可以使用其他Sysinternals实用程序,尤其是其 Process Explorer :
http://technet.microsoft.com/en-us/sysinternals/bb896653 [ ^ ].

祝你好运,

-SA



This utility will scan all kinds of handles, not just file handles. For file, it will scan all file handles matching the file name (so it does not have to be a full path name) and return information sufficient to identify each process, including its pid. So, if you need more information on a process in question, you can also use other Sysinternals utilities, in particular, its Process Explorer:
http://technet.microsoft.com/en-us/sysinternals/bb896653[^].

Good luck,

—SA


使obj/Debug文件夹可写.取消选中该文件夹的只读选项.
Make obj/Debug folder writable. Uncheck readonly option of that folder.


这篇关于当我调试我的项目时,给我这个错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆