MSBuild and Web Application Projects

One of the benefits of moving to .NET 2.0 is having a clean build computer. A build computer is a machine where software can compile in an isolated environment, and away from the quirkiness of a machine in day-to-day use. The goal is to produce repeatable builds for test and production with no manual steps and a minimum amount of overhead. Since the .NET framework 2.0 installation includes MSBuild.exe (which can parse project and solution files, compile source code, and produce binaries), there is no need to install Visual Studio on a build machine.

Web Application Projects throw in a twist because they import a .targets file: Microsoft.WebApplication.targets. The Web Application Projects installation will copy this file to a machine, but I was hesitant to run the install on a build computer. The install assumes Visual Studio will be on the computer, because it asks to download a VS specific update.

The good news is that copying Microsoft.WebApplication.targets to the build computer works. The file lives in the Microsoft\v8.0\WebApplications sub directory of the MSBuild extensions path (typically “c:\Program Files\MSBuild”).

P.S. Yes, I know about Team Foundation Build, but the build scripts and framework I’ve been using for 5 years work so well, so I’m not compelled to switch.

posted on Tuesday, May 30, 2006 9:10 PM by scott

Comments

Tuesday, May 30, 2006 9:03 PM by Christopher Steen

# Link Listing - May 30, 2006

A Testing Mail Server For Unit Testing Email
Functionality [Via: haacked@gmail.com ]

ASP.NET 2.0...
Wednesday, May 31, 2006 5:36 AM by Damir Tomicic : ein Tag in der Community

# [Links] Testing Mail Server - MSBuild - Remote Desktop - Mobile Client Software

Wednesday, May 31, 2006 8:17 AM by Jason Haley

# Interesting Finds: May 31, 2006 AM edition

Friday, June 02, 2006 2:08 AM by ScottGu's Blog

# VS 2005 Web Application Projects, MSBuild, and Continuous Integrations

One thing that I thought would be worth spending a few minutes writing about is the built-in MSBuild...
Thursday, July 06, 2006 8:29 AM by Sriram

# re: MSBuild and Web Application Projects

Scott,

I am curious to know what are the guidelines/steps you went through for this building process and how did you manage your environment in terms of getting the latest files from VSS etc. Would appreciate if you can post a detailed article when your time permits.

Thanks in advance
sriram
Thursday, July 06, 2006 10:21 AM by Scott

# re: MSBuild and Web Application Projects

Sriran: I've thought about it many times. I started it all before Cruisecontrol and NANT came into fashion (which was even before MSBuild, etc), so I've been feeling obsolete. I might try to upgrade to newer tools first.
Tuesday, August 01, 2006 11:47 AM by ASP.NET Team Blogs

# VS 2005 Web Application Projects, MSBuild, and Continuous Integrations

One thing that I thought would be worth spending a few minutes writing about is the built-in MSBuild
Monday, October 23, 2006 10:33 PM by Scotty Wakefield

# re: MSBuild and Web Application Projects

Hi Scotty,

Just in case people are wanting to use Team Foundation Build, you still have to copy the .targets file anyway. So thanks for the info, it helped me get the Web App Project working on our Team Foundation Build Server.

Scotty.
Friday, December 15, 2006 7:02 AM by Joannes Vermorel

# re: MSBuild and Web Application Projects

Thanks for the tip. I am amazed that 6 months later, such a twist is still not fixed in the VS 2005 SP1 that has just been released.
Wednesday, July 04, 2007 4:56 PM by Plip's Weblog

# MSBuild CC.NET and Web Application Projects

I was having issues with CI and Web Application Projects, then I came across this entry: - http://odetocode
Thursday, July 19, 2007 6:52 PM by jokiz

# Web application projects and build server issues

Normally, you don't have Visual Studio installed in build servers. Unless you're using the setup
Friday, September 21, 2007 8:59 AM by Driebier.net

# Using MSBuild to deploy visual studio 2005 web applications

Using MSBuild to deploy visual studio 2005 web applications