Visual Studio 2015调试器"未正确安装" &安培; "进程无法访问文件 - 正在使用的文件"构建错误

时间:2016-12-09 01:00:06

标签: visual-studio debugging build compiler-errors

更新:2016年12月19日

我曾尝试再次完全卸载visual studio - 这次选择安装visual studio 2013作为临时解决方案......但似乎我 STILL 得到有关调试器的错误正在安装"未正确安装"。这绝对让我感到困惑,因为你会认为两个版本之间的调试器也会有所不同。

-------------------------

- 原帖 -

这是一个由两部分组成的问题。当我在visual C#中编码时,问题最初存在,但它现在似乎也影响其他语言。在这个问题的这个阶段,我开始了这个新项目" ExDesign"还没有编码任何东西。我按下开始按钮来检查构建/调试,确定我仍然遇到与下面相同的问题。

第一个问题是关于构建错误。当我构建我的程序时,它会发出一些警告和错误,无法将exe文件从obj移动或复制到bin。

Error       Unable to copy file "obj\Debug\ExDesign.exe" to "bin\Debug\ExDesign.exe". The process cannot access the file 'bin\Debug\ExDesign.exe' because it is being used by another process.  ExDesign            
Error       Could not copy "obj\Debug\ExDesign.exe" to "bin\Debug\ExDesign.exe". Exceeded retry count of 10. Failed.    ExDesign            
Warning     Could not copy "obj\Debug\ExDesign.exe" to "bin\Debug\ExDesign.exe". Beginning retry 9 in 1000ms. The process cannot access the file 'bin\Debug\ExDesign.exe' because it is being used by another process.  ExDesign            
Warning     Could not copy "obj\Debug\ExDesign.exe" to "bin\Debug\ExDesign.exe". Beginning retry 7 in 1000ms. The process cannot access the file 'bin\Debug\ExDesign.exe' because it is being used by another process.  ExDesign            
Warning     Could not copy "obj\Debug\ExDesign.exe" to "bin\Debug\ExDesign.exe". Beginning retry 2 in 1000ms. The process cannot access the file 'bin\Debug\ExDesign.exe' because it is being used by another process.  ExDesign            
Warning     Could not copy "obj\Debug\ExDesign.exe" to "bin\Debug\ExDesign.exe". Beginning retry 1 in 1000ms. The process cannot access the file 'bin\Debug\ExDesign.exe' because it is being used by another process.  ExDesign            
Warning     Could not copy "obj\Debug\ExDesign.exe" to "bin\Debug\ExDesign.exe". Beginning retry 10 in 1000ms. The process cannot access the file 'bin\Debug\ExDesign.exe' because it is being used by another process. ExDesign            
Warning     Could not copy "obj\Debug\ExDesign.exe" to "bin\Debug\ExDesign.exe". Beginning retry 4 in 1000ms. The process cannot access the file 'bin\Debug\ExDesign.exe' because it is being used by another process.  ExDesign            
Warning     Could not copy "obj\Debug\ExDesign.exe" to "bin\Debug\ExDesign.exe". Beginning retry 3 in 1000ms. The process cannot access the file 'bin\Debug\ExDesign.exe' because it is being used by another process.  ExDesign            
Warning     Unable to delete file "c:\users\<redacted>\documents\visual studio 2015\Projects\ExDesign\ExDesign\bin\Debug\ExDesign.exe". Access to the path 'c:\users\<redacted>\documents\visual studio 2015\Projects\ExDesign\ExDesign\bin\Debug\ExDesign.exe' is denied.  ExDesign            
Warning     Could not copy "obj\Debug\ExDesign.exe" to "bin\Debug\ExDesign.exe". Beginning retry 8 in 1000ms. The process cannot access the file 'bin\Debug\ExDesign.exe' because it is being used by another process.  ExDesign            
Warning     Could not copy "obj\Debug\ExDesign.exe" to "bin\Debug\ExDesign.exe". Beginning retry 6 in 1000ms. The process cannot access the file 'bin\Debug\ExDesign.exe' because it is being used by another process.  ExDesign            
Warning     Could not copy "obj\Debug\ExDesign.exe" to "bin\Debug\ExDesign.exe". Beginning retry 5 in 1000ms. The process cannot access the file 'bin\Debug\ExDesign.exe' because it is being used by another process.  ExDesign            

我试图找到一个类似的问题,但那些提到的解决方案根本没有帮助,所以我希望这不是一个重复的帖子和&#34; #34 ;.此外,请考虑新安装和新项目发生错误的事实 - 与正在进行的工作相比,与其他帖子相比。

  

到目前为止我尝试过的事情:

  • 以管理员身份运行VS2015 - 结果:无效
  • 停用Avast - 结果:无效
  • 确保程序未在后台运行 - 结果:无效
  • 禁用&#34; Visual Studio托管流程&#34; - 结果:无效
  • 运行修复 - 结果:无效/需要FOREVER
  • 重新安装VS2015 - 结果:没有效果/需要6个小时,只是拍我......
  • 确保软件是最新的 - 结果:没有影响/已经是最新的

第二个问题是我在尝试运行调试器时收到的错误消息。我不知道这是否与第一期有关,或者这是一个完全不同的问题:

Error while trying to run project: Unable to start program 'C:\Users\<redacted>\documents\visual studio 2015\Projects\ExDesign\ExDesign\bin\Debug\Exdesign.exe'

The debugger is not properly installed. Run setup to install or repair the debugger.

自从看到这个,我尝试修复甚至重新安装整个visual studio应用程序 - TWICE。每次我得到相同的结果错误。 Visual Studio在4-5个月前工作得很好,所以我不确定为什么我突然遇到这些问题。

系统信息:

Windows 10 home x64

8GB ram

1TB磁盘 - 约500GB免费

2 个答案:

答案 0 :(得分:1)

似乎我的计算机上出现了更多问题,而且Visual Studio最终失败了。这促使我使用www.tweaking.com中的一体化修复工具进行系统修复。这花了相当多的时间来运行,但是,现在一切都很完美。

我仍然不知道这个问题的最初原因是什么(损坏的注册表,损坏的系统文件等),但我很高兴现在一切正常。

如果您使用上述实用程序,请务必使用BACKUP选项卡备份注册表并创建还原点 BEFORE 运行修复。这是一个最后的实用程序,在尝试重新安装操作系统之前需要尝试。

答案 1 :(得分:0)

  
    

无法复制文件&#34; obj \ Debug \ ExDesign.exe&#34;到&#34; bin \ Debug \ ExDesign.exe&#34;。该进程无法访问文件&bin; \ Debug \ ExDesign.exe&#39;因为它正被另一个进程使用。

  

请检查它是否与此文档中的配置管理器设置相关:

http://www.bytemedev.com/how-to-fix-visual-studio-error-the-process-cannot-access-the-file-because-it-is-being-used-by-another-process/

许多社区成员使用上述步骤解决了这个问题。

只需为项目备份,关闭VS,然后删除项目路径中的bin和obj文件夹,然后重新打开此项目,清理并重建它,再次检查它。请确保项目输出路径与项目属性中的项目文件夹匹配。

  
    

尝试运行项目时出错:无法启动程序&#39; C:\ Users \\ documents \ visual studio 2015 \ Projects \ ExDesign \ ExDesign \ bin \ Debug \ Exdesign.exe&#39;

  

未正确安装调试器。运行安装程序以安装或修复调试程序。

对于此问题,您是在本地还是远程调试应用程序?本文档分享了可能产生此问题的三个可能原因,如果可能,您可以在此处参考:

http://digioz.blogspot.sg/2007/08/debugger-is-not-properly-installed-run.html

如果仍然没有帮助,请在其他VS机器上测试。如果在其他机器上运行良好,请将VS版本与您的版本进行比较。至少,我们必须确保它是最新版本的VS2015版本。