关于Git子模块的MSBuild [英] MSBuild on Git Submodule

查看:128
本文介绍了关于Git子模块的MSBuild的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨朋友们,

我有一个带有几个子模块的TFS-GIT项目。我需要在TFS以及Visual Studio 2015中构建项目以及子模块。不确定这是否可以实现。该场景描述如下 -

I have a TFS-GIT project with couple of submodules. I have a requirement to build the project along with submodules in TFS as well as in Visual studio 2015. Not sure if this is achievable. The scenario is described as following -

-------------------------------- --- 

----------------------------------- 

Project1有两个Git子模块使用

Project1 has two Git submodules added using

" git submodule add" repo to submodule1"

"git submodule add "repo to submodule1"

" git submodule add" repo to submodule2"

"git submodule add "repo to submodule2"

如何从Project1构建,它将从Visual Studio构建两个子模块(依次了解是否有任何选项)调整构建设置来实现这个目标吗?)

How to Build from Project1 which will build the two submodules from Visual Studio (in turn to understand if any options to tweak the build settings to achieve this?)

如何从TFS构建Project1(已在"checkout子模块"的构建定义中检查了存储库下的选项)

How to build the Project1 from TFS (already checked the options under repository in build definition of "checkout submodules")

构建它时应该构建子模块而不仅仅是检查代码。

while building it should build the submodules not just checking out the code.

------------------- ----------------

-----------------------------------

可以使用MSBuild设置或传递任何参数来实现吗?

can this achievable using MSBuild settings or passing any arguments?

提前致谢




推荐答案

嗨shekartx,

Hi shekartx,

谢谢在这里发布。

>>> 可以使用MSBuild设置或传递任何参数来实现吗?

>>>can this achievable using MSBuild settings or passing any arguments?

我担心没有这样的MSBuild设置或 构建project1和子模块1,2的参数。因为没有在同一个解决方案文件中,我们无法使用MSBuild命令:

I`m afraid there is no such MSBuild settings or  arguments to build the project1 and submodules1, 2. Because there are not in the same solution file, we could not use the MSBuild command:

msbuild test.sln /t:project;project2 /p:Configuration="Release"

用于构建project1和子模块1,2。

to build the project1 and submodules1, 2.

> >> 如何从Project1构建,它将从Visual Studio构建两个子模块

>>>How to Build from Project1 which will build the two submodules from Visual Studio

在Visual Studio中,添加项目从子模块到项目1的解决方案。他们似乎生活在"外面"。关于版本控制的父解决方案。然后构建解决方案,将构建所有项目。

In Visual Studio, add the projects from the submodule to the project1`s solution. They seem to live "outside" the parent solution as far as versioning. Then build the solution, all projects would be built.

>>> 如何从TFS构建Project1

>>>How to build the Project1 from TFS

您可以添加另一个构建任务来从子模块构建项目:

You can add another build task to build the project from submodules:

希望这会有所帮助。


这篇关于关于Git子模块的MSBuild的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆