I have these variables for my pipeline:
variables:
webProject: 'Company.Web'
dbProject: 'Company.Database'
And then later, I use those variables in a dotnet cli task:
# stage/job setup
- task: DotNetCoreCLI@2
displayName: Clean
inputs:
command: custom
projects: '**/$(webProject).csproj'
custom: clean
arguments: '--configuration "$(BuildConfiguration)"'
- task: DotNetCoreCLI@2
displayName: Restore
inputs:
command: custom
custom: restore
projects: |
'**/$(webProject).csproj'
'**/$(dbProject).csproj'
# rest of yaml
When I run the pipeline, I get this error: Project file(s) matching the specified pattern were not found.
What is strange is it works ok for the clean task, but the restore fails. I was able to confirm with a echo script the variable is being rendered correctly. I also am able to replace the variable with the variable text in the script and it runs just fine when I do that. Any idea what I am missing here?