
Writing Precompilation Output
When the precompilation process is finished, the resulting output is written to a folder that you specify. You can write the output to any folder that is accessible to you in the file system, by using File Transfer Protocol (FTP), or across HTTP. You must have appropriate permissions to be able to write to the target site.
Note: |
|---|
The publishing process deploys only the files in your Web site folders and subfolders. It does not deploy the Machine.config file. Therefore, the configuration of the target Web server might be different than it is on your computer, which might affect the behavior of your application.
|
You can specify a target folder on a staging server or production server, or you can write the output to a folder on your local computer. If you specify a folder on a production server, you can precompile and deploy in a single step. If you choose to write the output to a folder that is not part of a Web site, you can copy the output to the server in a separate step.
Note: |
|---|
If you open a precompiled Web site using Visual Studio, you will not be able to build the Web site. Build options will be turned off. It is recommended that you edit the files in the original Web site, precompile the site, and publish it again.
|
The output of the compilation process includes the compiled assemblies for any code or pages. If you choose the option to allow the precompiled site to be updated, any code-behind classes for your .aspx, .asmx, and .ashx files are compiled into assemblies. However, the .aspx, .asmx, and .ashx files themselves are copied as-is to the target folder so that you can make changes to their layout after deploying the site. For precompiled sites that can be updated, the code in single-file pages is not compiled into an assembly, but is instead deployed as source code.
Static files are not compiled. Instead, they are copied as-is to the output folder. Static files include graphics, .htm or .html files, text files, and so on. For more information, see File Handling During Precompilation.
If an error occurs during precompilation, it is reported to you in the Output window and in the Error List window. Errors during precompilation will prevent the site from being compiled and published.