Sheetal Garg

Sheetal Garg

  • NA
  • 151
  • 10.9k

could not copy the files of window services to bin folder.

Aug 9 2019 1:43 AM
"Error Unable to copy file "obj\Debug\WindowsService1.pdb" to "bin\Debug\WindowsService1.pdb". The process cannot access the file 'bin\Debug\WindowsService1.pdb' because it is being used by another process. WindowsService1"
 
for this error i add the one solution in pre-build:
 
if exist "$(TargetPath).locked" del "$(TargetPath).locked"
if exist "$(TargetPath)" if not exist "$(TargetPath).locked" move "$(TargetPath)" "$(TargetPath).locked"
 
but again getting the same error
thanks in advance.

Answers (5)