No compiler found. [Visual Studio 2017]

When trying to create a new c++ project I receive the error that “no c++ compiler could be found” followed by a prompt to install VS 2015. I have tried to change the VS140COMNTOOLS environment variable to point to the correct location but it does not work, and I continue to get the error.
I have tried a large number of fixes regarding reinstalling and cleaning up and repairing VS 2015 and 2017.
Is there a known fix?

Thanks

Hi. The for sure way (at I’ve seen) is to install VS2017 and select the UNREAL LAUNCHER as an option. All the necessary prereqs have been installed. Also, once you get it loaded, under editor prefs (or is it project, at work, can’t check) there is a drop down for the selected VS version… If you have 2015 and 2017 that’s important to have set correctly.

Hope this helps.

So should I uninstall the epic launcher and ue4, then reinstall with the launcher VS downloads? Thanks for the swift reply!

Make sure you install VS2015 with C++ support. You need to enable that in the installer since it is default off. Unreal Engine uses the VS2015 compiler, not the VS2017. You can use the VS2017 as your code editor though.

OK. The thing is I tried that before and it didn’t solve the problem at all. I’ll try again once ue 4 has reinstalled.

Hey so I uninstalled Unreal and the launcher I had, and used the one downloaded by VS 2017, and it worked!! Thanks so much, the solution was simple but not one i though of

Thanks for the advice, but the other suggestion fixed it!

Thanks for the point in the right direction, though you don’t need to install the unreal launcher through the visual studio 2017 installer, all you need to do is have VS2017 installed and manually set the code editor in the editor settings. For some reason the editor lost my value for that setting at some point, seems like other people are having the same issue.

I uninstalled the epic games launcher and re-installed using visual studio 2017 community, with checked options as they asked, I then went to the editor and changed source code launcher to visual studio 2017, And the error still appears. what should I do?

Make sure to uninstall both 2015 and 2017. and reinstall 2017 if this is what you seek. I had the same problem, I uninstalled visual studio 2017 then reinstalled it and selected unreal from game development with c++ pack. I didn’t have to uninstall unreal engine though.
this happen duo to having multiple editors on your machine

Hello

I have tried everything you have said in this thread and I still get the error “No compiler was found. In order to use a C++ template, you must first install Visual Studio 2017” as you can see in the attachments. I tried:

  1. Installing Unreal 4.16.1 first then VS Community 2017, did not work
  2. Installing first VS Community 2017 with the unreal installer checked, did not work
  3. I tried the repair option too in VS Community 2017 installer, did not work
  4. I chose a new blueprints project, and changed the project settings->toolchain and the editor settings->source code to VS 2017, then I created a new c++ class and still I get the same error and it does not let me create any c++ code

I also checked the C++ support option in the VS 2017 installer

I saw that by default the system set the ENV variable VS140COMNTOOLS to a path that DID NOT exist in my windows 10 PC: C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\Tools so I set it to a valid path in my PC: C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\Common7\Tools

Can you please help me to create a C++ unreal project? what am I missing?

Same error for me.

No compiler was found… But I have the latest VS2017 (currently 15.4.4).

How do you do that? I can’t even make a CPP project?

Hey there, apart from other solutions, check if “Visual Studio”- and Visual Studio Code Integration plugins are enabled in your project settings.

I modified the installation path of visual studio 2017 in Windows Registry Editor (RegEdit.exe). For UE4, refer to the following Registry path. Of course, there is also a way to re-install Visual Studio 2017.

QueryRegKey(HKEY_CURRENT_USER, TEXT(“SOFTWARE\Microsoft\VisualStudio\SxS\VS7”)
QueryRegKey(HKEY_LOCAL_MACHINE, TEXT(“SOFTWARE\Microsoft\VisualStudio\SxS\VS7”)
QueryRegKey(HKEY_CURRENT_USER, TEXT(“SOFTWARE\Wow6432Node\Microsoft\VisualStudio\SxS\VS7”)
QueryRegKey(HKEY_LOCAL_MACHINE, TEXT(“SOFTWARE\Wow6432Node\Microsoft\VisualStudio\SxS\VS7”)

Sorry, but can you please explain me how I must do this changes in regedit.exe? I installed VS2017 (15 version - last version VS-all packages: C++, UE4 and others also Win 8.1 SDK and Common tools ) on the disk “D” in the folder “MVS 2017 Enterprise” and packages in the folder “Visual Studio 2017”. I can’t solve this problem some days. If you write me the commands in the cmd for change regedit I will be very very glad )))) I very need your help. (P.S. all reinstalled some times(UE4 and VS2017) - didn’t help ) VS2017 words good and compile all projects Console C++ and Classic app C++

Same was happens to me when I change in Editor Preference - General - Source Code - Source Code Editor to CLion in one of my projects

When I change it back to VS17 and restart the engine, everything was fixed

This worked for me. You need to go to each of these keys and add a new string value with the name “15.0” and fill in the data with the path to your VS 2017 folder. The one with “Common7, DIA SDK, VC, VC#, etc”. For me, it was “G:\Visual Studio\2017\Community”

Hi did you find a fix for this? I am having the same problem

This fixed it for me. I had a Detective plugin I used to removed plugins for a final build and somehow I must have disabled these 2 plugins.
Big thank you!