Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Post Build Event Exited with Code 1

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.

like image 547
Daniel Eugen Avatar asked Jul 23 '14 20:07

Daniel Eugen


2 Answers

Instead of

xcopy $(TargetDir)*.dll $(TargetDir)lib\

you should use

xcopy "$(TargetDir)*.dll" "$(TargetDir)lib\"

to handle spaces in the path.

like image 129
Reg Edit Avatar answered Oct 08 '22 23:10

Reg Edit


Try open VS with Run as Administrator -> open project -> build.

like image 35
D T Avatar answered Oct 09 '22 00:10

D T