Installing Visual Studio 2015 breaks 2010's functionality

224 Views Asked by At

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.

2

There are 2 best solutions below

0
On BEST ANSWER

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.

7
On

Based on some suggestions made here and some others, see if these little tricks solve the problem:

1) In AssemblyInfo.cs do you use the "*" (something like this):

[assembly: AssemblyVersion("1.0.*")]

It seems that this doesn't go down too well in Windows 7. Try explicitly defining the version.

[assembly: AssemblyVersion("1.0.0.0")]

2) Is Windows Indexing Services running? Try disable it and rebuild.

3) Close you vshost.exe, VS and anything related and delete your obj and bin folders manually. Then rebuild.

4) Start Visual Studio up as Administrator and try again.

5) See if restarting the Application Experience service helps

6) Project Properties -> Build Tab -> Change output path to something else, rebuild, then change output path back to bin/Debug/

7) Another crazy one, make sure that you close ALL your designer tabs and then rebuild.

Hope you come right, these type of errors aren't fun to figure out.