The difference between new website and new WEB project in VS

伊谢尔伦
Release: 2016-11-25 09:32:14
Original
1862 people have browsed it

Advantages of the WebApplication programming model

●The website is compiled quickly and uses the incremental compilation mode. Only after the file is modified, this part will be incrementally compiled.

●Generated assembly
WebSite: Generates a random assembly name. You need to use the plug-in WebDeployment to generate a single assembly.
WebApplication: You can specify the website project to generate a single assembly. Because it is an independent assembly, it cannot be used with other projects. You can also specify the name, version, output location and other information of the application set

●You can split the website into multiple projects for easy management

●You can exclude a file from the project and source code management

●Convenient Team Build that supports VSTS facilitates daily builds

● More powerful code inspection function, and the inspection strategy is controlled by source code

● You can perform your own prescribed processing before and after compilation

● Strong Resource class support for App_GlobalResources (online That said, I haven’t learned about it yet)

●Directly upgrade large-scale systems built using VS2003

Advantages of the WebSite programming model

●Compile the page dynamically and you can see the effect immediately without compiling the entire site (main advantage)

●Same as above, you can prevent the erroneous part from interfering with the used part (you can require that you can check in only after the compilation passes)

●You can generate an assembly for each page (this method is generally not used)

●You can put A directory is treated as a Web application, and the files can be published directly by copying them. No project files are needed (suitable for small sites)

●The page can also be compiled into the assembly (should not be used, and WebApplication can also be used through the WebDeployment plug-in) To achieve)

Conversion between two programming models

VS2005 SP1 has a built-in conversion program, which can be very convenient to convert from WebSite to WebApplication
Just copy the file, right-click and execute "Convert to Web Application".

I haven’t found any special reverse conversion tool, but after comparison, I found that the conversion is very simple.
Delete all *.designer.cs
Batch replace Codebehind="******.aspx.cs" in *.aspx, *.ascx, *.master page files with CodeFile="***** *.aspx.cs"

This way you can convert it back


Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!