How to run visual studio pre-build events in windows and mac?

Viewed 1227

I have a pre-build event as follows:

ver
if %errorlevel% EQU 0 (
   REM some code
) else (
   REM some code
)

When running this on a mac os machine, ver command throws an error. How can I make this code run on both mac and windows?

1 Answers
Related