Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

qt-creator 4.8 not detecting VS 2017 in Kits



  • Hi,

    My QtCreator (latest version, 4.8, updated yesterday) does not detect Visual Studio 2017 and any of its compilers. If relevant, the exact version is VS 2017 15.9.4.

    This is quite shocking. What's going on? This is a clean install.

    VS and the compilers are installed in the default locations:
    C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Tools\MSVC\14.16.27023
    and
    C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Tools\MSVC\14.11.25503
    with cl.exe for example being in:
    "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Tools\MSVC\14.16.27023\bin\Hostx64\x64\cl.exe"

    Please don't tell me that QtCreator hasn't been updated to accommodate Microsoft's "new" installation folder layout yet? I say "new" because it's over a year old.....

    I guess I could potentially add it manually?
    But there's way too many options and I have no idea what they are ("Make path", "Header paths", "Qt mkspecs"....)... no idea how to even start!
    0_1545012247288_f23bc530-74ed-4447-a2d8-f3fa36fc83c1-image.png

    I sincerely hope that there's an easy fix to this.

    Thanks.


  • Lifetime Qt Champion

    @Jimmy03 said in qt-creator 4.8 not detecting VS 2017 in Kits:

    I guess I could potentially add it manually?

    As far as I know, no.

    From your post I read, that you had a running installation before?

    • Which Creator version was that?
    • What exactly did you do to upgrade?

    The only thing I can say for now, is that Creator looks up a registry key to locate the vcvars*.bat and then runs it to setup the MSVC environment. There has been some changes there in the last releases because of problems with anti virus software.

    Do you have some anti-virus running? Which one?



  • @aha_1980 Hi, Thanks for the reply!

    Well, I've had VS 2015 installed too (this lived under C:\Program Files (x86)\Microsoft Visual Studio 14.0), and QtCreator detected that in the Kits section and used that. So I tried to add my VS 2017 installation as a Kit but didn't get too far. Because I never intended to use VS 2015 and I also have no need for it anymore, I then uninstalled it yesterday (and I thought that might convince QtCreator to "find" VS 2017...). Unfortunately this now left me with no Kits at all in QtCreator and it still doesn't detect VS 2017.

    I don't have any anti-virus software installed or running, except for Windows Defender.

    I do have the vcvars*.bat files and I am using them to open compiler command-lines, so all should be fine with them.

    So according to your post, QtCreator is supposed to support the new VS 2017 installation layout (where you can have multiple toolchains installed side-by-side, as quoted in my post above)?


  • Lifetime Qt Champion

    @Jimmy03 said in qt-creator 4.8 not detecting VS 2017 in Kits:

    So according to your post, QtCreator is supposed to support the new VS 2017 installation layout (where you can have multiple toolchains installed side-by-side, as quoted in my post above)?

    Honestly, I don't know, but I never heard anyone before complaining about that, so I guess that should work.

    Can you try to re-install VS2017. And just to make sure: Do you have the C++ compilers selected when installing VS?



  • @aha_1980 Okay!

    Yes, I do have the C++ compiler selected and I've got the two C++ compiler toolchains installed that I posted in my first post. When I use VS 2017 directly, or VS with CMake, everything works just fine, it's just that QtCreator can't find any of my VS 2017 toolchains, and I highly suspect it might be because I used the "new" VS 2017 installer ("new" as in at least a year old) which uses the "new" side-by-side toolchain layout. Maybe the QtCreator users are really slow at adopting such new stuff...?

    But yea I guess I have to try to re-install VS 2017.



  • So, interestingly, reinstalling VS 2017 fixed it and QtCreator recognised the MSVC++ 15.0 suite of compilers now. Seems to work fine now!
    I wonder what bug in QtCreator this is that it couldn't work before.
    Thanks for the help @aha_1980.

    Now what I am wondering is how to select the actual toolset version, i.e. as I mentioned VS 2017 allows side-by-side installations of different toolset (compiler) versions - you can have 14.0, 14.1, 14.11, ..., 14.16 all installed side-by-side.
    They (and the respective cl.exe plus all other tools/headers) reside in e.g.
    C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Tools\MSVC\14.16.27023
    C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Tools\MSVC\14.11.25503.
    I will leave this for another day. But it would be great if QtCreator had support for this.


  • Lifetime Qt Champion

    @Jimmy03 said in qt-creator 4.8 not detecting VS 2017 in Kits:

    Glad you got it working!

    I will leave this for another day. But it would be great if QtCreator had support for this.

    I honestly can't tell you about that - I'm mostly working on Linux. Probably someone else can...


Log in to reply