jberezanski / ChocolateyPackages

Chocolatey packages maintained by me
MIT License
83 stars 51 forks source link

visualstudio2022buildtools not installing linker #147

Closed barlog-m closed 5 months ago

barlog-m commented 1 year ago

choco install -y visualstudio2022buildtools

run "Developer Command Prompt for VS 2022" app from start menu

**********************************************************************
** Visual Studio 2022 Developer Command Prompt v17.6.4
** Copyright (c) 2022 Microsoft Corporation
**********************************************************************

C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools>link.exe
'link.exe' is not recognized as an internal or external command,
operable program or batch file.

C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools>ver
Microsoft Windows [Version 10.0.22621.1848]

Could you please tell me what am i doing wrong?

jberezanski commented 9 months ago

The visualstudio2022buildtools package by default only installs the minimal Build Tools, without any additional components/workloads (just like the interactive installer does if you do not select anything). I'm guessing link.exe is part of the C++ tools, so you probably need the Desktop development with C++ workload (Microsoft.VisualStudio.Workload.VCTools). You can easily install that workload via Chocolatey using the visualstudio2022-workload-vctools package.