So, the other day I posted something here ranting about how slow it is to build a web app here in VS 2005. We’ve been wasting a lot of time here because of that. Doing some research on the internet, I ran accross some info that didn’t help me much. For instance:
- Found this hotfix: FIX: Visual Studio 2005 may stop responding when you build a Web application project that is checked out of Visual SourceSafe (http://support.microsoft.com/?kbid=915110). This really seemed like what the problem was here. Basically, everytime i was hitting Rebuild, I could tell VS was doing something (by an animated icon somewhere), but I would not see any progress on the Build Output window. Then after the long 5-10 minutes of waiting, I’d see something on the ouput window, like "Validating Web Site", "Building directory…". From that point on, it’d take about 20 seconds to finish the process. Well, one couldn’t download the hotfix (you have to call MS support to get it). We’ve got the hotfix and applied it, but didn’t seem to fix the problem.
- Poking around, I found this other link: http://lab.msdn.microsoft.com/productfeedback/ViewWorkaround.aspx?FeedbackID=FDBK41369#1. Tried that as well, but didn’t get good results either.
At this point, we aren’t going the new web project coming with the VS 2005 Service Pack since it’s not release yet, so we’re just sticking to what we’ve got. Here’s the solution I’ve found to remedy the problem meanwhile:
- Most of the problem with the slowness seems to be related to the contents under the Bin folder (which is under the web app folder – I’m using the File System-based "project").
- I remove all the files contained within the bin folder (including all the junk that gets there, such as files with extensions like .pdb, .refresh, and .xml, that shouldn’t be there).
- I put copies of all the assemblies I need on the bin folder (our biz objs assemblies and stuff like that).
- When I rebuild the solution at this point, it takes just under 20 seconds! Yay!!
#1 by Claudio on April 26, 2006 - 5:27 pm
Here\’s a detail I forgot to mention:
Because there\’s a bunch of files under the bin folder, and those files all get added to source control (because of the way the web app works in VS 2005), everytime I rebuild the solution, it tries to check out the files from the bin folder, and when we have multiple checkouts going on, things get really messy.
To go around that, after removing the files from the bin folder and adding just the ones I really need, I go to the file explorer and flag the bin folder as read-write (or uncheck the read-only option). That way the build process can update the DLLs on the bin folder without having to check the files out.