tags:

views:

25

answers:

3

My understanding is asp.net pages are grouped in folders and each folder is compiled into a dll file. However when a page is requested the first time, only that page is compiled? So is it possible to compile part of a dll file? And when a page is requested, is it only the page's code within the dll file is executed, but not the whole dll? Somehow I'm under thr impression that a dll file should be compiled or executed as a whole.

A: 

However when a page is requested the first time, only that page is compiled?

If your application is a website,when it calls first time that aspx page compile automatically.But not for web application it will compile once when you build

So is it possible to compile part of a dll file? Means you want to compile particular part of a project.

anishmarokey
A: 

Your answer exists within ASP.NET Compilation Overview and the compilation element.

Directories are compiled when browsed to, but the batch=true/false configures if only the loaded page will be compiled, or all of the pages in that directory. (There's a maxBatchSize that configures maximum of pages to compile in a batch.)

Simon Svensson
A: 

Page can compile per folder if you have enable the batch=true. The compiler compile the first n page that found on the folder un-compiled.

Also compiles all the modules that need for the page that you run. When again found one other page that have not been compiled then again compile a second set of n files.

The limits of the how many files are compile with the batch=true, are set from the compilation settings .

If I understand well you search a way to seed up the developmental.

For your development computer I suggest 2 settings.

<compilation batch="false"  optimizeCompilations="true" ... >

When batch=false then only the file you ask is called. When optimizeCompilations=true then the compiler did not build the functions on the dlls, nether some cache files if they have not change.

Read also: http://stackoverflow.com/questions/2382741/slow-performance-asp-net-aspnet-wp-exe-and-csc-exe-running-after-clicking-red/2385097#2385097

If you have problems with the compilations then set optimizeCompilations=false.

When the optimizeCompilations is on, there are case that the compile can not understand the change of a function and you get errors. One case is when you have a function call, and change the function by just adding an argument with a default value (net4). In this case the compiler did not compile it again, and this some times product errors.

Aristos