This modification worked for me:
del *.XML, *.pdb xcopy /y "$(TargetDir)*.dll" "$(TargetDir)lib\"
1). Omit directory target variable in del command
2) ./ y in xcopy Note from the Microsoft help page: / y: Suppresses the confirmation message that you want to overwrite the existing destination file.
Jsinh source share