Difference between 'Web Site' and 'Project' in Visual Studio
Difference between 'Web Site' and 'Project' in Visual Studio
Project file structure
- Web application projects:A Visual Studio project file (.csproj or .vbproj) stores information about the project, such as the list of files that are included in the project, and any project-to-project references.
- Web site projects:There is no project file (.csproj or .vbproj). All the files in a folder structure are automatically included in the site.
Compilation
- Web application projects:You explicitly compile the source code on the computer that is used for development or source control.By default, compilation of code files (excluding .aspx and .ascx files) produces a single assembly.
- Web site projects:The source code is typically compiled dynamically (automatically) by ASP.NET on the server the first time a request is received after the site has been installed or updated.You can precompile the site (compile in advance on a development computer or on the server).By default, compilation produces multiple assemblies.
Namespaces
- Web application projects:Explicit namespaces are added to pages, controls, and classes by default.
- Web site projects:Explicit namespaces are not added to pages, controls, and classes by default, but you can add them manually.
Deployment
- Web application projects:You copy the assembly to a server. The assembly is produced by compiling the application.Visual Studio provides tools that integrate with the IIS Web deployment tool to automate many deployment tasks.
- Web site projects:You copy the application source files to a computer that has IIS installed on it.If you precompile the site on a development computer, you copy the assemblies produced by compilation to the IIS server.Visual Studio provides tools for deployment, but they do not automate as many deployment tasks as the tools available for Web application projects.
Comments
Post a Comment