Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C#
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
Comments
Mehdi Gholam at 12-Nov-11 0:40am
   
What program are you executing?

1 solution

Rate this: bad
good
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 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
  Permalink  
Comments
Praveen Kullu at 12-Nov-11 1:00am
   
Process.ExitCode Property
 
http://msdn.microsoft.com/en-us/library/system.diagnostics.process.exitcode.aspx
SAKryukov at 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
Donald Allen at 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?
SAKryukov at 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)

  Print Answers RSS
0 Sergey Alexandrovich Kryukov 853
1 OriginalGriff 410
2 CPallini 275
3 George Jonsson 166
4 Richard Deeming 145
0 OriginalGriff 5,450
1 CPallini 4,500
2 Sergey Alexandrovich Kryukov 4,482
3 George Jonsson 3,057
4 Gihan Liyanage 2,445


Advertise | Privacy | Mobile
Web04 | 2.8.140916.1 | Last Updated 12 Nov 2011
Copyright © CodeProject, 1999-2014
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