Open ashishchettri opened 4 years ago
@ashishchettri thanks for reaching out.
I am a little confused by this issue, and I want to make sure that we are talking about the same thing. You start the issue by saying that there is an error when attempting the installation of the sonarscanner package, and then you talk about installing Chocolatey via the default PowerShell command.
Assuming that you are using the Hosted Azure Build Agent, installing Chocolatey should not be required, as Chocolatey is already installed on the base image. If you are not running on a Hosted Azure Build Agent, then as per the note here: https://github.com/gep13/chocolatey-azuredevops#tasks you will need another Task to perform the installation of Chocolatey.
If you can elaborate on exactly the problem that you are having, hopefully we will be able to help you.
Expected Behavior
I am trying to install a package but keep getting a "##[error]Cannot bind argument to parameter 'Path' because it is null". The yaml is as follows:
What I expected was it to run the way
choco install sonarscanner-msbuild-net46 --force
works when installing the package directly using powershell.Current Behavior
I get a "##[error]Cannot bind argument to parameter 'Path' because it is null".
Possible Solution
I went ahead and installed chocolatey using the default powershell commands -
Steps to Reproduce (for bugs)
Context
We are using chocolatey to install a sonarscanner so that we can run static analysis.
Your Environment