Can't compile code in UE4 (Cant find windows.h)

I’m going to start by saying it was my fault. I deleted windows 8.1 sdk manually and then installed it with the installer. Thats when UE4 stopped compiling code for me. The project goes to add code then fail at 85% everytime. And I get this output in return.

Running C:/Program Files/Epic Games/4.10/Engine/Binaries/DotNET/UnrealBuildTool.exe  -projectfiles -project="A:/UnrealProjects/MyProject7/MyProject7.uproject" -game -rocket -progress -2015
Discovering modules, targets and source code for game...
LogHotReload: Recompiling module MyProject7...
LogVSAccessor:Warning: Couldn't access Visual Studio
Recompiling MyProject7...
Launching UnrealBuildTool... [C:/Program Files/Epic Games/4.10/Engine/Binaries/DotNET/UnrealBuildTool.exe MyProject7 -Module MyProject7 Win64 Development -editorrecompile -canskiplink "A:/UnrealProjects/MyProject7/MyProject7.uproject" -rocket  -rocket -2015]
Performing full C++ include scan (hot reloading a new target)
Creating makefile for hot reloading MyProject7 (no existing makefile)
Compiling game modules for hot reload
Performing 6 actions (9 in parallel)
[2/6] Resource PCLaunch.rc
[3/6] Resource ModuleVersionResource.rc.inl
C:\Program Files\Epic Games\4.10\Engine\Source\Runtime\Launch\Resources\Windows\PCLaunch.rc(10) : fatal error RC1015: cannot open include file 'windows.h'.
C:\Program Files\Epic Games\4.10\Engine\Source\Runtime\Core\Resources\Windows\ModuleVersionResource.rc.inl(3) : fatal error RC1015: cannot open include file 'windows.h'.
PCH.MyProject7.h.cpp
c:\program files\epic games\4.10\engine\source\runtime\core\public\Windows/MinWindows.h(62): fatal error C1083: Cannot open include file: 'windows.h': No such file or directory
-------- End Detailed Actions Stats -----------------------------------------------------------
ERROR: UBT ERROR: Failed to produce item: A:\UnrealProjects\MyProject7\Binaries\Win64\UE4Editor-MyProject7.dll
Total build time: 5.95 seconds
CompilerResultsLog: New page: Compilation - Mar 21, 2016, 3:27:54 PM
CompilerResultsLog: Info Performing full C++ include scan (hot reloading a new target)
CompilerResultsLog: Info Creating makefile for hot reloading MyProject7 (no existing makefile)
CompilerResultsLog: Info Compiling game modules for hot reload
CompilerResultsLog: Info Performing 6 actions (9 in parallel)
CompilerResultsLog: Info [2/6] Resource PCLaunch.rc
CompilerResultsLog: Info [3/6] Resource ModuleVersionResource.rc.inl
CompilerResultsLog:Error: Error C:\Program Files\Epic Games\4.10\Engine\Source\Runtime\Launch\Resources\Windows\PCLaunch.rc(10)  : fatal error RC1015: cannot open include file 'windows.h'.
CompilerResultsLog:Error: Error C:\Program Files\Epic Games\4.10\Engine\Source\Runtime\Core\Resources\Windows\ModuleVersionResource.rc.inl(3)  : fatal error RC1015: cannot open include file 'windows.h'.
CompilerResultsLog: Info PCH.MyProject7.h.cpp
CompilerResultsLog:Error: Error c:\program files\epic games\4.10\engine\source\runtime\core\public\Windows/MinWindows.h(62) : fatal error C1083: Cannot open include file: 'windows.h': No such file or directory
CompilerResultsLog: Info -------- End Detailed Actions Stats -----------------------------------------------------------
CompilerResultsLog: Info ERROR: UBT ERROR: Failed to produce item: A:\UnrealProjects\MyProject7\Binaries\Win64\UE4Editor-MyProject7.dll
CompilerResultsLog: Info Total build time: 5.95 seconds
LogMainFrame: MainFrame: Module compiling took 5.992 seconds

I’ve check my registry to and they all pointing to the proper install directory, checked my environment variables and those are fine as well. And now I dont know where else to check. I’ve tried just making a c++ file and even that gave me errors. I uninstalled Visual Studio and UE4 multiple times (shutting off after each install/reinstall)

link text

I ran the Lincolns’ get_vs_environment bat and included the info in here. I’m really at a loss of what to do next other than a complete wipe(which i would prefer to not do)

UPDATE - I elected to uninstall all of UE4 and VS ( I had both 2013 & 2015 ) I’m thinking that when I deleted the win8.1 sdk and then reinstalled it the directories were looking for the original sdk. I’ll be reinstalling everything today. Are there any registries I should look to remove?

Hi

I have exactly the same bug: LogVSAccessor:Warning: Couldn’t access Visual Studio

Reinstalling VS 2013, VS 2015 and UE4 didn’t solve the problem for me. Did you find a solution?

Hello everyone,

Sorry for the delayed response. Errors RC1015 and C1083 usually come together, and typically point to problems with the SDK. If you have reinstalled the Windows SDK and are still seeing these errors, that could be indicative of a larger issue.

SalihBalkan, could you please download this file to your desktop, remove the .txt extension, and run the file? It will create a new Info.txt file that would be helpful if you could upload that file back here.