Installed Visual Studio Build Tools but cannot find cl.exe

Kevin GUIMARD 40 Reputation points
2023-10-20T16:42:39.3633333+00:00

Hello,

I installed MSVC v142 - VS 2019 and the C++ SDK from the Visual Studio Installer and I rebooted.

First, for some reason, the installation is named "VS 2022", I don't know whether it's normal.

Anyway, I ran the Developer Command Prompt but cannot find cl.exe. Why?
User's image

User's image

Thanks in advance,
Kevin

Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
5,407 questions
0 comments No comments
{count} votes

Accepted answer
  1. RLWA32 46,861 Reputation points
    2023-10-26T11:34:43.4333333+00:00

    If you only want to be able to build from the command line you can download the separate Build Tools for VS2019. Navigate to https://visualstudio.microsoft.com/vs/older-downloads/

    Expand the selections for 2019 and you should see this -

    tools2019

    After clicking the Download Button and signing in successfully you should see something like this-

    toolsdown2019


2 additional answers

Sort by: Most helpful
  1. Tianyu Sun-MSFT 32,781 Reputation points Microsoft Vendor
    2023-10-23T07:28:12.7866667+00:00

    Hello @Kevin GUIMARD ,

    Welcome to Microsoft Q&A forum.

    Please make sure that you have installed the Desktop development with C++ workload(VS Installer > Modify > Workloads).

    User's image

    Best Regards,

    Tianyu


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


  2. Andrew Leech 0 Reputation points
    2024-07-29T01:38:59.7866667+00:00

    I think I just ran into this same issue; I wanted to simply be able to compile python extensions without needing a full VS install.

    I'm sure that just install visual studio build tools with choco used to work perfectly for this. Not anymore...

    I installed choco install visualstudio2019buildtools which ran without fail. Opened a developer terminal from the new start menu entry named as such, found the cl.exe wasn't available.

    The "solution" / workaround was to scan the choco install log for the folder of the install setup and run that manually (gui) . "C:\Program Files (x86)\Microsoft Visual Studio\Installer\setup.exe"

    Then in the gui, modify the build tools intallation and enable the Desktop development with C++ as suggested. I'm sure there's a way to do this with just choco, but this is how I got there.

    Again, I'm sure this used to work without the annoying manual fuss? Perhaps this is just a passive/agressive move to push people to dotnet rather than using C ? Regardless, the pain of just trying to install a compiler on windows and then find and run it continues to push me towards linux / wsl as much as possible.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.