1
votes

I have just downloaded VS2015 Community and when I build my project I get the following two errors:

Error Could not copy "obj\Debug\Dictionary Form.exe" to "bin\Debug\Dictionary Form.exe". Exceeded retry count of 10. Failed.    Dictionary Form     

Error Unable to copy file "obj\Debug\Dictionary Form.exe" to "bin\Debug\Dictionary Form.exe". The process cannot access the file 'bin\Debug\Dictionary Form.exe' because it is being used by another process.   Dictionary Form     

Closing VS2015 doesn't fix the problem. I have to restart my computer. I know this issue is discussed with respect to other versions of Visual Studios but thought the issue would have been resolved by now by the visual studios team.

One side note. I have the professional version of VS2010 and just downloaded VS2015 community version. To open up my projects I often just double click on the solution file. When I ran into this problem the first time I shut down VS2015 and when I restarted it by clicking the solution file VS2010 opened up instead of 2015. I don't know if there is some conflict going on. I can build my project once before the error begins to occur.

1
I changed the properties of the .sln file so that it would open with VS2015 instead of VS2010. I don't know how these settings got changed. I also renamed the executable for the file. Don't know which one worked, but the project, for now, is building without error. I would still appreciate any comments from people who might know how to prevent this from happening again.JTZ

1 Answers

0
votes

It would appear that attempting to rebuild a GUI/WinForms project in VS2015 while the older version is still running causes the above error. Simple solution, make sure you close your WinForms before rebuilding and if you forget then close VS2015 and reopen. If after closing VS2015 you still get the same error, simply rename the executable file name in the Debug folder and then rebuild. You'll get a new executable file and then you can, if you want, delete the old one that you renamed.