Reputation: 11356
i am building a solution with approximately 100 assemblies that is taking a considerable amount of time to compile. I would say in the realm of minutes per assembly. This is in contrast to another product also with 100+ assemblies that will take seconds to move through each one.
In both cases there are complex dependencies and multiple references and in the 2nd case the project is actually larger which doesnt seem to make sense.
I have looked over the CSPROJ files and SLN files and cannot see anything obvious that would stall the compile.
I am building in VS2008 Professional Edition.
NB: Using NANT scripts that use MSBUILD.exe works exponetially faster -> So something in VS is causing a major slowdown.
Does any one have any sugestions as opposed to recreating the entire solution from scratch?
Thanks.
Upvotes: 2
Views: 487
Reputation: 11356
Found out that the project files were referecing network paths instead of local paths. changing these values set the build time back to normal. Thanks all who replied.
Upvotes: 3
Reputation: 6795
Does the slow solution have a lot of ASP.NET files/projects? Compiling tags always seems to take longer than pure C#/VB
Upvotes: 0
Reputation: 1500515
Do you have anything in the dependencies which is forcing lots of projects to be rebuilt each time? For instance, if you have a pre-build step which runs some code generation, and everything relies on that project, that could be a killer. I ran into that situation a while ago - making the code generator notice when its inputs hadn't changed, and not rewriting the output in such cases, saved loads of time.
As an aside, do you really need 100 projects in the same solution? That's going to be pretty slow whatever you do, I think. I'd considering either trying to amalgamate projects (I've seen various situations where people had lots and lots of tiny projects - merging them really helped) or split the single solution into several.
EDIT: One thing you might like to try to take the GUI part of Visual Studio out of the equation is build it with msbuild
from the command line, without VS running at all.
Upvotes: 3
Reputation: 16673
Maybe use a tool like FileMon to monitor what VS is writing/reading while it is delaying. Maybe that will give you a clue. I found it very useful in understanding what applications are doing (assuming there is I/O activity to monitor)
Upvotes: 2
Reputation: 2252
Do you have any Visual Studio plug-ins that might be doing something like indexing the files as they build?
Have you set the options to use all of the processors that you have available on your machine?
Are there any other processes running on your machine that might be stealing CPU cycles or hogging the hard drive? You can use Task Manager or Process Explorer to look for those.
Upvotes: 0