Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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'
like image 948
BrunoMartinsPro Avatar asked Dec 31 '22 20:12

BrunoMartinsPro


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.

like image 160
Shayki Abramczyk Avatar answered Jan 14 '23 00:01

Shayki Abramczyk