1

I am working with a solution containing several projects. There is one otherwise empty "Deploy" project that - in its post build step - does stuff via a small batch script. My issue is that this currently happens even if the build had errors.

I would like to pass an argument to my batch script that prevents any operation on errors. I was expecting something like an errorlevel macro, but could not find anything, neither by poking around or via google.

Any ideas?

EDIT

Using an custom event listening for build errors as suggested by fellow users @displayname and @dlatikay would be sufficient for me, but I'd prefer a solution that does not need to change anything to the IDE itself so it can be passed to other people/systems with less hassle.

antipattern
  • 743
  • 1
  • 9
  • 20
  • 1
    [Does that help](https://msdn.microsoft.com/en-us/library/aa833213(v=vs.100).aspx) ? – Stefan Falk Mar 31 '16 at 16:19
  • 1
    have a look at this: http://einaregilsson.com/stop-build-on-first-error-in-visual-studio-2010. then consider adding all other projects as a dependency to your deploy projects, so that you can be sure it is last in build order. – Cee McSharpface Mar 31 '16 at 16:22
  • @dkatikay, that does seem to be a workaround... gonna try it. – antipattern Mar 31 '16 at 16:43
  • Any reason why your batch file can't interrogate the build log file to determine if there were any errors? – rrirower Apr 01 '16 at 16:37

0 Answers0