Http://zhidao.baidu.com/question/238013871.html
What are the advantages of uploading source code to the server after the source code is published? If some statements in the source code are modified after the post-release upload, do you need to re-release and re-upload all the statements? If not, which files should be uploaded after modification?
Let me tell you this, that is. net uses the compilation method to generate binfiles for your code, so that every time you change the background code in the project, you only need to update the binfile, but if you change the page, you need to update the page, that is, to change the background code, you only need to update the binfile of the server.
Suggestion: it is best to delete all the CS files when uploading them to the server. The truth is not enough.
Publish a website, that is, pre-compile the website.
After the website is published, the. CS files under the app_code directory and the. aspx. CS files corresponding to the. ASPX page will be compiled into DLL files and saved in the bin directory.
The reason for this is pre-compilation because, even if the source code is not directly uploaded, the website must be compiled before it can run when it is accessed. This is all done automatically, it takes some time, so it is usually slow when the website is started for the first time.
Pre-compilation completes this compilation in advance, so you do not need to compile it when accessing the website, which improves the website performance to a certain extent.
If the code under app_code is modified after the release, you only need to replace the compiled bin \ app_code.dll. however. aspx. CS file, it is best to re-upload all, because. aspx. the name of the corresponding DLL file generated by CS is not fixed. If it is not replaced correctly, the page will not run. if you have modified. aspx files must be re-transmitted because. the aspx file will be modified during compilation.