TFS - 构建自动化 InvokeProcess 问题
我在 TFS 中使用 InvokeProcess 步骤进行自动化构建设置。在此步骤中,我运行一个批处理 (*.bat) 文件,该文件在内部启动 IISExpress。
我的 TFS 构建正在运行,并且它正在启动 IISExpress,没有任何问题,但此构建不会进入下一步,它正在等待退出代码或批处理文件的响应。如何覆盖此功能,因为 TFS 构建不应等待批处理文件的结果,而应继续运行后续步骤。
我已将 InvokeProcess 的结果配置为从整数变量 ie1 获取,但它仍在等待发回某些结果。
我的批处理文件包含以下代码来启动 IISExpress
CD C:\Program Files\IIS Express iisexpress /config:C:\Users\ab\Documents\IISExpress\config\applicationhost.config /site:CloudWebRole
(CloudWebRole 是一个网站)
任何帮助将不胜感激。
谢谢,
普拉夫
I have automation build setup in TFS which is using InvokeProcess step. In this step, I am running a batch(*.bat) file which internally starts IISExpress.
My TFS build is running and it is starting IISExpress without any problem but this build is not going to the next step and it is waiting for the exit code or response from the batch file. How to override this functionalty as TFS build shouldn't wait for the result from the batch file and it should continue running the next steps.
I have configured the result of the InvokeProcess to take from an integer variable i.e.1 but still it is waiting for some result to be sent back.
My batch file consists the following code to start IISExpress
CD C:\Program Files\IIS Express
iisexpress /config:C:\Users\a.b\Documents\IISExpress\config\applicationhost.config /site:CloudWebRole
(CloudWebRole is a website)
Any help would be appreciated.
Thanks,
Prav
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
选项1:
您可以在批处理文件中使用以下命令。
需要注意的一件事是,它会弹出一个 iisexpress.exe 控制台窗口。
选项2:
如果不想看到弹出的控制台窗口,请编写一个简单的托管包装程序(例如 iisexpresswrapper.exe),该程序仅在后台使用给定参数启动 iisexpress.exe 并立即返回。
Option-1:
you can use following command in your batch file.
one thing to note is, it would popup a iisexpress.exe console window.
Option-2:
If don't want to see the popup console window, write a simple managed wrapper program (say iisexpresswrapper.exe) which just launches iisexpress.exe with the given arguments in the background and returns immediately.
好吧,我想你不再需要这个了,但我今天遇到了同样的问题并找到了解决方案:
像这样:
Well, I think that you didn't need this anymore, but I faced the same problem today and find a solution :
Like this :