0

This is somewhat similar to the question asked here.

Issue in VS 2019 build with editbin.exe location

I have a post build task in my project like this:

call "%VS160COMNTOOLS%VsDevCmd.bat"
gacutil.exe /f /silent /i "$(TargetDir)$(TargetFileName)

Visual Studio upon building, is unable to resolve the macro, %VS160COMNTOOLS% - it resolves to an empty string with the following output:

'"VsDevCmd.bat"' is not recognized as an internal or external command, operable program or batch file.

'gacutil.exe' is not recognized as an internal or external command, operable program or batch file.

Why is this and how do we make Visual Studio recognize the macro? The same macro resolves correctly in VS2019 command prompt. Why is this?

Output from command prompt

FMFF
  • 1,652
  • 4
  • 32
  • 62
  • It is not a macro, it is an environment variable. Set by vsdevcmd.bat, so basic chicken-and-egg. Look [here](https://stackoverflow.com/a/42809603/17034). – Hans Passant Apr 05 '22 at 22:27

0 Answers0