0

I'm developing on a site with a few hundred user controls. When debugging the web app (pressing F5 in Visual Studio 2008), it takes quite some time to compile it and start Cassini. I've noticed that every user control is compiled to a separate dll in temporary asp.net-files and it takes quite a lot of time.

Is it possible to speed up this process, possibly by compiling to just one dll, and still be able to debug the web application?

Jonas Lincoln
  • 9,567
  • 9
  • 35
  • 49

2 Answers2

1

This is from the article: http://weblogs.asp.net/scottgu/archive/2006/09/22/Tip_2F00_Trick_3A00_-Optimizing-ASP.NET-2.0-Web-Project-Build-Performance-with-VS-2005.aspx

Enable the on-demand compilation option for your web-site projects. To enable this, right-click on your web-site project and pull up the project properties page. Click the "Build" tab on the left to pull up its build settings. Within the "Build" tab settings page change the F5 Start Action from "Build Web Site" to either the "Build Page" or "No Build" option. Then make sure to uncheck the "Build Web site as part of solution" checkbox:

Have you considered moving to a web application project? That will compile all of your code into one dll, but this could be a big change. I would try changing the start options first.

Chris Mullins
  • 6,677
  • 2
  • 31
  • 40
  • Going from "Build Web Site" to "Build Page" makes a huge difference as it doesn't validate your whole website on each build. – Jamie Nov 08 '10 at 13:33
  • I've got a web application, not a web site, so that option is unfortunately not available to me. – Jonas Lincoln Nov 08 '10 at 14:25
  • Do you have all of your files in one project? – Chris Mullins Nov 08 '10 at 14:33
  • Just found this other similar question. http://stackoverflow.com/questions/771743/speeding-up-build-times-in-asp-net There were a few tips and links in there, like excluding your antivirus on access scan for your project directory. – Chris Mullins Nov 08 '10 at 14:34
1

A few tips in here, which helped (batch="false" in web.config and moving the temp-files to a ram-disk):

http://blog.lavablast.com/post/2010/12/01/Slash-your-ASPNET-compileload-time.aspx

Also, consider building in parallel: http://www.hanselman.com/blog/HackParallelMSBuildsFromWithinTheVisualStudioIDE.aspx

Jonas Lincoln
  • 9,567
  • 9
  • 35
  • 49