Visual studio locked the files some time due to some reason. And you will get this error in your project.
Could not copy "obj\Debug\<Project name>.dll" to "bin\<project name>.dll". Exceeded retry count of 10. Failed. <Project name>
Unable to copy from obj\debug to bin\debug
To get rid of this problem a simple solution I found and sharing here to run the project without error.
Go to Solutions Explorer, select the project and right click on it. Go to properties option. Here you will find the Build Events.
On the Build Event there will be a space for Pre-build event command line. Go to that one and paste the following code..
Save it and run your project. Save some ones day..Share it...
Could not copy "obj\Debug\<Project name>.dll" to "bin\<project name>.dll". Exceeded retry count of 10. Failed. <Project name>
Unable to copy from obj\debug to bin\debug
To get rid of this problem a simple solution I found and sharing here to run the project without error.
Go to Solutions Explorer, select the project and right click on it. Go to properties option. Here you will find the Build Events.
On the Build Event there will be a space for Pre-build event command line. Go to that one and paste the following code..
if exist "$(TargetPath).locked" del "$(TargetPath).locked"if not exist "$(TargetPath).locked" move "$(TargetPath)" "$(TargetPath).locked"
Save it and run your project. Save some ones day..Share it...
Hi!
ReplyDeleteYou wrote this on 2014 and to me worked on 2019...
Thanks!