Pre-compiled aspnet_compiler and compiled integrated aspnet_merge

Source: Internet
Author: User

ASP. net1.1 , Web Project can be compiled into one DLL And then publish DLL And Aspx , Ascx Page. Arrived ASP. net2.0 , Web Project compilation is slightly different.

 

first, vs2005 there are two types of Web Program : Web site and Web project .

 

WEB Project And the original Vs2003 Can be compiled into DLL But you need to install SP1 This type will only appear after: Create a New Project , Select Web .. .

ThisProjectA. CsprojProject file;

VSThe project directory isXxProject. This type of project can be converted to the one below.

 

If you have installed Vs2005 The default Web Type is Web Site This type is only a folder, which does not contain . Csproj File, VS Is a directory. D: \ XX \ xxx .

Compilation and release of such projects are similarVs2003It can be precompiled.

 

Pre-compilation can compile the project into some DLL , These DLL . For example, App_web_4psgfks A pair of files, such Bin Directory. In this case, how to compile DLL , There seems to be Aspnet_merger Of DLL Yes.

 

 

WhileAspxThere are also a variety of page compilation results.

1 : If you selectCannot be updatedAfter compilation Aspx The page becomes Markup Page, the content is empty, leaving only such a string: This is a marker file generated by the precompilation tool, and shocould not be deleted! . At the same time Bin Generate a corresponding Complied File, which specifies the class ing.

2: If you selectUpdatableAfter compilationAspxThe content of the page is retained, but the first column of the page is changed to the following:Inherits = "XX. xxxx, app_web_4psgfks -". This indicates which background class is locatedDLL.

 

 

IfVs2005You can directly callAspnet_complier.exeComplete the pre-compilation. TheEXELocated inC: \ windows \ Microsoft. NET \ framework \ v2.xxxxx \ aspnet_compiler.exe.

 

Example:

C: \ windows \ Microsoft. NET \ framework \ v2.0.50727> aspnet_compiler-VProject name-PProject directory Target directory-U

Where-UIndicates whether or notAspxPage Update options.

 

The specific parameters can be found inCMDEnterAspnet_compile -?.

========================================================== ====

========================================================== ==========
This isCodeWhich can be used to compile and integrate the DLL:
"C: \ WINDOWS \ Microsoft. net \ framework \ v2.0.50727 \ aspnet_compiler.exe "-f-u-p" D: \ myprogram \ website \ XXX "-V/" D: \ myprogram \ win \ XXXX"
"C: \ Program Files \ msbuild \ Microsoft \ webdeployment \ v8.0 \ aspnet_merge.exe" "D: \ myprogram \ win \ XXXX"-o xxxx. dll

======================================
Normally, no aspnet_merge.exe exists in vs2005. you need to install this to: webdeploymentsetup. MSI.
This is already available under vs2008.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.