Unreal engine 4.9 -2015 not working

When running the GenerateProjectFiles.bat with the -2015 I get error saying that I dont have visual studio 2013 or 2012 installed. I dont understand because in the docs it said we just have to add -2015

Hey Mohhamed-

Are you using Windows 7, Windows 8, or Windows 10? If you are using Windows 10 then you have to enable WindowsPlatform.bUseWindowsSDK10 to use the Windows 10 SDK.

Cheers

How would do that for windows 10.

After running Setup.bat you should be able to find UEBuildWindows.cs in Engine/Source/Programs/UnrealBuildTool/Windows. Editing line 99 of this file should allow the GenerateProjectFiles.bat to run with -2015.

Do I have to recompile it to make work? And if I do how would I recompile without vs2015

The changes to UEBuildWindows.cs are made prior to generating the UE4.sln file, so you would build the solution after making these changes. If you wanted to build the engine with VS2013 instead of VS2015 after making the change you can run GenerateProjectFiles.bat again without the -2015 argument and build the UE4.sln again.