I have a batch file with this code:
@echo off
set VAR=7
echo the version is %VAR%
I want to add this .bat file to my visual studio project, using pre-build event.
I wrote in the pre build event the path to the batch file, but then when I enter the : Resources ->PreProcessor definitions – I can’t see the VAR
How can I add it?
any help would be appreciated!!
Change your BAT script to be something like
and then have your code use