1
votes

We have recently moved to TFS2015 and are in the process of evaluating using git over TFVC. One thing we quickly realized was that the 'one big repo' approach would not function at all with continuous integration, as TFS does not currently support CI build definitions monitoring a subdirectory within a git repo.

So we are trying to use multiple repos, one per solution, and use submodules to handle dependencies. Generic layout:

CommonLibraryRepo
Component1Repo
----Submodule pointing to CommonLibraryRepo

and so on. Repo per component, and a submodule for each referenced component within.

The build is able to retrieve 'Component1Repo' along with the 'CommonLibraryRepo' submodule just fine. The problem arises when we want to clone from TFS within Visual Studio. We press 'Connect', choose the repo, then clone it locally, but the submodule folder is just empty. I have just updated to VS2015 Enterprise update 1, but the issue does not seem to be resolved.

The feature seems to have been requested here:

https://visualstudio.uservoice.com/forums/330519-team-services/suggestions/3606383-add-submodule-support-in-visual-studio-git-extensi

and based on the comments there, it would seem it has actually been implemented (see comments from 'Daniel' and 'MMmmm'.) I'm having different results, though.

My specific questions:

  • Is it possible to do a recursive clone, retrieving submodules, from within Visual Studio (without the git cli)?
  • Is there a better repo structure (either utilizing submodules or not) to support multiple solutions, with references between them, while still being able to utilize current TFS2015 CI limitations?
1
Visual Studio 2015 Update 2 has support for submodules.Morten Frederiksen

1 Answers

2
votes

I have the same problem. Visual Studio 2015.1 is currently not able to check out submodules, neither on clone nor when switching branches. The workaround for me was to switch branches with SmartGit or using plain git commands.