developer9969
developer9969

Reputation: 5226

How to setup submodules Azure DevOps

Can somebody clarify how SubModule works in azure devops

MyDevOps Root Folder

I have a Solution called MyCore.sln containing 4-5 projects

I have my Main Solution called MyMain.sln containing another 4-5 projects project referencing MyCore.sln projects

Am I missing the obvious?

Are there any comprehensive instructions on how to setup submodules in azure devops?

Can I visualize this anywhere?

Upvotes: 15

Views: 37885

Answers (2)

mahdi
mahdi

Reputation: 388

Go Project Settings=>Settings(The project where your pipeline exists), disable these two limitations: enter image description here

Upvotes: 2

jessehouwing
jessehouwing

Reputation: 114491

In the advanced section of the Get Sources step you need to enable the Checkout Submodules option.

enter image description here

If you're using YAML builds, you need to add:

steps:
- checkout: self
  submodules: true

As to your follow-up questions:

Where should I put my solution files

Ideally, you'd have a single solution, since you expect these projects to build together. Having multiple solutions will be awkward. If you want to share the components from one solution, you are probably better off publishing the projects from your 2nd repo as NuGet packages.

Upvotes: 19

Related Questions