使用MSBuild/Web部署项目启动程序,而不等待它 [英] Starting a program with MSBuild/Web Deployment Project and not waiting for it

查看:83
本文介绍了使用MSBuild/Web部署项目启动程序,而不等待它的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在部署完成后,我希望资源管理器在某个文件夹中打开,并且我尝试使用以下工具进行尝试:

I would like explorer opened up on a certain folder, after the deployment has happened, and I'm using the following to attemp it:

<Target Name="AfterBuild">
  <Exec Command="..."></Exec>
</Target>

但是,一个简单的"explorer \ somewhere"会导致构建过程在explorer上阻塞,并且直到关闭explorer才完成.用start explorer \\somewhere前缀也不会改变它.

However, a simple "explorer \somewhere" causes the build process to block on explorer, and it wont finish until you close explorer. Prefixing it with start explorer \\somewhere doesn't change that either.

有没有简单的方法可以做到这一点?事实是,我们仅部署到中间阶段,并且希望手动完成最后一步,因此可以在相关文件夹上打开资源管理器.如果重要,Exec命令实际上会在Server 2008 Standard上使用VS.NET 2008调用BAT文件.

Is there a simple way to do this? Thing is that we only deploy to a intermediate stage, and want the last step done manually, and opening an explorer on the relevant folder is a nicety. The Exec command actually calls a BAT file if that matters, using VS.NET 2008, on Server 2008 Standard.

推荐答案

我最终要做的是拥有

<Exec Command="..." Timeout="2000"></Exec>

也就是说,从另一个Exec元素(然后是copy-element)启动Explorer,然后在该元素上添加一个稍微短的超时.这意味着VS启动资源管理器,并在2秒钟后返回.

That is, launch Explorer from a different Exec element then the copy-element, and then add a somewhat short timeout on this element. This means VS starts up Explorer, and after 2 seconds, returns.

这篇关于使用MSBuild/Web部署项目启动程序,而不等待它的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆