Apply the Visual Studio developer environment

The Visual Studio C++ compiler requires several environment variables to be set in order to successfully compile your code. If you are using a Windows machine with the Visual Studio C++ compiler, there are two ways you can ensure the environment is applied.

You only need to do one of the following:

To relaunch VS Code using the Developer Command Prompt for VS

  1. Close the current instance of VS Code.

  2. Open the Developer Command Prompt for VS by typing developer in the Windows Start menu then select the Developer Command Prompt for VS.

  3. Type code into the command prompt and hit enter. This should relaunch VS Code in the same workspace and take you back to this walkthrough.