I have recently been moving away from ASP.NET Websites in favor of Web Applications. More specifically I have recently been picking up MVC as an alternative to developing ASP.NET Forms websites.Something that I find highly frustrating is the constant build->change->re-build process when testing small changes to compiled code. I find myself 'bundling' several changes between builds just to avoid waiting 20-25 seconds for Visual Studio to crunch it's way through the compilation process. I created a clean MVC 4 project from the VS template and timed the build after making a single line code change, it took 19 seconds.When making a change in the code-behind in an ASP.NET website I've always found that the page is seemingly re-compiled on the fly when you next hit the page. This would seem to me to be a better environment for web development rather than VS forcing an entire rebuild after every small code change.In the past I have enjoyed the luxury of making a change, hitting refresh in the browser, and waiting 1-2 seconds for my result. Is this achievable with web applications built using Visual Studio?
Build times for small incremental changes to C# Web Applications
web applications;asp.net;performance;asp.net mvc;visual studio 2010
It seems I had overlooked the usefulness of the Edit and Continue option (Tools -> Options -> Debugging -> Edit and Continue) after struggling to get past the infernal dialog message:Changes are not allowed in the following cases:When the debugger has been attached to an already running process.The code being debugged was optimized at build or run time.The assembly being debugged is loaded as domain-neutral.The assembly being debugged was loaded through reflection.Despite having the option checked in VS options you have to enable it for each separate web application. In the Properties Page it's on the Web tab when you scroll right to the bottom Enable Edit and Continue.Making small changes using Edit and Continue isn't exactly the same as making code-behind changes to a Website project, however, it's far more palatable than restarting the app for every code change.