问题描述
我正在使用Web部署到远程服务器,通过该服务器我们只能通过Cisco VPN客户端进行连接.
I'm using web deploy to a remote server, through which we can only connect through a Cisco VPN client.
在我的TFS项目文件中,我有一个EXEC任务来打开客户端,然后关闭它.
In my TFS project file I have an EXEC task to open the client, then one to close it.
<Exec Command="start $(COMSPEC) /C "C:\Program Files (x86)\Cisco Systems\VPN Client\vpnclient.exe" connect profile user me pwd password" ContinueOnError="false" />
如果没有这些EXEC任务,并且如果我手动打开连接,则部署将正常进行.但是这些命令不是在构建中打开客户端,而是在打开客户端之前挂在此任务上.
Without these EXEC tasks and if I open the connection manually then the deployment works. But these commands aren't opening the client in the build, it just hangs on this task before opening the client.
如果我复制此任务并粘贴到标准构建文件中,然后从msbuild.exe调用该文件,则会打开客户端.
If I copy this task and paste into a standard build file and call that from msbuild.exe then the client is opened.
您知道为什么在调用构建时它在TFS项目中不起作用,但是可以在单独的构建文件中手动工作吗?
Do you know why it won't work in the TFS project when the build is called but it would work manually in a separate build file?
推荐答案
我无法解决这个问题.因此,我在XAML模板中使用了Invoke Process.效果很好.
I couldn't work this one out. So I used Invoke Process in the XAML template instead. Which has worked fine.
这篇关于msbuild TFS中的执行任务无法正确执行exe的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!