Search code examples
tfsbuild

Deploy a Self Hosted WCF Service with TFS 2010 Build?


I have a console app that runs a self hosted WCF Data Service.

I have it auto building just fine. But now I want to take the latest build and move it to my Dev Machine and run it.

Something like this:

  1. Run the Build
  2. Kill the existing running exe (if it is running)
  3. Copy the new files over the old ones
  4. Run the new exe.

Is this something I am going to have to put together by hand? Are there tasks that are already done that may help with this?

Any suggestions would be helpful!


Solution

  • Just sounds like you need a regular batch file called as a post-build step that:

    1. kills the running WCF host (using pskill for example)
    2. Copies the new file to the destination location using (X)Copy
    3. Start the new exe using the Start command

    If to be performed on a build server, make sure you have a workflow activity inserted after the build step that allows you to start such a batch file (like the InvokeProcess activity)

    Or am I overseeeing some complexity here?