P:Password=%destination-server-password% P:MsDeployServiceUrl= /P:AllowUntrustedCertificate=True In that case, add a new build step with runner type “Command line” and in Custom script field type iisreset Command line parameter explanation /P:Configuration=%environment-name% /P:DeployOnBuild=True In the case of the more complex build system, you probably have some build steps before and after the main “deployment” step, for example, I have iisreset step because sometimes the logging system does not allow to republish applications when the IIS process is running. TeamCity supports a number of build runners, but I prefer to use MSBuild The next step will be to add a “build step”. In my case, the authentication method is Anonymous, because I used GitHub public repository, but in case if you use Bitbucket or SVN you can provide a username/password or upload a Private key.ĭo not forget to press the “Test Connection” button before saving your source control configuration. I prefer Git, but it does not matter, you can use Subversion or TFS, or different providers which Teamcity support. Now you need to add your source control system Give a name to build configuration and go to Source control settings by clicking the “VCS settings” button On the next screen, you need to add a new build configuration Give Project a name and press the “Create” button
#TEAMCITY DEPLOYMENT INSTALL#
net version for the application pool is 4.0 as well TeamCity projectĪfter you install Teamcity you have to create a new project.
#TEAMCITY DEPLOYMENT SOFTWARE#
The easiest way to install all required software is to use Web Platform Installer There are some requirements for the webserver as well: you have to install the following software on the webserver in order for Web Deploy to work properly. The web edition of Visual studio is less than 100 Mbīut in case if you don’t want to install the visual studio, you can just copy the content of WebApplications folder from your local machine (I am sure you have the Visual Studio installed on your machine, so the folder will be there) to build server.
You can install Visual Studio Express using Web Platform Installer.
Confirm that the path in the declaration is correct and that the file exists on disk. You have to install Visual Studio Express for Web on the build server, otherwise, you will get the following error message:Įrror MSB4019: The imported project “C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\ v11.0\WebApplications\ ” was not found. NET Framework 4 (this is only in case you building application targeting. Microsoft Web Platform Installer (it will be used to install all dependencies).In my case, I used TeamCity 8.0.2 installed on Windows Server 2008R2 (but it does not matter, it works on Windows 8 and Windows Server 2012 the same way)Īlso, your build server requires the following software installed, in order to perform deployment using Web Deploy
I assume you already have TeamCity installed on your build server, but if you don’t have it, you can get the latest version from JetBrains. The application which needs to be deployed is an ASP.NET MVC 4 application, but it does not matter, it can be any web application (ASP.NET, ASP.NET MVC, HTML app).
#TEAMCITY DEPLOYMENT HOW TO#
The blog post will explain how to create a build system and deploy application code to different environments, such as DEV, UAT, PROD… using TeamCity and MSDeploy.