In this article I will try to explain how to do automated web deployment using web deploy (MsDeploy) and team build using Team Foundation Server 2013.
Getting StartedFirst of all you need to install Team Foundation Server 2013 and setup your project. And open your project from TFS.
Image1.Now select your project from the list. Image2.Connect project Image3.After connecting the project to TFS click on the Builds tab and click on New Build Definition. Image4.From here our main work starts. Enter the build definition name and description (optional) in the General tab setting. Queue processing should be enabled by default. Image5.Now select the trigger setting from the trigger tab. Image6.Let's explain these triggers a little bit.
Now select the source settings and select your project from the listing. Image7.Now select the Build Defaults tab and check the build controller name and description. Image8.Next you need to configure the process tab and browse your project solutions file in the projects property. Image9.The next tab shows the retention policy that indicates your build status. Image10.Click save now. Here we are done with the settings. Now let's move to build now. As you can see there is one build definition that has been created. Image11.Right-click on the build definition and click Queue New Build. Image12.Click Queue button. Image13.You can see two things in my build, one build has been started and the other one has not succeeded before. Now let's wait to complete the build. Image14.The Green arrow indicates that the build has been successful.Deployment SettingNow let's do the final settings for deployment, you need to return to the Process (Image9) tab from edit build definition and put build arguments like this: Image15.
Property /p:IncrementalBuild=true/p:DeployOnBuild=True/p:SkipExtraFilesOnServer=True /p:DeployTarget=MsDeployPublish/p:CreatePackageOnPublish=True /p:MSDeployPublishMethod=WMSVC /p:MSDeployServiceUrl=localhost /p:DeployIisAppPath="Default Web Site/testdeploy" /p:UserName=domain\user/p:Password=myPassword/p:IncrementalBuild=true // indicates incremental build/p:DeployOnBuild=True // This property tell the Web Publishing Pipeline (WPP) to engage after the build is successful./p:SkipExtraFilesOnServer=True // doesn't delete extra files on server/p:DeployTarget=MsDeployPublish // Microsoft deploy target/p:CreatePackageOnPublish=True // Creates package when publish if true/p:MSDeployPublishMethod=WMSVC // publish method name WMVC or InProc/p:MSDeployServiceUrl=localhost // service URL/p:DeployIisAppPath="Default Web Site/testdeploy" // target virtual directory name/p:UserName=domain\user // domain user name/p:Password=myPassword // domain password
Now again queue new build and wait for complete. Image16.Once it's complete with a Green arrow go to your deployment location, you can see all the files have been deployed there.
A Guide to Mastering HTML5 CSS3 and JavaScript