Why are circular references in Visual Studio a bad practice?

后端 未结 8 2041
囚心锁ツ
囚心锁ツ 2020-12-05 23:33

Why are circular references in Visual Studio a bad practice?

First, I will describe an example of how this can happen using C# in Visual Studio, since VS will typi

8条回答
  •  庸人自扰
    2020-12-05 23:59

    circular dependencies are bad because:

    • project A references project B
    • when project B changes, project A needs to be rebuilt
    • now if project B also references project A
    • then when one of them changes, the other one needs to be rebuilt
    • which causes the other one to need to be rebuilt
    • which causes the other one to need to be rebuilt
    • etc.

    this is potentially an infinite-loop in the build process

提交回复
热议问题