I updated my Team Foundation Server 2012 Build Activities last week. If you’re trying to deploy or configure your application during a TFS automated build, you might find these helpful. When you add these activities to a customized TFS build process template, they’ll help you to do common activities for generating a release candidate and/or deploying your application.
I’ve added two new activities: one for performing an IIS Reset from the build, and also one for deploying the *.dacpac from a Visual Studio database project to SQL Server.
Activity | Description |
DeployDatabase | Deploys the *.dacpac that is generated by a Visual Studio SQL Server Database Project and deploys it using settings specified in a “Publish Database Profile” file (*.publish.xml) using an incremental update. |
IisCreateWebApplication | Creates an application in IIS and sets the app pool and security settings (Anonymous, Basic, NTLM) for the application.
Requires that the build agent process is an administrator on the IIS machine. |
IisDeleteWebApplication | Deletes a web application from IIS.
Requires that the build agent process is an administrator on the IIS machine. |
IisReset | Allows you to reset IIS.
Requires that the build agent process is an administrator on the IIS machine. |
MoveFile | Move or rename a file. This is helpful for dealing with environment specific configuration files. |
Sleep | Causes execution of the build to wait for specified number of milliseconds. |
TouchFIle | Modifies the last write time on a file without modifying the contents. Roughly the equivalent to the unix/linux ‘touch’ command. |
UpdateAspNetSessionState | Modifies the session state configuration values in web.config for an ASP.NET application. |
UpdateConnectionString | Modifies a database connection string in app.config or web.config. |
In addition to adding the new IisReset and DeployDatabase activites, I consolidated the activities and their supporting logic into a single assembly and I also refactored the build log messaging to be more consistent and clean.
Here’s the source code and the binaries.
Enjoy.
-Ben
— Want some help developing your automated builds? Trying to deploy your app with Lab Management and having trouble? Trying to deploy your app without Lab Management and having trouble? Want to learn how to create and customize TFS Automated builds and write your own build activities? Drop us a line at info@benday.com.
Leave a Reply