开发者

Exec task in msbuild TFS won't execute exe properly

I'm using web deploy to a remote server, through which we can only connect through a Cisco VPN client.

In my TFS project file I have an EXEC task to open the client, then one to close it.

<Exec Command="start $(COMSPEC) /C &quot;C:\Program Files (x86)\Cisco Systems\VPN Client\vpnclient.exe&quot; connect profile user me pwd password" ContinueOnError="false" />

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.

If I copy this task and paste into a standard build file and call that from msbuild.exe then the client开发者_开发技巧 is opened.

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?


For kicks I would try using the full path to comspec: "C:\Windows\system32\cmd.exe" or whatever path for the OS you are using in the off-chance it is resolving incorrectly.

Also, can you toss in a /k to keep the cmd prompt open and see what, if any, errors show assuming it launches correctly?


I couldn't work this one out. So I used Invoke Process in the XAML template instead. Which has worked fine.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜