Azure DevOps YAML - Restore Multiple Projects Manually

Viewed 3427

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'
1 Answers

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.

Related