Search code examples
vb.netvisual-studio-2012file-permissions

VS2012 Compiler randomly tells that output file can't be written


I am compiling a bigger VB.NET project using VS2012.

Randomly, but very often after having run my project in Debug Mode, I get the error

"The output file <mypathhere> could not be written. Permission denied."

I have also tried using MSBUILD to give me more details about this error, but it didn't help. Also, I have tried disabling the Hosting option because I thought that this might be the cause, but it wasn't.

I used ProcessExplorer to find out which process might have locked my file, but it didn't show anything.

Does anybody have any more ideas?

When I try to set the application's output folder to not-writeprotected using the Windows properties dialog, I get the "Changing attributes denied. Permission denied." error on the output file.


Solution

  • The solution is to activate the Application Experience service in Windows. This is a known MS bug.