Why create a project containing all the references
I see a lot of samples where people add a Visual Studio project containing all the references that are used on all the other projects in the solution.
An example is KandaAlpha . Watch for KandaAlpha.References.
开发者_高级运维Why should I do that?
It's probably to ensure that all dlls are included in the output folder. I've seen that technique with plugin archetectures that use reflection to load plugin assemblies. You reference all the needed dll's in one project and then reference that project from the main project. That will pull in all the dll's that were referenced from the first project.
Every project needs to have a reference to every project it uses, even projects it uses indirectly (via other dependent projects), otherwise it doesn’t compile.
I think I'm misunderstanding the question. You said (emphasis mine):
I see a lot of samples where people add a Visual Studio project containing all the references that are used on all the other projects in the solution.
If a project uses things from other projects, it needs a reference to those other projects. Like I said, I must be misunderstanding the question.
精彩评论