This isn't the first time I've had this problem. Unfortunately, I guess I didn't learn my lesson the first time. I was assuming it was another issue. I'm on a fresh install of Windows 7 Enterprise.
I installed 2010 and SP1. Everything was fine. I was working for a full week without a single issue.
I installed 2015. 2015 works fine, but 2010 is failing to clean-build projects...
Error 11 Could not copy "obj\Release\App.exe" to "bin\Release\App.exe". Exceeded retry count of 10. Failed. App
Error 12 Unable to copy file "obj\Release\App.exe" to "bin\Release\App.exe". The process cannot access the file 'bin\Release\App.exe' because it is being used by another process. App
It's even giving me this error, simply by trying to run Clean Solution
:
Warning 1 Unable to delete file "C:\Source 2010\App\bin\Release\App.exe". Access to the path 'C:\Source 2010\Mimic\bin\Release\App.exe' is denied. App
There is no permissions issue (I'm the administrator). There is no anti-virus program that's somehow affecting only 2010. I even tried running 2010 with admin rights, no difference. Deleting the bin folder doens't work either, as it won't let me when 2010 is running (when I'm having this problem).
Another oddity is that it WILL sometimes work by restarting 2010. Unfortunately, however, breakpoints fail to work: No symbols have been loaded for this document.
This is most definitely a problem with 2015's installation, possibly with just 4.6 itself.
Any ideas on what's going on? I'm dying here. I've been dealing with this for weeks and at my wit's end.
Figured it out and so far, so good, thanks completely to Hans Passant (see OP comments).
I change my Solution Configuration to Debug from Release, went into Project Settings -> Debug, and then unchecked the "Enabled Visual Studio hosting process" option. It gave a warning when I tried to rebuild, but it built just fine. Breakpoints were working. I even tried to Clean Solution and it worked. Restarted VS2010, changed back to Release mode, all is still well.
I also went back into the Debug options and re-enabled the option, and everything is still working.
The act of changing that option seems to have corrected the issue.
I want to reiterate for anyone else that might experience this problem: it happened twice in a row on two completely fresh Windows 7 Enterprise installs, breaking 2010 (with SP1) the second 2015 was done installing, pre and post reboot.