Visual Studios builds the UE4 solution, but fails to build the project solution?

Hey all!

I had C++ working on my computer working before, and I was able to create c++ projects no problem. Then I believe that I was trying to move files onto my other drive in my desktop in order to conserve space, and I have certainly broken it. Well, I’ve uninstalled and all versions of Visual Studios from my PC (2015 and 2017 - reinstalled '17), as well as uninstalled and reinstalled the Windows 10 SDK (Did not do this with the Windows 8 SDK). Any help is greatly appreciated, and I hope I put enough information here for you all.

Below is the output log from an attempt at building in VS:

1>------ Build started: Project: UE4, Configuration: BuiltWithUnrealBuildTool Win32 ------

2>------ Build started: Project: BattleCar, Configuration: Development_Editor x64 ------

2>Creating makefile for BattleCarEditor (no existing makefile)

2>Performing 17 actions (4 in parallel)

2>[2/17] Resource PCLaunch.rc

2>[3/17] Resource ModuleVersionResource.rc.inl

2>E:\Program Files\Epic Games\UE_4.17\Engine\Source\Runtime\Launch\Resources\Windows\PCLaunch.rc(10): fatal error RC1015: cannot open include file ‘windows.h’.

2>

2>E:\Program Files\Epic
Games\UE_4.17\Engine\Source\Runtime\Core\Resources\Windows\ModuleVersionResource.rc.inl(3): fatal error RC1015: cannot open include file ‘windows.h’.

2>

2>SharedPCH.Engine.cpp

2>e:\program files\epic games\ue_4.17\engine\source\runtime\core\public\windows\WindowsSystemIncludes.h(27): fatal error C1083: Cannot open include file: ‘intsafe.h’: No such file or directory

2>ERROR : UBT error : Failed to produce item: E:\Fall2017Documents\CPP\BattleCars\BattleCar\Binaries\Win64\UE4Editor-BattleCar.dll

2>Total build time: 4.54 seconds (Local executor: 0.00 seconds)

2>C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\IDE\VC\VCTargets\Microsoft.MakeFile.Targets(44,5): error MSB3075: The command ““E:\Program Files\Epic Games\UE_4.17\Engine\Build\BatchFiles\Build.bat” BattleCarEditor Win64 Development “E:\Fall2017Documents\CPP\BattleCars\BattleCar\BattleCar.uproject” -waitmutex” exited with code 5. Please verify that you have sufficient rights to run this command.

2>Done building project “BattleCar.vcxproj” – FAILED.

========== Build: 1 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

Mind uploading your code?
Additionally, try running VS as admin.

Hey sorry, I should have put this in the original description, but it is failing the initial build/compilation of a new c++ project

@ToTheSol I’m gonna need more information, if you can upload the source code to Gist (or Pastebin), and add a screenshot of the error itself please.

Try to re-generate your ue4 project by UnrealBuildTool or ‘Generate Visual Studio project files’ in right-menu.