It's a bit tricky:
- first, for cmd variables you need to use
%var%
syntax instead of msbuild-like$(var)
- next, SET statements from
call
batches do apply.. butif
body precalculates its variables, so you need severalif
lines instead of just oneif
body. Here is good explanation of such behavior and other ways to avoid it Weird scope issue in .bat file
So, this one should work:
if $(ConfigurationName) == Debug call "%VS100COMNTOOLS%VCVarsQueryRegistry.bat"
if $(ConfigurationName) == Debug call "%WindowsSdkDir%bin\signtool.exe" sign /f "$(ProjectDir)my.pfx" /p mypass /t timstamp.dll "$(TargetPath)"