6.7. Web Site Projects

The Web Site Project functions quite differently from other project types. Web Site Projects do not include a .csproj or .vbproj file, which means they have a number of limitations in terms of build options, project resources, and managing references. Instead, Web Site Projects use the folder structure to define the contents of the project. All files within the folder structure are implicitly part of the project.

Web Site Projects provide the advantage of dynamic compilation, which enables you to edit pages without rebuilding the entire site. The file can be saved and simply reloaded in the browser; therefore they enable extremely short code and debug cycles. Microsoft first introduced Web Site Projects with Visual Studio 2005; however, it was quickly inundated with customer feedback to reintroduce the Application Project model, which had been provided as an additional download. By the release of Service Pack 1, Web Application Projects were back within Visual Studio as a native project type.

Since Visual Studio 2005 an ongoing debate has been raging about which is better — Web Site Projects or Web Application Projects. Unfortunately, there is no simple answer to this debate. Each has its own pros and cons, and the decision comes down to your requirements and your preferred development workflow.

Further discussion of Web Site and Web Application Projects is included in Chapter 31.

Get Professional Visual Studio® 2008 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.