It takes not long to get started with Microsoft. NET Framework, but to understand its basic concepts.
Using asp.net to develop a small program makes deployment a little troublesome. the space of 10 MB is full because I put it in the project. aspx. cs ,. aspx. designer. cs and other source code files are all mounted to the server ...! @ # $ % ^
Just wondering if the. NET Framework vigorously promoted by MS is not like this. There should be an optimization solution for project release and deployment ---
Pre-compiled using aspnet_compiler. The program tool has two versions, Framework2.0 and 4.0, which are located in WINDOWS \ Microsoft.. NET \ Framework \ version. The former applies to asp.net websites of Version 2.0 \ 3.0 \ 3.5, and the latter applies to asp.net of Version 4.0 and later.
Run aspnet_compiler.exe and type aspnet_compiler -? Obtain the description of each option.
Example:
The following two commands are equivalent and depend on the IIS metadatabase. The compiled application is deployed to c: \ MyTarget:
Aspnet_compiler-m/LM/W3SVC/1/Root/MyApp c: \ MyTarget
Aspnet_compiler-v/MyApp c: \ MyTarget
Run the following command to compile the application/MyApp locally. In this way, no compilation is required when an HTTP request is sent to it:
Aspnet_compiler-v/MyApp
The following command does not depend on the IIS metadatabase because it explicitly specifies the physical source directory of the application:
Aspnet_compiler-v/MyApp-p c: \ myapp c: \ MyTarget
--------------------
After compilation, all. aspx,. ascx, And. cs files in all source folders in the project will be compiled.
When deploying to the server, you only need to upload the bin folder + Web. config. You can deploy the file without the aspx file.
10 MB of program source code is compiled before 1 MB of dll-Really Simple!
Author: "The original ASP. NET can be pre-compiled"