2

When a post-build event fails in Visual Studio 2010, you get the entire post-build batch file displayed in the error. Is there any way to hide that and show a cleaner error message instead?

I found this article to suppress the original error, but I still need the build to fail - just with a clean message.

anjunatl
  • 1,027
  • 2
  • 11
  • 24

1 Answers1

3

Just use @echo command to output the information you need.

Tigran
  • 61,654
  • 8
  • 86
  • 123
  • Yep. Already had tried that and just didn't see it since the Error window popped up, not the Output window. Derpderp. Thanks anyway! – anjunatl Aug 24 '11 at 19:40
  • @anjunatl I mean using of echo for output. For example you copy the file and make echo "Coping file to location X". After it, let's say your postbuild fails. Go to VS Output window and look last message printed there, if this is "Coping file to location X", means that the command immediately after that failed somehow. – Tigran Aug 24 '11 at 19:43