简体   繁体   中英

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.

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.

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.

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...

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.

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. 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...

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.

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.

Restarting VS it would then work ok again.

there may be other ways to reproduce the issue but restarting VS seems to release the file and allow you to continue.

I set the exe properties to Read/write. No effect, but when I set app properties/settings to "Always on top" = False the issue went away and is still away.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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