On Azure DevOps, I want to configure the .NET Core CLI task so that it executes restore with runtime win-x86.
I tried this configuration:
- task: DotNetCoreCLI@2
displayName: 'Restore NuGet'
inputs:
command: 'restore'
projects: './src/MySolution.sln'
feedsToUse: 'config'
nugetConfigPath: './NuGet.config'
arguments: '--runtime win-x86'
...which I thought would add --runtime win-x86 to the executed command. However, the command that gets executed...
/usr/bin/dotnet restore /home/vsts/work/1/s/./src/MySolution.sln --configfile /home/vsts/work/1/Nuget/tempNuGet_158.config --verbosity Detailed
...is missing the runtime option.
restore with runtime win-x86?I first tried to determine if there was something wrong with the documentation of the .NET Core CLI task by creating this issue, but it was closed without any dialog, and I was essentially told to post my question on SO instead.
I don't know why, but it look like the version 2 of the task DotNetCoreCLI can't take another arguments in the restore command.
Switch the version to 1 - DotNetCoreCLI@1 and it will work:

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With