本文介绍了TFS Visual Studio生成任务在生成后事件期间无法识别宏DevEnvDir的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个带有Visual Studio Build任务的Build定义.
I have a Build definition with a Visual Studio Build task.
其中一个项目有一个使用宏$(DevEnvDir)的Post Build Event命令,但是当TFS运行此任务时,我收到一个编译错误,因为DevEnvDir是 Undefined ...
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...
当我通过Visual Studio构建解决方案时,不会发生这种情况.
This doesn't happen when I build the solution through Visual Studio.
推荐答案
您必须在构建服务器上定义DevEnvDir环境变量,或将其添加到用于构建定义的变量中.相同的帖子:
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
添加变量的指导:在管道中设置变量
这篇关于TFS Visual Studio生成任务在生成后事件期间无法识别宏DevEnvDir的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!