Search code examples
tfsmsbuildazure-devopstfsbuildazure-pipelines

TFS / msbuild, building project references


I'm struggling to get Azure Devops Server 2019 (on prem) to build a complicated project setup of mine.

I have multiple solutions that build various BizTalk apps. Some of these solutions references some of the projects in other solutions/repos. This works fine in Visual Studio (providing everybody names their repos as the default, which they do).

To automate this build, I've created a multi-stage build pipeline that builds each solution in order.

Whilst solution 1 will build successfully, when it comes to solution 2, the msbuild tasks will not reference the outputs for the projects that have been included as a project reference in the solution.

This seems to be because these referenced projects aren't marked for build - because they wouldn't be able to build themselves without them in turn referencing their other projects in the main solutions etc.

Bundling everything into one big super solution file is not feasible.

I'm wanting msbuild to /reference the projects that have already been built in the previous step, as per being included as project references. But msbuild is a complicated beast and I cannot figure out a way of achieving this.

Is what I'm trying to achieve even possible? Can anybody point me in the right direction?


Solution

  • It seems that msbuild was changed to only reference project references, and that you can revert that to reference all references by setting the property OnlyReferenceAndBuildProjectsEnabledInSolutionConfiguration to true when running msbuild.

    Source: https://stackoverflow.com/a/25144169

    Have confirmed this works.