Web Application Projects
- Similar to Visual Studio .NET 2003. Only files that are referenced in the project file are part of the project, are displayed in Solution Explorer, and are compiled during a build. Because there is a project file.
You can subdivide one ASP.NET application into multiple Visual Studio projects.
You can easily exclude files from the project and from source code-control. - All code-behind class files and stand-alone class files in the project are compiled into a single assembly, which is placed in the Bin folder. As it is a single assembly, you can specify attributes such as assembly name and version, as well as the location of the output assembly.
- To run and debug pages, you must build the entire Web project. Building the entire Web application project is usually fast, because Visual Studio employs an incremental build model that builds only the files that have changed.
- For Deployment as all class files are compiled into a single assembly, only that assembly needs to be deployed, along with the .aspx and .ascx files and other static content files.
When to Use:
- When you required to migrate large Visual Studio .NET 2003 applications to VS 2005.
- To control names of output assemblies.
- You need stand-alone classes to reference page and user control classes.
- You need to build a Web application using multiple Web projects.
- You need to add pre-build and post-build steps during compilation.
- Web site projects use the folder structure to define the contents of the project. There is no project file and all files in the folder are part of the project.
- The Build command compiles Web site projects only to test them. But to run Web site projects, you deploy source files and rely on ASP.NET dynamic compilation to compile pages and classes in the application. The ASP.NET dynamic compilation system has two modes—batch mode (the default) and fixed-names mode. In batch mode, many assemblies (typically one per folder) are produced when precompiling the site. In fixed mode, one assembly is produced for each page or user control in the Web site.
- pages are compiled dynamically and compiled into different assemblies as needed, it is not required that the entire project compile successfully in order to run and debug a page.
- Both .aspx files and code-behind files can be compiled into assemblies using the Publish Website command in Visual Studio. Build command does not create a deployable set of assemblies. The updateable publish option supports compiling only code-behind files while leaving .aspx files unchanged for deployment.
When to Use:
- When you need single-page code model to code-behind model.
- Need dynamic compilation and working on pages without building entire site on each page view (that is, save file and then simply refresh the page in the browser).
- Need to generate one assembly for each page.
- Want to open and edit any directory as a Web project without creating a project file.