MSDN 文档 Visual Studio Integration (MSBuild)状态:
Building Solutions
Within Visual Studio, the solution file and project build ordering are controlled by Visual Studio itself. When building a solution with msbuild.exe on the command line, MSBuild parses the solution file and orders the project builds. In both cases the projects are built individually in dependency order, and project to project references are not traversed. In contrast, when individual projects are built with msbuild.exe, project to project references are traversed.
在我的 Visual Studio 2010 中,当从命令行使用 MSBuild 构建一个 .sln
文件时,项目到项目的引用全部被构建,无论它们是否出现在解决方案。
我在这里错过了什么?还是文档完全错误?
最佳答案
你是正确的,msbuild.exe 将整理所有项目引用,无论它们是否是解决方案的一部分,这与在 Visual Studio 2010/2012/2013/2015(以及可能的更高版本)中构建相比,你将获得如果引用的项目不是解决方案的一部分或不是事先构建的,则构建失败。
简而言之,是的,文档似乎有点偏离。
关于visual-studio - MSBuild 在构建解决方案时是否将项目解析为项目引用?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34900019/