Why does IIS Development Server recompile my entire web app every time I build my webapp in VS 2008?

We have a web application project (not a website), until the day we added batch = "false" to the web development web server web.config, the entire web application was compiled instead of the requested page.

<compilation debug="true" batch="false">
      <assemblies>
        ...
      </assemblies>
</compilation>

      

It makes us faster. But I don't know what changed (I checked both foo.cproj and web.config from the repository comparing older versions, but I can't find anything in this slow motion).

I looked at% temp% / Temporary ASP.NET Files; after compiling my web app (don't recompile, shift + f6), then I request the page and I see that the web server removes all already compiled files from% temp% / Temporary ASP.NET Files and recreates. I don't know if this is normal, but it seemed to me that the complete recompilation of the entire web application is very slow. (I looked through Process Explorer at the file wevdev.wevserver.exe calls csc.exe several times)

How can I make compilation faster? Thank...

+1


source to share


2 answers


There is an option for ASP.NET Development Server named "Enable Editing and Continuing" available with the 32-bit version of the NET CLR. Disable this in Visual Studio.



Also try changing the assembly for "Any processor" in the assembly for "x86". This should make compilation faster.

+1


source


I believe this is part of using a web application project. Every time you create an application, the entire site is recompiled. You should see that unlike Website, the web app is bundled with one dll (plus links).

Another thing to keep in mind is when you delete a file / folder under your web application root folder it also forces you to recompile, which can be a real pain in the butt for temporary files.



On the plus side, when you go to the first compilation, there will be no additional compile time waiting on invisible pages.

+1


source







All Articles