在 TFS 15RC1 构建服务器中使用 devenv.exe 构建项目 [英] Build project using devenv.exe in TFS 15RC1 Build Server
问题描述
我在理解如何使用来自 TFS Build Server 的 devenv.exe 时遇到问题.
I have a trouble with understanding how to use devenv.exe from TFS Build Server.
没有使用devenv的默认步骤,所以我尝试使用PowerShell sсript来执行带有参数的devenv.exe.构建过程中没有错误,但我看到构建结果文件没有更新.如果我在代理机器上手动执行脚本,构建成功通过.这是我的脚本:
There is no default step to use devenv, so I tried to use PowerShell sсript to execute devenv.exe with parameters. There are no errors in build process but I see that build result files are not updated. If I execute the script manually on a agent-machine, the build passes successfully. That is my script:
$process = [System.Diagnostics.Process]::Start( "C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\devenv.exe", "/Rebuild ""MyConfig"" ""C:\agent\agent\_work\1\s\MyProject.sln"" /Project ""C:\agent\agent\_work\1\s\MyProject\MyProject.dwproj""")
$process.WaitForExit()
正如您现在看到的,我不为源路径使用变量,但如果脚本可以工作,我会使用它.
As you see now I do not use variables for source paths, but I will use it if script will work.
我还不得不说我找不到任何有错误的日志.也许我不知道在哪里可以找到它们?
I also have to say that I could not find any logs with errors. Maybe I do not know where to find them?
所以,
- 我在 powershell 脚本中做错了什么?
- 在 TFS 构建服务器中使用 devenv.exe 构建项目的最佳实践是什么?
PS 我们使用的是 TFS 15 RC1(版本 15.103.25603.0).
PS We are using TFS 15 RC1 (Version 15.103.25603.0).
推荐答案
我发现只有当代理作为服务运行时它才起作用.当我以交互模式启动代理时,我的任务开始正常工作.为什么?- 我不知道.
I found that it doesn't work only when the agent is running as a service. When I started the agent in the interactive mode, my tasks started to work correctly. Why? - I don't know.
这篇关于在 TFS 15RC1 构建服务器中使用 devenv.exe 构建项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!