问题
I have a Build definition with a Visual Studio Build task.
One of the projects has a Post Build Event command that use the macro $(DevEnvDir) but when TFS runs this task I get a compilation error because DevEnvDir is Undefined...
This doesn't happen when I build the solution through Visual Studio.
回答1:
You have to define the DevEnvDir environment variable on your build server or add it into variables for build definition. The same posts:
- Team Build does not understand DevEnvDir
- Windows 7 Winforms ActiveX DEP and TFS
Guidance to add variable: Set variables in pipeline
来源:https://stackoverflow.com/questions/55721390/tfs-visual-studio-build-task-doesnt-recognise-macro-devenvdir-during-post-build