Asp.Net 2.0 Web App Compilation Order (Life Cycle)

2008-09-19


Sometimes we need to know the compilation order in an asp.net project. We have to know know which folder in the application structure gets compiled first and which when get compiled last?

See this article by Gourav Kumar . Here I just put his main content :

**** Here is the compilation life cycle of an Asp.Net project in the order they get compiled.

1: App_GlobalResources: resource assembly is built -> All the assembly's in the bin folder are linked to this assembly.

2: App_WebResources: create all the proxy types for the web services -> The web reference created -> linked to the resource assembly .

In .net 2.0, There is only APP_WebReferences.

3: Profile properties (defined in the Web.config file): an assembly will be generated for the profile objects.

4: App_Code: code assemblies and profile assembly are linked to the resources and Web references assemblies if any.

5: Global.asax: Application object is compiled and then linked with all other previously generated assembly's.

6: App_LocalResources: App_LocalResources folder, the contents are compiled and linked to the global resources assembly.

7: Individual Web pages (.aspx files), 8: User Controls (.ascx files), 9: HTTP handlers (.ashx files),

10: HTTP modules (.asmx files):

11:**Themes, master pages, other source files **are compiled when referenced page is compiled.

(How is APP_Browser ?)