git sub modules visual studio 2017 not downloading

2020-06-06 05:50发布

问题:

We have started to make use of git submodules as a way to reuse common code across projects

We have a simple rule at work, when people get your code it should build first time and your code should build on visual online without to much fuss.

If I add shared code via a git submodule then in order to build it first time we need to run

git submodule update --init --recursive

and to update

git submodule update --update --recursive

Can I avoid the need to run the above commands? can VS be configured to pull the sub modules?

I have looked to see if a nuget package is available that adds this is a build step.

Interestingly visual studio online will pull a git sub module via its advanced settings

git modules and VS are disucsseed in Git SubModule Visual Studio but its not quite the same issue, just very basic support would be a good start.