Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Post Build exited with code 1

I have a project with a post build event:

copy $(ProjectDir)DbVerse\Lunaverse.DbVerse.*.exe  $(TargetDir) 

It works fine every time on my machine. I have a new developer who always gets the "exited with code 1" error. I had her run the same command in a DOS prompt, and it worked fine. What could be causing this? Is there any way to get to the real error?

We are both using Visual Studio 2008.

like image 273
Tim Scott Avatar asked Nov 21 '08 20:11

Tim Scott


People also ask

What does exited with code 1 mean?

The "Exit Code 1" is simply a "Generic Exit Code" which means the job failed and this can be for any reason.

Has Code 1 been exited?

Exit Code 1 indicates that a container shut down, either because of an application failure or because the image pointed to an invalid file. In a Unix/Linux operating system, when an application terminates with Exit Code 1, the operating system ends the process using Signal 7, known as SIGHUP.

What is exited with code?

About. The exit code or exit status is a number returned by a process created by a command line indicating if there was an error or not. an other value means that there was an error.


2 Answers

She had a space in one of the folder names in her path, and no quotes around it.

like image 200
Tim Scott Avatar answered Sep 26 '22 07:09

Tim Scott


The one with the "Pings" helped me... but may be explained a little better...

For me the solution was to change:

copy $(TargetDir)$(TargetName).* $(SolutionDir)bin 

to this:

copy "$(TargetDir)$(TargetName).*" "$(SolutionDir)bin" 

Hope it works for you. :-)

like image 42
JanBorup Avatar answered Sep 26 '22 07:09

JanBorup