Forum
 
ForumForumDiscussions and...Discussions and....Net framework ....Net framework ...Slow Builds on VS2005 Web Site ProjectsSlow Builds on VS2005 Web Site Projects
Previous Previous
 
Next Next
New Post
 17/03/2008 11:01
 

Do you have a problem where Visual Studio sometimes spends ages staring into space before it starts the build on a Web Site project?

I just had a total revelation on this.

When you add a reference to a class library it is copied into the bin folder. It is also given a .refresh file which allows Visual Studio to automatically get new versions if the referenced library is re-built.  Sounds brilliant!

So what can drive VS into a sulk for 10’s of seconds before the build really gets started?  If you reference library A and library C, and BOTH of them reference library Z then it is vital that the both reference the exact same version of Z.  If they don’t then Visual Studio will pick one version of Z for you.  In making its pick it spends ages re-analysing the whole build tree.

As a secondary issue you may have hours of fun debugging problems caused by either A or B not running with the version of Z it was built and tested with.

How to tell if this is your problem?  Go through the Bin folder and rename all the .refresh files (say x.dll.refresh -> x.dll.refresh.temp)  if your build magically speeds up then you have this problem.  Now go through every added reference, trace all the libraries that library references and make sure that all common ones resolve to the same version.  Don’t forget to rename all those .refresh files back to their original names.

 


Cheers,
- Richard
If this post helped you over a problem, or taught you something new, please login and rate it. Ratings are in the drop down in the top left corner
Previous Previous
 
Next Next
ForumForumDiscussions and...Discussions and....Net framework ....Net framework ...Slow Builds on VS2005 Web Site ProjectsSlow Builds on VS2005 Web Site Projects

Forum Usage Guidelines

The forums are a place for all to exchange ideas and techniques, and to post and answer questions.  All are welcome to read, registration is required to post. 

If you learn somthing new, discover or acquire a new technique, then please take a moment to register and rate the post that just helped you.  This site does not send spam and it does not release your personal details.  Full details in the site privacy policy.

We have some simple posting guidelines to keep the forums a pleasant and informative environment.

  • No flames, no trolls
  • No profanity, no racism
  • Site management has the final word on approving or removing any thread, post, or comment
  • English language only please

 

Copyright 2002-15 by Dynamisys Ltd