Web Application Projects in Team System
While investigating a problem we were having internally with web application solutions in Visual Studio 2005 and Team Build server, I came upon the Web Application Project type for Visual Studio 2005. Wow, wish I found out about this one sooner and it was actually part of Visual Studio 2005! The new built in web application project in Visual Studio 2005 is ok, but it sure has a lot of quirkiness that makes it more troublesome than beneficial in my experience.
After playing around with the new Web Application Project (WAP from now on.. no not that WAP!) for a while, I discovered a couple of tips that might help others out there.
What's nice about having a WAP type is everything works just like VS2003 again. You know exactly where your project settings are saved and you don't have to go through any special menu options. For example, the original way of enabling code analysis for web applications was through the Website menu option. Totally unintuitive. Now with a WAP, it's through the traditional Project Properties dialog. Much better!

Another awkwardness with the original web application type is being forced to checkin files into your source control just because those files are in the same directory as your web app. The WAP type finally fixes this problem since it now knows exactly which files are part of your project and which are not.
Thankfully, the best benefit of VS2005 web application projects carry over to the WAP type in that you don't need to use IIS for debugging. You can still use the webdev server!
So back to the original problem of web applications and Team Build. One of the reasons why we found out about WAP is the explicit support for Team Build. In fact it's the first bullet point!
After messing around with my test project, I found that it indeed does support Team Build, but not out of the box. Issue 6 in the Web Application Project FAQ mentions that the build server needs a copy of the WebApplications build target in order to support the build. Otherwise the build will fail with a
The imported project "H:\Program Files\MSBuild\Microsoft\VisualStudio\v8.0\WebApplications\Microsoft.WebApplication.targets" was not found.
error message. Just copy your local C:\Program Files\MSBuild\Microsoft\VisualStudio\v8.0\WebApplications folder to the build computer (in the same location) which should fix this problem.

What gets built is the single DLL of your web application and also a release build of your entire website in the traditional VS2003 format: ASPX files, DLL files, and any other files you want included. If you would like a VS2005-like web application build (ie. not updatable, precompiled), then you will need to also use the Web Deployment Project.

Here's some other links/resources to read up on to learn more about Web Application Projects in Visual Studio 2005: