New C++ project: Visual Studio 2015 Update 3 required. I have Update 3.
Hi there; I recently installed version 4.17.0 and tried creating a new C++ project. Upon trying to compile it I receive an error notifying me that I must have Visual Studio 2015 Update 3 installed:
I have Visual Studio 2017 as well as 2015 Update 3 installed. I've tried rebuilding with both and recieve the same error. 4.15 and 4.16 work fine. Any suggestions?
I believe I found the issue and a workaround. This problem is due to the way that Unreal Engine looks for the MSBuild.exe program that is used in the GenerateProjectFiles.bat script. It first looks for MSBuild 14, which is the one used for Visual Studio 2015. If it can't find it, THEN it looks for MSBuild 15 (used for VS 2017). So if you have your PC currently has MSBuild 14 installed on it, that is what will be used.
The workaround is to remove or rename the MSBuild 14 install directory located most likely at ProgramFiles(x86)/MSBuild/14.0. I chose to rename it to "OLD14.0" in case I need to bring it back.
After this, attempt to create a new C++ project. It should now use the MSBuild 15 in the background to generate the correct VS 2017 files for your project.
I think the actual solution to this issue is to change the GetMSBuildPath.bat file to by default look for MSBuild 15 exe instead of 14.
EDIT: If this did not fix your issue, it may be because the Registry Key that points to MSBuild 14 on your machine is pointing to something other than the default location in Program Files shown above. If that is the case, you would need to look in the registry to find the "Microsoft\MSBuild\ToolsVersions\14.0" registry key in either the Current User or the Local Machine Software stores.
If you have source access, you can see the order that this process happens in the "/Engine/Build/BatchFiles/GetMSBuildPath.bat" file. I have a PR up to make it so the batch file attempts to find MsBuild 15 first and use that if found.
The latest version of 2017 and into the future will need this added to "/Engine/Build/BatchFiles/GetMSBuildPath.bat"
Follow this question
Once you sign in you will be able to subscribe for any updates here