Multiple Project Deployment with Azure DevOps – Part 1

In this article I will demonstrate how to create multiple builds and releases for a single Visual Studio solution that contains multiple projects.

I want to create a separate build and release pipeline for each project.

The repository that I use for this article can be found at , it is composed of a single solution, SampleApp, containing three projects, SampleWebApp, a .NET Core Web App, SampleWebApi, a .NET Core Web Api and SampleFuncApp, a .NET Core Azure Function.

I named my project SampleApp with a single repository.

Navigate to Pipelines, click New and then New build pipeline.

Click Use the classic editor.

By default, the first repository will be selected for you, just click Continue.

In the search box type Core.

Select ASP.NET Core and then click Apply.

In a future article I will show how to do this YAML, but as of this time, the YAML

Since we only want to work with a single project, we need to provide the directory to our project, along with any test projects.

Type SampleWebApp/*.csproj for Project(s) to restore and build.

Type SampleWebAppTests/*.csproj for Project(s) to test.

I only want the build to kick off if some of the files actually changed in the SampleWebApp project.

To do this, we will make use of the Path Filters properties in the Triggers settings for the build.

Check Enable continuous integration.

Under Branch Filters, click Add and add the master branch. Anytime there is a commit to the master branch a build will start.

Under Path filters, we need to specify the paths to look for file changes, you will want to include /SampleWebApp and /SampleWebAppTests. If you shared code with either of these projects you would want to be sure to include those project paths.

We are now ready to kick-off our first build.

Click Save & queue and then Save & queue.

When prompted to Save build pipeline and queue, click Save & queue.

Assuming everything was setup correctly, our first build is created.

You can get to the build quickly by clicking the build number located in the green information bar.

Now you can sit back and watch the build do it’s stuff.

Wash, rinse and repeat for the SampleWebApi and SampleFuncApp projects.

Leave a Reply

Your email address will not be published.