Reputation: 2987
From time to time I receive this error message when I'm debugging my Console Application:
The process cannot access the file 'bin\Release...' because it is being used by another process. Exceeded retry count of 10. Failed.
The fact is that it's not running and Visual Studio keeps showing this message, and so I have to restart it and build it again.
The process is NOT running, so there is no reason to receive this error.
Does anyone know why this is happening?
Upvotes: 1
Views: 1252
Reputation: 468
What version of Visual Studio? You tagged it as VS 2013, correct?
Did you look at the following threads at Microsoft? Many complaining about similar issue.
https://connect.microsoft.com/VisualStudio/feedback/details/533411 http://connect.microsoft.com/VisualStudio/feedback/details/811846/visual-sudio-cant-complie http://connect.microsoft.com/VisualStudio/feedback/details/647826
Upvotes: 1
Reputation: 165
I had a similar issue in the last couple of days. The reason this happened to me is because I was testing a Windows Service I created. When I forgot to stop the service, and tried to build, I got this error.
Follow the suggestions in the other posts. As well, you may want to download Process Explorer from Microsoft - It might give you additional insight and allow you to kill any linger process.
Upvotes: 1
Reputation: 3861
Here is my Google search.
Upvotes: 4
Reputation: 1066
I'm not sure why you are debugging the release build?
When this happens, it usually is due to being opened i.e. the console window that has ran the app is still open, or it is still in the process of closing.
However, again I feel it's due to debugging a release built application.
Upvotes: 1
Reputation: 1952
If the process is not running, I suppose Visual studio is the process that uses bin\Release.
If you want to know exactly what the problem is, delete everything in the folder (if possible), the file that will not be deleted will be the one that is used by Visual Studio, this will already be a good indicator.
Upvotes: 1