简体   繁体   English

不断得到:调试错误BC31019:无法写入输出文件'path / form.exe系统错误&H80070005&VB.NET

[英]Keep getting : Debug error BC31019 : Unable to write to output file 'path/form.exe System Error &H80070005& VB.NET

I'm using Visual Studio Professional 2013 and I'm doing some very basic windows forms application. 我正在使用Visual Studio Professional 2013,并且正在做一些非常基本的Windows窗体应用程序。

A month ago, I could do everything I wanted without any problem. 一个月前,我可以做所有想要的事情而没有任何问题。 But I started some new projects today and for absolutely no reasons, I keep getting this error message when I come to debug or compile: 但是,我今天开始了一些新项目,并且出于绝对原因,在进行调试或编译时,我总是收到以下错误消息:

Debug error BC31019 : Unable to write to output file 'path/form.exe System Error &H80070005&

It can happen simply by changing the size of a textbox or modifying the text content in a label... It's very random... And I can even do an undo (ctrl+z) and then I can debug again, but if I try again to do the thing I did that brought the error message, the same message pops again as I try to run. 只需更改文本框的大小或修改标签中的文本内容即可实现此操作。这是非常随机的。我什至可以撤消(ctrl + z),然后可以再次调试,但是如果我再次尝试执行带错误消息的操作,当我尝试运行该错误消息时,该消息再次弹出。

After reading a little about the subject, I realized that it was because the .exe file became in read-only mode and when I try to remove it, windows wont let me. 在阅读了有关该主题的一些知识之后,我意识到这是因为.exe文件变成只读模式,并且当我尝试删除它时,Windows不允许我这样做。

The only thing I can do if I really want to continue, is to restart my computer every times it happens. 如果我真的想继续,唯一可以做的就是每次发生时都重新启动计算机。 Then I can continue just like normal as my .exe file is no longer in read-only... 然后,我可以像平常一样继续操作,因为我的.exe文件不再处于只读状态...

I tried tor run a sfc/scannow in my command prompt to see if i had any problems with my frameworks but everything was fine. 我试图在命令提示符下运行sfc / scannow,以查看我的框架是否有问题,但一切都很好。

Since, it is when i restart my pc that the bug disapears, isn't anything i can do or run somewhere to do the same thing. 因为,当我重新启动PC时,该错误消失了,这不是我能做的或在某处运行来做同样的事情的事情。 I need to find why the exe file goes to read-only for nothing and how to get it back to normal without having to restart my pc every time... 我需要找到为什么exe文件变为只读且无任何操作的方法,以及如何使它恢复到正常状态而不必每次都重新启动计算机...

Please help me! 请帮我! thank you 谢谢

I came across the same issue and it was related to having a command line argument that VS could not find, then when i clicked stop debugging I ended up in this situation as it seemed VS kept a process running. 我遇到了相同的问题,这与使用VS无法找到的命令行参数有关,然后当我单击“停止调试”时,由于出现了VS保持进程在运行的情况,我最终遇到了这种情况。

I could see this process in task manager but could not end it (it started with the same name as my app) I found closing VS would release this process. 我可以在任务管理器中看到此过程,但无法结束(它以与我的应用程序相同的名称开头),我发现关闭VS会释放此过程。

Restarting VS it would then work ok again. 重新启动VS,然后它将再次正常运行。

there may be other ways to reproduce the issue but restarting VS seems to release the file and allow you to continue. 可能还有其他方法可以重现该问题,但是重新启动VS似乎会释放该文件并允许您继续。

I set the exe properties to Read/write. 我将exe属性设置为“读/写”。 No effect, but when I set app properties/settings to "Always on top" = False the issue went away and is still away. 没有效果,但是当我将应用程序属性/设置设置为"Always on top" = False ,问题就消失了,并且仍然存在。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM