简体   繁体   中英

TFS - Build Automation InvokeProcess issue

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 ie1 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\ab\Documents\IISExpress\config\applicationhost.config /site:CloudWebRole

(CloudWebRole is a website)

Any help would be appreciated.

Thanks,

Prav

Option-1: you can use following command in your batch file.

start iisexpress /config:C:\Users\a.b\Documents\IISExpress\config\applicationhost.config /site:CloudWebRole

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:

  1. Create a Parallel
  2. Create a variable on Parallel (BuildFinished, in the picture) and fill the CompletionCondition of the Parallel
  3. Assign True to BuildFinished in the build process' finally

Like this:

TFBUILD

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM