This documentation is archived and is not being maintained.

How to: Configure ASP.NET Projects with Team Foundation Build

Visual Studio 2005

ASP.NET projects are quite different from the usual managed applications and therefore their build process is slightly departed from the usual build process. This topic explains how to configure Team Foundation Build to build ASP.NET projects.

Required Permissions

To perform this procedure, you must have the Administer a build security permission set to Allow. For more information, see Team Foundation Server Permissions.

Configuring Team Foundation Build for ASP.NET Projects

When you create ASP.NET projects, the default folder for the .sln file is:

  • <root>:\Documents and Settings\user name\My Documents\Visual Studio 2005\Projects\WebSiteName.

The default path for source code is:

  • <root>:\Documents and Settings\username\My Documents\Visual Studio 2005\Websites\WebSiteName.

When you check ASP.NET projects Team Foundation source control, the default folder structure is:

  • $/TeamProject1/Web Project .sln file

  • $/TeamProject1/WebProjectName/Web Solution pages and code

Because the Team Foundation source control folder structure does not match the structure in the Visual Studio integrated development environment (IDE), you must point the ASP.NET solution file to the correct locations for the project sources in Team Foundation source control. However, after you reload the solution file in the Visual Studio IDE, the ASP.NET project sources are no longer locatable on your client.

The procedures below offer instructions for solving this problem by creating a virtual directory on the Team Foundation Build server. This allows the files to be synchronized on the build machine as well as on the Visual Studio IDE client.

To manually configure Team Foundation Build for ASP.NET projects

  1. Before you create a ASP.NET project, create a blank solution file named MyWebFiles in a location <root>:\MyProject on your Visual Studio client.

  2. Right-click the blank MyWebFiles solution in Solution Explorer and point to Add and then New Web Site. Create the new Web project in <root>:\MyProject\MyWebFiles to mimic the source control database file structure.

    For more information on creating an ASP.NET project, see How to: Create Local IIS Web Sites.

  3. In order to synchronize and build the sources on Team Foundation Build, you must choose the build configuration for the ASP.NET project. Use the New Build Type Creation Wizard to select the build platform. For ASP.NET projects, the default platform is .NET, or you can choose Mixed Platforms if your application contains ASP.NET projects and other managed projects. For more information, see How to: Create a New Build Type.

  4. If you build the ASP.NET project using .NET and Debug configuration and the build directory is D:\Build, the binary files are stored on the on the Team Foundation Build server in the following folder structure:

    D:\Build\TeamProjectName\TeamBuildTypeName\Binaries\.NET\Debug\_PublishedWebsites\WebSiteName\bin and the sources are copied to D:\Build\TeamProjectName\TeamBuildTypeName\Binaries\.NET\Debug\_PublishedWebsites\WebSiteName.

To use an add-in to automatically configure Team Foundation Build for ASP.NET projects

  • To automatically build and deploy your ASP.NET project on IIS server, use a Visual Studio add-in that sets up a virtual directory on the Team Foundation Build server and associates every ASP.NET project with a deployment project. For more information, see

See Also