Posted By: Rotem Kirshenbaum | Jul 30th, 2006 @ 5:06 AM
page 1 of 1
Comments: 3 | Views: 4201
Rotem Kirshenbaum
Rotem Kirshenbaum
The Master Of Cherries
Visual Studio compiles each folder in an Asp.net application separately.

Why is that ?

Rotem
Visual Studio asks the ASP.NET runtime to do the compilation, and the ASP.NET strategy is to compile just the directory and get a response back to the user quickly. It's a tradeoff.  
Compiling on ASP.Net 1.x also meant creating larger and larger assembly DLLs as the application grew. Large assemblies meant longer startup times. A significant time waster when developing large sites, especially when you're boss thinks that by forcing you to develop on a low-spec machine you'll automatically "optimize" the app as you develop (...but that's another story).

I also heard on .Net Rocks that 1.x would compile your localization data into the same assembly, making it even bigger. This would also make a trivial action like updating label text selected from ResourceManager require you to replace the whole website assembly, forxing a reload.

Today, by contrast, VS 2005 lets you put all your res files in the same folder, that gets automatically compiled as a separate dll and therefore lets you update localized text without forcing IIS to reload the entire website assembly, which can significantly help make trivial changes happen quicker and easier.
page 1 of 1
Comments: 3 | Views: 4201
Microsoft Communities