0

Is there any way to create a warning message if any Pre-build or Post-build event exists in project, so that another programmer takes into account the external operations while compiling the project.

leppie
  • 115,091
  • 17
  • 196
  • 297
CuriousPen
  • 249
  • 1
  • 8
  • What do you mean with "take into account"? – stijn May 26 '14 at 09:15
  • @stijn I mean to warn another programmer about the external operations (Running batch file, copy files etc.) which exists in Pre-build or Post-build events, without looking at Build Options of IDE. – CuriousPen May 26 '14 at 09:19
  • Just put `echo "Warning! Doing something unusual here!!"` in your build event. – Hans Passant May 26 '14 at 10:20

1 Answers1

0

Warning: this may sound daft.

In your pre-build event check for the existence of a file in your source tree on disk. This file should not be in source control. If the file doesn't exist, pop up a message and either write the file automatically, or prompt your user to do so. If the file exists, do nothing or continue the normal pre-build. This way, new users get the message at least once.

You could use msg to popup a message to the user: https://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/ts_cmd_msg.mspx?mfr=true

.. or powershell .. or vbscript

stombeur
  • 2,704
  • 22
  • 45