I have a Silverlight 4 solution that takes a really long time to build from both VS2010 and the MSBuild 4 command line.
The solution contains 42 projects, one is a Silverlight application project, one web application project, and the rest are class libraries.
The MSBuild diag summary shows these tasks are taking some considerable time...
29891 ms ResolveAssemblyReferences 68 calls
115609 ms CopySilverlightApplications 1 calls
131547 ms ValidateXaml 36 calls
425688 ms ResolveProjectReferences 68 calls
634031 ms Build 71 calls
The project dependencies are quite well arranged, and the build order looks reasonable. I have all projects compiling into a single output folder, and all referenced have CopyLocal = false.
It appears the worst offender is the ResolveProjectReferences, but why should it be taking so long?
Do you have the code analysis enabled on build? If so try to disable it. Had a similar issue. After disabling the code analysis the build run ~5 times faster.
ResolveProjectReferences
has to build every referenced project.
So it is possible, that some projects build multiple times.
Use file-references and a central build process to eliminate this problem.
i used this in a project once
we reduced our buildtime from 12 minutes to 3 minutes.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With