I am trying to clean up the release folder using Post Build event so i delete .xml
and .pdb
files and try to copy all dll files into custom lib folder bug i get Post Build Exited with Code 1
My code:
if $(ConfigurationName) == Release del "$(TargetDir)*.xml", "$(TargetDir)*.pdb"
if $(ConfigurationName) == Release xcopy "$(TargetDir)\*.dll" "$(TargetDir)\lib\"
The 2 commands are separated by new line as shown... Also Lib folder exists.
Instead of
xcopy $(TargetDir)*.dll $(TargetDir)lib\
you should use
xcopy "$(TargetDir)*.dll" "$(TargetDir)lib\"
to handle spaces in the path.
Try open VS with Run as Administrator -> open project -> build.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With