Click here to Skip to main content
15,884,917 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I'm clueless as what's going on here? I've read a few threads on this error but I'm not sure what to do! The only thing that I do notice is that my directory path is different in regards to caps. Can some please help me out here?
Posted
Comments
Mehdi Gholam 12-Nov-11 0:40am    
What program are you executing?

1 solution

The entry-point method of any application (in C# project, this is usually the method Main) can return integer value called exit code. It does not have any predefined meaning, but it's customary to return 0 to indicate "success", "not errors", anything else in all other cases which are totally application-dependent.

Any parent process of the process of your application can read this return value and do with at anything you want. Again, there is no special predefined meaning for this value, so it's up to you. In particular, the process running a batch file gets exit code used to branch batch file execution depending on the value returned. In .NET, you can start your application as as child process using System.Diagnostics.Process.Start and check up its exit code using the property System.Diagnostics.Process.ExitCode, see http://msdn.microsoft.com/en-us/library/system.diagnostics.process.aspx[^].

That's it. These day this feature is used rarely, especially on Windows. It used to be used for scripting, in particular, in some command-line build scripts, but with advent of MSBuild this approach to build it totally obsolete. In UNIX/Linux, using exit code is a bit more usual.

—SA
 
Share this answer
 
Comments
Praveen Kullu 12-Nov-11 1:00am    
Process.ExitCode Property

http://msdn.microsoft.com/en-us/library/system.diagnostics.process.exitcode.aspx
Sergey Alexandrovich Kryukov 12-Nov-11 1:44am    
Thank you for the note, but... I usually provide a link to the class. Anyway around 7 years old or more can click in a link to looks at the members, but providing a link to wider content than a separate member is more useful.
--SA
d.allen101 12-Nov-11 1:20am    
Hey SA,

I'd like to say thanks for teaching me about threading! EVERYTHING I've learned about thread I've basically learned from your articles and from you responding to my questions. But anyway, I'm not understanding how to resolve this error (exited with code 1).

I have an application which is a collection of classes that are referencing some .dll's and when I try to build the classes I get the error "exited with code 1".

I'm just an entry level dev with limited understanding of the internal workings of app dev.

Can you please give me a VERY simplified explanation of what's going on here and the solution?
Sergey Alexandrovich Kryukov 12-Nov-11 1:46am    
Donald,

Thank you for your good words.

I did not get it: are you saying it happens on build, not right after run-time of your application? What part of software shows this message, after which of your steps?
--SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900