Using MSBuild to deploy website files

by fred on November 30, 2006

in Code

After reading several blogs and searching the net for examples, I finally finished our team build script. Some things to note about the tasks inside the build engine.

The delete task will not delete directories. The exclude path must be absolute.

$(SolutionRoot)\Projects\MyProject\branch_name

MyProject.sln

$(ProjectLocalPath)\MyProject.Web \\Server\share_name\_DeployFiles\branch_name

In order for this to work, the domain user that the Team Foundation Service runs under must have permissions to write and delete files and folders on the web server’s unc share.

Also you will need the MSBuild Tasks (http://msbuildtasks.tigris.org) to use the tasks. The files and zip are written to a _DeployFiles folder so they can be inspected and then copied to the server. This way we could control how, when, and who deploys the files.

Related posts:

  1. The Secrets to Uploading Files with Ease In the golden, olden days of ASP, managing a file upload was pretty difficult. Most developers reverted to digging deep...
  2. How To Add A 5-Day Forecast To Your Website An article that demostrates the use of the National Weather Service’s Experimental National Digital Forecast Database XML Web Service...
  3. Your free search engine – Microsoft Indexing Server Many web applications provide a search capability, which allows users to search all the content of a web application. This...
  4. Determining the size dimensions of uploaded images in ASP.NET This article how to describes how to determine the width and height of an image after it has been uploaded...
  5. How to Create a Default ‘Enter’ Button! This is one of those little code snippets you can pull your hair out trying to find. And no help...

Previous post:

Next post: