Click here to Skip to main content
13,556,249 members
Rate this:
Please Sign up or sign in to vote.
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 11-Nov-11 18:37pm
Mehdi Gholam 12-Nov-11 0:40am
What program are you executing?

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

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[^].

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.

Praveen Kullu 12-Nov-11 1:00am
Process.ExitCode Property
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.
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?

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?

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

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy |
Web02 | 2.8.180515.1 | Last Updated 25 Oct 2014
Copyright © CodeProject, 1999-2018
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100