On the Build tab is a field named Output Path where you can specify the path to the output assembly. A Web application project is defined by a project file instead of by a project folder, as is done for a Web site project. The project file references the files that are included in the project, and includes the assembly references and other project metadata settings. Files that are in the project folder but that are not defined in the project file are not compiled as part of the web application project.
Project settings that are added and changed through Visual Studio or Visual Web Developer Express are referenced in the project file. To run and debug pages, you must compile the complete web application project.
However, building the complete Web application project can be fast because Visual Studio and Visual Web Developer Express use an incremental build model that builds only the files that have changed.
For more information, see ASP. Web application projects use MSBuild to compile class files. These class files are compiled into a single assembly. By default, they are put in the Bin folder. You can extend and customize the compilation process by using standard MSBuild extensibility rules.
For more information, see MSBuild. This is standard internal behavoiur of ASP. That's normal. It is using the precompiled files. Those files though are just the code-behind classes from which the final page must still derive, create a new dll, for the whole pages to execute. The downside there though is that you'll have to pre-compile the whole web site for every little change you make to it. This discussion thread is closed Start new discussion.
Similar topics Python. Configure errors with PHP 5. However, automatic deployment has two potential drawbacks:. If either of the two above shortcomings are deal breakers, you can either switch to the WAP model or precompile the WSP prior to deployment. This tutorial examines the precompilation options best suited for a hosted website and walks through the precompilation process and deployment of a precompiled website.
Before we look at the available precompilation options, let's first talk about the code generation and compilation that occurs when an ASP. NET page is requested for the first time since it's been created or last updated. As you know, ASP. NET pages are composed of two portions: declarative markup in the. The steps performed by the runtime when an ASP. NET page is requested depends on the application's compilation model.
With WAPs, the pages' source code must be explicitly compiled into a single assembly before being deployed. During deployment, this assembly and the various markup pages are copied to the production environment. When a request arrives to the web server for an ASP. NET page, the runtime creates an instance of the page's code-behind class and invokes its ProcessRequest method, which starts the page lifecycle and, ultimately, generates the page's content, which is returned to the requestor.
The runtime can work with the ASP. NET page's code-behind class because the code-behind class was already compiled into an assembly prior to deployment. With WSPs and automatic compilation, there is no explicit compilation step prior to deployment. Instead, deployment involves copying both the declarative and the source code content to the production environment. NET page for the first time since the page has been created or last updated, the runtime must first compile the code-behind class into an assembly.
Because the assembly is saved to disk, it does not need to be recompiled on subsequent requests to the same page. As you would expect, there is a slight delay when requesting a page for the first time or for the first time since it's been changed in a site that uses automatic compilation as it takes a moment for the server to compile the page's code and save the resulting assembly to disk.
In short, with explicit compilation you are required to compile the website's source code before deployment, saving the runtime from having to perform that step. With automatic compilation the runtime handles the compilation of the pages' source code, but with a slight initialization cost for the first visit to the page since it was created or last updated.
But what about the declarative part of ASP. NET pages the. It's obvious that there's a relationship between the. It's also obvious that the content in the. I don't want to get too sidetracked on the low-level implementation details, which vary between WAPs and WSPs, but in a nutshell the runtime automatically generates a class file that contains the various Web controls as protected members and methods.
This generated file is implemented as a partial class to the corresponding code-behind class. Partial classes allow for the contents of a single class to be spread across multiple files.
Therefore, the code-behind class is defined in two places: in the. NET Files folder. The important take away here is that for an ASP.
NET page to be rendered by the runtime both its declarative and source code portions must be compiled into an assembly. With WAPs, the source code is explicitly compiled into an assembly prior to deployment, but the declarative markup must still be converted into code and compiled by the runtime on the web server. With WSPs using automatic compilation, both the source code and the declarative markup need to be compiled by the web server.
It is possible to use explicit compilation with the WSP model. You can explicitly compile the source code portion, like with the WAP model. What's more, you can also compile the declarative markup. This tool was released with the.
NET Framework version 2. Click Test virtual objects. Preparing virtual objects for compilation Before you start the deployment, you need to perform the following steps to include your website's virtual objects into the precompiled project: In the Xperience administration interface, open the System application.
Click Store all virtual objects in file system. Enabling precompilation in the Visual Studio publish profile When creating a publish profile for your Visual Studio deployment, configure the following precompilation options in the Publish dialog: On the Settings tab, expand File Publish Options and enable Precompile during publishing.
Click Configure next to the Precompile during publishing check box. Configure the options in the Advanced Precompile Settings dialog: Allow precompiled site to be updatable : enabled — compiles the code behind of all web forms and controls, but keeps the markup files.
Merge options — select one of the following options: Do not merge Do not merge. Create a separate assembly for each page and control. We use small cookies to improve your browsing experience. You may disable them in your browser at any time.
0コメント