[英]Visual Studio 2008: Project dependencies and build order all out of sync, plugin available?
I have quite a large project, actually 2 but they share a lot of projects between each other. 我有一个很大的项目,实际上是2个,但它们彼此之间共享许多项目。 The problem being when I compile from NOTHING, that is, no DLLs in my common bin directory, it fails..
问题是当我从NOTHING进行编译时,也就是我的公共bin目录中没有DLL时,它失败了。
This is due to the fact that some projects are not compiling before others that are dependent on them. 这是由于某些项目没有在依赖它们的其他项目之前进行编译的事实。
I have fixed it manually going through them and it now works. 我已经通过他们手动修复它,现在可以正常工作。
But I was wondering if there was some sort of plugin or trick to force a READ of the solution and build the dependencies and build order correctly? 但是我想知道是否存在某种插件或技巧来强制读取解决方案并正确构建依赖关系和构建顺序?
Also it's a mystery that some projects had a tick next to some projects in the project dependencies dialog and others not, any idea why? 还有一个谜,就是某些项目在项目依赖项对话框中的某些项目旁边有一个勾号,而另一些则没有,为什么?
Why did Visual Studio 2008 decide to say "hey that's a dependency on that but that isn't when it is" :-) ? 为什么Visual Studio 2008决定说“嘿,这是一个依赖项,但并非如此” :-)?
If you rightclick on your project you can go to Project Dependencies and check off what projects your current project depends on. 如果右键单击项目,则可以转到“项目依赖项”,然后检查当前项目所依赖的项目。 Also you can right click and go to Project Build Order to see the order in witch your projects build.
您也可以右键单击并转到“项目构建顺序”以查看项目构建中的顺序。
VS will try and infer the build order from the references of each project. VS将尝试从每个项目的引用中推断出构建顺序。 If project A contains a reference to B then B will be built before A. Usually this works reasonably well.
如果项目A包含对B的引用,则B将在A之前构建。通常,此方法相当有效。 If your projects have a dependency that's not expressed as a reference then VS will not pick it up.
如果您的项目具有未表示为参考的依赖项,则VS不会选择它。 For example if you're using a dependency injection container then you may not want/need explicit project references.
例如,如果您使用依赖项注入容器,则可能不需要/不需要显式项目引用。
As Bruce points out the solution in this case is to set dependencies and the build order manually. 正如Bruce指出的,在这种情况下,解决方案是手动设置依赖关系和构建顺序。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.