Installation unsuccessful: Chocolatey installation on VS Code via CMD / Power Shell

417 Views Asked by At

I was installing node.js and, during the installation, was given the option to also install Chocolatey. The first issue was, it didn't install. The error will be attached below.

I then ran CMD as an administrator and wrote choco upgrade -y visualstudio2019-workload-vctools
This, also, did not solve the issue. I rather got the same error message, which is -

ERROR: Unable to detect any supported Visual Studio product. You may try passing --installPath or both --productId and --channelId parameters.

The upgrade of visualstudio2019-workload-vctools was NOT successful.

Error while running 'C:\ProgramData\chocolatey\lib\visualstudio2019-workload-vctools\tools\ChocolateyInstall.ps1'.

See log for details.

Chocolatey upgraded 0/1 packages. 1 packages failed.

See the log for details (C:\ProgramData\chocolatey\logs\chocolatey.log).

Failures

- visualstudio2019-workload-vctools (exited -1) - Error while running 'C:\ProgramData\chocolatey\lib\visualstudio2019-workload-vctools\tools\ChocolateyInstall.ps1'.

See log for details.

Attempts:

  • To install automatically, failed

  • To install by running CMD as an administrator and writing choco upgrade -y visualstudio2019-workload-vctools

  • Uninstalled node.js and repeated the first step.

Expectation:

  • To install Chocolatey, failed regardless.
1

There are 1 best solutions below

1
pauby On

Don't install Chocolatey CLI using nodejs. Install Chocolatey CLI on it's own.

The other error you got tells you what the issue is:

ERROR: Unable to detect any supported Visual Studio product. You may try passing --installPath or both --productId and --channelId parameters.

It can't detect any supported Visual Studio product, so perhaps you don't have one installed?