How to prevent endless build errors in Visual Stud

2019-08-02 21:18发布

问题:

We are building our first big Net project: we have now 60 projects and 6 solutions. The problem is that many solutions use the same projects and it continually happens that changes to a project that is used by many solutions are not picked up, even after cleaning and rebuilding. By deleting and re-adding references, trying to build all solutions one after an other and than starting over, finally we get the code to compile again, but the situation has deteriotated to a point that each of the three developpers loses at least 45 minutes a day to get the solutions to build. I am clutching at straws here, but below some points that may be related to the problem. Any insights are very welcome!

  • We do not routinely apply new versions to a project if we make minor changes to the code.
  • Some projects are maintained in Visual Studio 2012, others in Visual Studio 2013, due to lack of support for VS 2013 of the Crystal Reports engine.
  • The assemblies are postprocessed by CodeContracts and PostSharp.
  • We use Tortoise HG as source control. We use a hg.ignore file copied from SO. The full ignore list is:

syntax: glob

*.obj
*.exe
*.pdb
*.user
*.aps
*.pch
*.vspscc
*_i.c
*_p.c
*.ncb
*.suo
*.tlb
*.tlh
*.bak
*.cache
*.ilk
*.log
*.lib
*.sbr
*.scc
*.mdf
*.ldf
.sdf
[Bb]in
[Dd]ebug
/
obj/
[Rr]elease*/
_ReSharper*/
[Tt]est[Rr]esult*
[Bb]uild[Ll]og.*
*.[Pp]ublish.xml
*.ldb
*.orig

回答1:

We did go for the solution to create one "monster" solution, it took us a week to get it all sorted out. The problem has al but disappeared after that. Sometimes when changing dependencies on the lowest level of the chain of dependencies, a clean, an attempted rebuild and a restart of Visual Studio are necessary to get everything to build again.