# Visual C++ & C++ Programming > Visual C++ Programming >  How to set up environment for building VS2017 and VS2015

## WhatNow46

I have an app to work on that I used to build with Visual Studio 2015 Update 3.  Any environment variables I have set are for that environment:

If I type the command set | more about all I see is a few variables set and they refer only to Visual Studio 2015.  When I ran the VS2017 vsvars.bat
in the ext folder, it doesn't set anything.  I guess it expects some sort of environment variable to be set to choose which compiler I want to use.
This is awkward as when I went to install Qt for a project I'm working on the following command fails even though it "detects" the compiler.  I'm not sure
it fails due to that issue - I just need to start somewhere.  How can I tell the PC to use the newer version other than when I'm in the older Visual Studio 
where I do the builds mostly within the IDE.  Is there a document or helpfile that explains any of this?  Here is the command that fails and which
variables I see when I type set | more (none of the below refers to Visual Studio 2017 other than things it has to "inherit" from perhaps):

VS110COMNTOOLS=C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\Tools\
VS120COMNTOOLS=C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\Tools\
VS140COMNTOOLS=C:\VSEN15U3\Common7\Tools\
VSSDK140Install=C:\VSEN15U3\VSSDK\

vcpkg install --triplet x64-windows qt5-base qt5-tools.

The above command fails on building x64-windows after about the 11th package on some sort of thing it can't find a suitable
hash.  And the include file referenced is from the VS2015U3 directory so it detects the older compiler.

Again, I'm not sure that that is the issue, maybe it's something else.

But it would help me to know how to have vcpkg know which compiler to use - I want to force it to use the later compiler, 
Visual Studio 2017.

I haven't been using anything other than 2015 for command-line builds with cmake or whatever so I realize I'm way out of
date but I need to get up to speed on the newer compilers.  I will be installing other new compilers too.  I just don't get
any response when I run any of the .bat files that I find under Common7\Tools.  There are a bunch of them, if anyone knows
what their purposes is or really good document that explains it, it might help, thank you.  I don't understand why
Microsoft has an installation of Visual Studio which I installed to my c:\VS2017 directory and doesn't update all the
paths to include files and other libs and stuff automatically.  And why do they still put common stuff forced into
the stupid Program Files x86 directory which is a dumb path to have to type.  I was unable to change that in the
path.  Perhaps I had need to back when I installed VS2015 more naively.  I can't stand the whole idea of a Program Files
directory.  Whoever thought of it was an ignoramus.  Why not just call it Apps or something else shorter.

----------

