Is there a way to convert something like this:
#define ERROR_LOG_LEVEL 5
Into something that msbuild via command line will pass to its projects?
msbuild.exe {???}ERROR_LOG_LEVEL=5 target
I’ve read the responses to similar questions, and it looks like the answer is no, just want to double-check in case some genius has found a workaround.
Macros may be defined by passing the
/Doption to the compiler. You can specify the/Doption from MSBuild using theAdditionalOptionsofClCompile:If you want to be able to pass the value for the macro via a call to msbuild.exe, you can easily do that too:
with msbuild.exe invoked as: