Tips to monitor or speed up ASP.NET compile during development cycle

I work on a large ASP.NET application. Occasionally, I'll make some changes to a DLL in the bin/ directory, or to some codebehind file, etc. These will cause ASP.NET to recompile some of the files, copy to shadow directories, etc. All in, you can sometimes see this process take minutes or longer. I usually just watch task manager and if I see csc.exe or something, I assume we're still compiling. If I see w3wp.exe than I know we've moved on.

So, that leaves two questions: 1. What are some tips to speed up ASP.NET compilations? 2. Can I monitor (using some debug tool) what ASP.NET is actually doing? I imagine a debug console that would write something like:

11:32:32 AM - compiling foo.ascx.cs to c:\windows\system32..\afdjakllfjkal.dll

Thx, Doug


You can do one of the following (or both) to speed up the build time:

  1. If you have enough memory, create a RamDisk and point your ASP.NET Temporary Files to this ram-based disk. Check this blog post for more details on how to speed up the build time of ASP.NET projects with RamDisk:

  2. Use the new "optimizeCompilations" flag. It will tell .NET to not rebuild the entire project just because you changed one project/dll. If you have 40 projects and you don't use this, every time you change a simple method in one project, .NET will try to compile all other projects and dlls. With the new flag (plus the installation of a hotfix) you will see a lot of increase overall performance during development. Check it out this blog post with details on how to speed up the build with this the optimizeCompilations flag: [cache]

I can usually attribute slow build times on my website projects to 'Dueling Assemblies'. As described by Scott Guthrie here. I would follow the advice he gives in his article, and see if your build times improve.

Need Your Help

Regex to select INI sections is only selecting section headers in .NET

.net regex powershell ini

I am trying to return the sections of an INI file as an array of captures using a regular expression:

Preg_replace range character class

php regex preg-match

It is saying this and I wonder why that happened. It didn't happen before.