BrunoMartinsPro
BrunoMartinsPro

Reputation: 1856

Azure DevOps YAML - Restore Multiple Projects Manually

I'm using Azure DevOps with .Net Core Restore, but specifying multiple projects (line by line like in VSTS) outputs "No files matched the search pattern.".

If there is only one project it works, how can i do this with multiple projects?

- task: DotNetCoreCLI@2
  name: "ProvisionRestoreProjects"
  inputs:
    command: 'restore'    
    projects: '**/ProjectA.csproj
**/ProjectB.csproj'
    feedsToUse: 'select'
    vstsFeed: 'MyFeedArtifact-master'
    arguments: '--configuration release  --no-cache'

Upvotes: 11

Views: 8351

Answers (1)

Shayki Abramczyk
Shayki Abramczyk

Reputation: 41775

You can specify multiple projects in this way:

- task DotNetCoreCLI@2
  inputs:
    commands: restore
    projects: |
     **/ProjectA.csproj
     **/ProjectB.csproj
    vstsFeed: 'my-feed'

I guess you used the Tasks helper and you got the yaml generated, but I think there is a bug there.

Upvotes: 26

Related Questions