How to handle linked projects in Azure DevOps Pipelines?

Viewed 47

I have two projects inside my Azure DevOps Organization.

Inside my local repository i used Visual Studio, to link from one project to the other one, what results in a entry in the sln and csproj. Surely inside Azure DevOps that local reference can't resolved automatically. But how can i link the pipeline while the build process to the other project?

1 Answers

Whilst checking out multiple repositories is possible, I'm not sure this is the right solution here, because you would have to build the csproj separately and not as part of the sln file, plus having to keep the folder structure in sync with how you build locally.

I can see two better ways of doing this:

  1. Keep the csproj in your solution and in the same Git repo. If the project is a library that needs to be used elsewhere, you could publish it as a NuGet package as well as part of the build.
  2. Have your library csproj live in a separate repository and publish it as a NuGet package to your own Azure Artifacts feed, and consume the package in your main solution.
Related