What is the location of file:
VCVARSALL.BAT
for Visual studio 2017?
VS2017 has reworked its directory structure and filenames. You should look for the file 'vcvars.bat', which can be located in "..\Program Files (x86)\Microsoft Visual Studio\2017\EDITION\Common7\Tools\vsdevcmd\ext\vcvars.bat" (replace EDITION with the version of Visual Studio you use).
For simplicity, you can use "%VSAPPIDDIR%" in your call to point to the IDE folder where devenv.exe is located, and go back one folder to define your path to the batch file. For example:
call "%VSAPPIDDIR%..\Tools\vsdevcmd\ext\vcvars.bat"
The VC folder is within the Desktop development with C++
workload. Go to your add or remove programs and modify your Visual Studio 2017, and choose it as shown below:
click on Modify
(or Install/Setup
in other devices). Go check your folder *\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build* and you'll see the the vcvars64.bat.
To summarize, sth along the lines of
"C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat" x64
or
"C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\Tools\vsdevcmd" -arch=x64
(try running it with -help
)
My environment:
** Visual Studio 2017 Developer Command Prompt v15.0.26403.7
on Win10 x64
Hans Passant is right.
I had the same problem: no VCVARSALL.BAT
for my VS2017 and no Build
folder in Microsoft Visual Studio\2017\Community\VC\Auxiliary
.
I have Visual Studio Community 2015 and 2017 installed on the same machine.
I didn't have Desktop development with C++
check in my installation. I installed it and the Build
folder was created!
Now everything work great.
I had the same problem - was fixed by removing and reinstalling latest version of microsoft office (2017-2019) resolved the issue. The folder should exist in your MS path automatically, if its not there, uninstall and redownload and install - on my system takes around 3 hours.