0
votes

I would like to fully automate my current application deployment process.

I have big project in Azure DevOps. Code was writen on C# for .Net core. The Solution consists 3 sites and 2 windows service application (build to msi file). When I was creating Pipelines and choose "Azure Repos Git" and click on my project then in Configure your pipeline choose "ASP.NET CORE". On "Review your pipeline YAML" I have a problems.

How can I in YAML file point to the site I want to build?

1
Hi @Andrew19_1. Is there any update about this ticket? You could refer to the answer and check if it could give you some help. If it could work, you may consider accepting it as answer.Kevin Lu-MSFT

1 Answers

0
votes

How can I in YAML file point to the site I want to build?

When you use the Asp.net Core Yaml template, it will use the dotnet build script to build your project. You could add the target path to the dotnet build command.

For example:

trigger:
- master

pool:
  vmImage: 'ubuntu-latest'

variables:
  buildConfiguration: 'Release'

steps:
- script: dotnet build **/*.csproj --configuration $(buildConfiguration)
  displayName: 'dotnet build $(buildConfiguration)'

On the other hand, I recommand you to use the task to run the build.

- task: DotNetCoreCLI@2
  inputs:
    command: 'build'
    projects: '**/*.csproj'
    arguments: '--configuration $(BuildConfiguration)'

You could add the specific path is in the projects field.

Here is a doc about DotNetCoreCLI task and Task introduction.