Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to build only a specific project and it's dependencies with DevOps Pipelines

I'd like to know if this is possible, and if so, how to do it. If I have a Visual Studio Solution with multiple projects, and websites, and I want to build and publish only a specific website and it's dependencies, how could it be done when using DevOps Pipelines, so it does not build the whole solution, but only the required projects for that specific website. All I have seen so far is build all the projects in the directory and then selec a specific artifact to publish, but that means build all the projects in the chosen directory.

like image 563
Eduardo Fonseca Avatar asked Apr 16 '19 16:04

Eduardo Fonseca


People also ask

What are the two types of pipeline in DevOps?

Continuous integration/continuous delivery/deployment (CI/CD)

What are the two ways for Azure pipelines to be built?

Azure DevOps supports two forms of version control - Git and Azure Repos. Any changes you push to your version control repository will be automatically built and validated.


1 Answers

If you want to only build a single project in your solution, you could use the MSBuild task in Azure Devops Pipelines and then point it to the project you want to build. Another way would be to in your VS solution to edit the Configuration Properties. In the Configuration Manager you can create a Configuration called Single_Project or something like that and then in the properties select which projects to build when using that configuration. Then when you use the VS Build task and specify the configuration you created for your build.

like image 114
Setorica Avatar answered Nov 13 '22 03:11

Setorica