Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the purpose of precompiledApp.config?

If you precompile a web site and keep it updatable, the ASP.NET parser can see from the Page directive that there is no codefile or codebehind and where to find the base class (inherits attribute).

<%@ page language="C#" autoeventwireup="true" inherits="_Default, Precompiled"
  theme="Default" validaterequest="false" %>

If the site is precompiled and not updatable, the .compiled files in the bin folder should give the ASP.NET runtime all the necesary information on how to instantiate the page classes.

So why is the precompiledApp.config needed?

Thanks!

like image 236
Michiel van Oosterhout Avatar asked Sep 21 '09 15:09

Michiel van Oosterhout


People also ask

What is Precompile during publishing?

If you choose the option to not make your pages updateable (i.e. uncheck the first checkbox in the advanced settings dialog), it will also precompile your views (ASPX and Razor) instead of compiling those dynamically at runtime as well.

Do ASPX CS files need to be compiled?

In order for the ASP.NET engine to service a request for this page, the page's code portion (the WebPage. aspx. cs file) must first be compiled. This compilation can happen explicitly or automatically.

What is Precompile asp net?

Precompiling for Deployment and Update aspx files into single files that use the compiled code-behind model and copies them to the layout. This option enables you to make limited changes to the ASP.NET Web pages in the site after you compile them.


1 Answers

It's used to indicate whether or not the ASPX/ASCX pages in your site are updateable or not. You can precompile and have the code behind compiled, but leave these pages updateable so you can make minor GUI-related tweaks should you wish.

like image 134
Keith Adler Avatar answered Nov 15 '22 12:11

Keith Adler