MSBuild Task for deploying a WebSite

By | 2006-01-17

In the MSBuild Tasks there is a Task for Copy-ing a File or a Collection of Files ( ItemGroup ). But as it turns out the Exclude filtering of the ItemGroup is too limited to have a good deployment of a WebSite/WebApplication.

The guys of Microsoft UK have made a distribution available of the Microsoft.Sdc.Tasks ( see GotDotNet ) but their Folder.Copy lacks any Exclude filtering.

That’s why I created our own CopyFolder. The Exclude filter can be used in 2 ways:

  • .extention -> any file with that extention will be excluded from the copy
  • SomeString -> any file where the filename (with relative path) contains SomeString will be excluded

Binaries: (4,63 KB)

MSBuild project file:

<Project DefaultTargets="Full" xmlns="">

<Import Project="TamTam.Deployment.Tasks" />






<Target Name="Full" DependsOnTargets="

WebSite" />

<Target Name="WebSite">

<Message Text="Deploying WebSite" />

Exclude="$(WebExcludes)" />



Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.