Using Process Explorer I can see that a certain file is locked by "System, PID: 4". This blocks the VB.NET VS2012 IDE from recreating the file. I am getting the "Permission denied" error.
I have tried to disable just anything that might lock my file... Application compatibility, Backups, Windows Defender, Windows Indexer, just anything I could think of.
How could I find out which application "System, PID: 4" really is?
Thank you.
I found the answer here:
Windows 2008 R2 - Kernel (System Process PID=4) is locking files and folders
It is a Microsoft bug.
Enabling the Application Experience solved my problem. Not sure which program disabled it.
I just typed services.msc in the Windows start menu. Then I located the service "Application experience" and restarted it.