Stop on first error

  • Thread starter Thread starter Jibesh
  • Start date Start date
J

Jibesh

Pete,

Have you tried using PreBuild-Post Build events ? I haven;t tried yet.

Try using/customising those events.

Thanks
Jibesh
 
Is there a way to get VS to stop building my solution on the first error it
encounters?
 
Is there a way to get VS to stop building my solution on the first error it
encounters?

Hi,

I'm not sure, but IMHO it's better not to, you may get the explanation
of the error in subsequent errors. IIRC when you call a method with
incorrect parameters you get two errors, the first saying than an
overload was not found and the second error says which parameter could
not be converted.
 
Say I have a solution with 10 projects in. Why would I want the subsequent
9 to fail building when the first one fails? I don't want to see 100
errors, I want to fix the first one. Fixing the first often fixes the
subsequent 99 anyway so I don't feel I am benefiting from the other errors.


Pete
 
Is there a way to get VS to stop building my solution on the first error it
encounters?

I've worked around this issue using a combination of the following 3
options:
1. "Cancel Build" becomes an option in your build menu when the build
starts (Ctrl-C does a similar thing)
2. You could build individual projects working your way up the proj.
dependency hierarchy.
3. You can exclude certain projects from your build altogether. For
example, one of the solutions I work on has about 20 projects, one of
which is a website project with 10s of web pages/user controls. It
used to take forever for the webproject to build. Most of the time
it's not needed to build the entire website - the framework builds
individual pages "on demand", so we excluded the entire project from
the build order.
 
Say I have a solution with 10 projects in. Why would I want the subsequent
9 to fail building when the first one fails? I don't want to see 100
errors, I want to fix the first one. Fixing the first often fixes the
subsequent 99 anyway so I don't feel I am benefiting from the other errors.

Pete

Hi,

We have a solution with 56 projects :)
must of the time when the error is in one of the lower layer projects
you get all the errors in that project and in the other projects you
get at the most that the required dll was not found.
IMHO it's better to just see all the errors, you might have more than
one issue that you can fix at the same time.
 
But for 1 error I get 20 reports. It's like I'm back in the 80's compiling
COBOL apps from the command line :-)
 
Back
Top