MSBuild 构建顺序
看看微软的这篇文章,我有关于 SolutionToBuild 部分的问题。
<ItemGroup>
<SolutionToBuild Include="$(SolutionRoot)\path\MySolution.sln />
<SolutionToBuild Include="$(SolutionRoot)\Scribble\scribble.sln" />
<SolutionToBuild Include="$(SolutionRoot)\HelloWorld\HelloWorld.sln" />
<SolutionToBuild Include="$(SolutionRoot)\TestProject1\TestProject1.sln" />
</ItemGroup>
它说构建的顺序是由上面的顺序决定的。因此,例如,MySolution 将在 scribble 之前构建。
但是,如果 scribble 依赖 MySolution,这安全吗?例如,MySolution 输出一个或多个供 scribble 使用的 dll。如果 MySolution 和 scribble 同时更改,构建是否会等待 MySolution 完全编译后再移至下一个项目?
Looking at this article from MS, I have a question about the SolutionToBuild section.
<ItemGroup>
<SolutionToBuild Include="$(SolutionRoot)\path\MySolution.sln />
<SolutionToBuild Include="$(SolutionRoot)\Scribble\scribble.sln" />
<SolutionToBuild Include="$(SolutionRoot)\HelloWorld\HelloWorld.sln" />
<SolutionToBuild Include="$(SolutionRoot)\TestProject1\TestProject1.sln" />
</ItemGroup>
It says that the sequence of the build is determined by the order above. So, for example, MySolution would be built before scribble.
However, is this safe if scribble is dependant on MySolution? For example, MySolution outputs one or more dlls that are used by scribble. If MySolution and scribble are changed simultaneously, will the build wait for MySolution to be completely compiled before moving to the next project?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您可以尝试使用项目 SolutionToBuild 的其他元数据。有些使用递归,瞧!
You can try to use additional metadata for item SolutionToBuild. Some work with recursion and voilà!
您如何管理解决方案依赖性?您不是引用项目吗?我也对你们的一些解决方案的“同时”变化感到困惑。请澄清这些变化的性质。
到目前为止,您的问题的答案是:
How do you manage solution dependency? Aren't you referencing projects instead? I'm also puzzled about the 'simultaneous' changes on some of your solutions. Please clarify the nature of these changes.
So far, the answers to your questions are: