30 Nov 2010
16 Feb 2011
Link to this post
You're correct, .net compiles things as necessary and shoves them in (in my case) C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\.
We've had some speed issues over time with WebSite projects, but they've only been because of a change to either \App_Code\ or \Bin\. There's really no way to get around the time it takes on compilation with a website project except converting a WebSite to a WebApplication project. This just compiles
things on the front end rather than the back end. In doing this, you lose the
flexibility of being able to drop in code. Also, I'm not sure that this can be done with 4.x, I think I saw a few blogs on doing the conversion in 3.7 (it's been a while).
Do you have anything that may modify the file times in either of these folders- any sort of machine indexing or file syncing? (I'm grasping at straws here)
Also you may check to see if csc.exe or vbc.exe is running on your web server during the time things are slow. This would be a surefire way to tell that something was recompiling.