简体   繁体   English

Visual Studio 2008:项目依赖性和构建顺序全部不同步,可用插件吗?

[英]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.

相关问题 Visual Studio 2008 - 代码与调试源的位置不同步 - Visual Studio 2008 - code out of sync with the location for debug source 如何更改基于反射的项目依赖项的 Visual Studio 构建顺序? - How can I change Visual Studio's build order for reflection based project dependencies? 如何在构建期间使Visual Studio解析并包含项目的所有依赖项? - How to make Visual Studio resolve and include all the dependencies of my project during build? Visual Studio 中的项目依赖项 - Project Dependencies in Visual Studio 如何在Visual Studio 2012中部署具有所有依赖项的C#项目 - How to Deploy c# project with all dependencies in visual studio 2012 Visual Studio 2008安装项目 - Visual Studio 2008 Setup Project 处理大型项目中的依赖项...是否可以可靠地更改构建顺序,而无需在C#/ VS2008中使用项目依赖项? - Dealing with dependencies in a large project… Is it possible to reliably alter build order without using project dependencies in C#/VS2008? 如何将Visual Studio 2013项目降级为Visual Studio 2008项目? - How to downgrade a Visual Studio 2013 project to a Visual Studio 2008 project? Visual Studio 2008性能配置文件插件或工具 - Visual Studio 2008 performance profile plugin or tool 在Visual Studio中更改项目中所有图像的“构建操作”属性? - Change 'Build Action' property for all images in a project in Visual Studio?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM