Take the 2-minute tour ×

I'm setting up TeamCity as my build server.

I have my project set up, it is updating correctly from subversion, and building ok.

So what's next?

Ideally, I'd like to have it auto deploy to a test server, with a manual deploy to a live/staging server.

What's the best way to go about this?

Since I am using C#/ASP.Net, should I add a Web Deployment project to my solution?

share|improve this question
Have you seen Inedo's BuildMaster? A common workflow I see is to have build artifacts pulled out of TeamCity, and deployed/configured with BuildMaster to various servers. Quick reference article: inedo.com/support/kb/1031/… (disclaimer: I work for Inedo) –  Karl Harnagy Jun 7 '13 at 20:22
I made a similar recommendation before, but I do not work for Inedo. It's worth looking at. –  Damon Nov 26 '13 at 16:47

5 Answers 5

up vote 47 down vote accepted

This article explains how to call Microsoft's WebDeploy tool from TeamCity to deploy a web application to a remote web server. I've been using it to deploy to a test web server and run selenium tests on check-in.


  1. Install WebDeploy
  2. Enable Web config transforms
  3. Configure TeamCity BuildRunner
  4. Configure TeamCity Build Dependencies

The MSBuild arguments that worked for my application were:

share|improve this answer
++ Very cool, thanks –  Neil N Nov 11 '10 at 16:49
how do i set email notification once the deployment complete? –  user384080 Nov 29 '13 at 5:32

I've written a pretty long blog post on this very topic that may interest you:



  • install web deployment projects
  • add web deployment project to your solution
  • setup the solution configuration manager to have a "Deployment" build configuration
  • get team city to use this build switch when running the build
  • have a beer and wonder in glory at your automagical awesomenesss
share|improve this answer

Typically what I do is to create a Wix installer. A Wix project can be build with MsBuild so you should have no problems there.

Also I would recommend looking at the following MsBuild extensions for the automated deployment:


I hope this helps.

share|improve this answer

We are using Octopus Deploy to manage our environments on top of Team city.

As a Build Process we have a Octopus Release and Octopus Deploy Creating a Release in Octupus which is then also automatically Deployed;

Since Octopus is managing our Environments it also provided variables which we use extensively and can use the same build to create a new environment all together.

share|improve this answer

Please also consider a Deployer plugin from one of the TeamCity developers: http://confluence.jetbrains.com/display/TW/Deployer+plugin

share|improve this answer

Your Answer


