Azure YAML build; build only single project in solution?

Viewed 3229

I have multiple projects - they are logic apps - under a solution

ProjectA
projectB
...
projectF

I have created a YAML build task using the VS build task, however I want to build only a particular project and have individual YAMLs for each project (logic app). Using the solution: parameter I can only target the .sln file which builds every project (logic app) under that solution...

Is it possible to target a single project?

1 Answers

We can build a single project via the task Visual Studio Build. If you want to build a single project, please use the solution: {.csproj file path} parameter and enter the .csproj file, it will only target one project.

In addition, please check the .csproj file and make sure that there are no dependencies between the projects.

Sample

steps:
- task: VSBuild@1
  displayName: 'Build .csproj file'
  inputs:
    solution: {.csproj file path}
    vsVersion: 16.0
    platform: '$(BuildPlatform)'
configuration: '$(BuildConfiguration)'
Related