Project won't build, unknown error

I tried to build my project to see if it works but I got this log, how can I fix it:


MainFrameActions: Packaging (Windows (64-bit)): Project.Build: ********** BUILD COMMAND STARTED **********
MainFrameActions: Packaging (Windows (64-bit)): CommandUtils.Run: Run: C:\Program Files\Epic Games\4.12\Engine\Binaries\DotNET\UnrealBuildTool.exe Subject_A119 Win64 Shipping -Project=E:\Unreal_Game\Subject_A119\Subject_A119.uproject  E:\Unreal_Game\Subject_A119\Subject_A119.uproject  -remoteini="E:\Unreal_Game\Subject_A119" -noxge -generatemanifest -NoHotRe
loadFromIDE
MainFrameActions: Packaging (Windows (64-bit)): UnrealBuildTool: ERROR: System.UnauthorizedAccessException: Access to the path 'C:\Program Files\Epic Games\4.12\Engine\Intermediate\Build\LastBuiltTargets.txt' is denied.
MainFrameActions: Packaging (Windows (64-bit)): UnrealBuildTool:    at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
MainFrameActions: Packaging (Windows (64-bit)): UnrealBuildTool:    at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
MainFrameActions: Packaging (Windows (64-bit)): UnrealBuildTool:    at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
MainFrameActions: Packaging (Windows (64-bit)): UnrealBuildTool:    at System.IO.StreamWriter.CreateFile(String path, Boolean append, Boolean checkHost)
MainFrameActions: Packaging (Windows (64-bit)): UnrealBuildTool:    at System.IO.StreamWriter..ctor(String path, Boolean append, Encoding encoding, Int32 bufferSize, Boolean checkHost)
MainFrameActions: Packaging (Windows (64-bit)): UnrealBuildTool:    at System.IO.File.InternalWriteAllText(String path, String contents, Encoding encoding, Boolean checkHost)
MainFrameActions: Packaging (Windows (64-bit)): UnrealBuildTool:    at UnrealBuildTool.UnrealBuildTool.RunUBT(String] Arguments, FileReference ProjectFile)
MainFrameActions: Packaging (Windows (64-bit)): CommandUtils.Run: Run: Took 0,9673181s to run UnrealBuildTool.exe, ExitCode=5
MainFrameActions: Packaging (Windows (64-bit)): Program.Main: ERROR: AutomationTool terminated with exception: AutomationTool.AutomationException: Command failed (Result:5): C:\Program Files\Epic Games\4.12\Engine\Binaries\DotNET\UnrealBuildTool.exe Subject_A119 Win64 Shipping -Project=E:\Unreal_Game\Subject_A119\Subject_A119.uproject  E:\Unreal_Game\Subject
_A119\Subject_A119.uproject  -remoteini="E:\Unreal_Game\Subject_A119" -noxge -generatemanifest -NoHotReloadFromIDE. See logfile for details: 'UnrealBuildTool-2016.07.25-01.51.41.txt' 
MainFrameActions: Packaging (Windows (64-bit)):    at AutomationTool.CommandUtils.RunAndLog(String App, String CommandLine, String Logfile, Int32 MaxSuccessCode, String Input, ERunOptions Options, Dictionary`2 EnvVars)
MainFrameActions: Packaging (Windows (64-bit)):    at AutomationTool.CommandUtils.RunUBT(CommandEnvironment Env, String UBTExecutable, String Comma
MainFrameActions: Packaging (Windows (64-bit)): ndLine, String LogName, Dictionary`2 EnvVars)
MainFrameActions: Packaging (Windows (64-bit)):    at AutomationTool.UE4Build.BuildWithUBT(String TargetName, UnrealTargetPlatform TargetPlatform, String Config, FileReference UprojectPath, Boolean ForceMonolithic, Boolean ForceNonUnity, Boolean ForceDebugInfo, Boolean ForceFlushMac, Boolean DisableXGE, String InAddArgs, Boolean ForceUnity, Dictionary`2 EnvV
ars)
MainFrameActions: Packaging (Windows (64-bit)):    at AutomationTool.UE4Build.Build(BuildAgenda Agenda, Nullable`1 InDeleteBuildProducts, Boolean InUpdateVersionFiles, Boolean InForceNoXGE, Boolean InUseParallelExecutor, Boolean InForceNonUnity, Boolean InForceUnity, Boolean InShowProgress, Dictionary`2 PlatformEnvVars, Nullable`1 InChangelistNumberOverride,
 Dictionary`2 InTargetToManifest)
MainFrameActions: Packaging (Windows (64-bit)):    at Project.Build(BuildCommand Command, ProjectParams Params, Int32 WorkingCL, ProjectBuildTargets TargetMask)
MainFrameActions: Packaging (Windows (64-bit)):    at BuildCookRun.DoBuildCookRun(ProjectParams Params)
MainFrameActions: Packaging (Windows (64-bit)):    at AutomationTool.BuildCommand.Execute()
MainFrameActions: Packaging (Windows (64-bit)):    at AutomationTool.Automation.Execute(List`1 CommandsToExecute, CaselessDictionary`1 Commands)
MainFrameActions: Packaging (Windows (64-bit)):    at AutomationTool.Automation.Process(String] CommandLine)
MainFrameActions: Packaging (Windows (64-bit)):    at AutomationTool.Program.MainProc(Object Param)
MainFrameActions: Packaging (Windows (64-bit)):    at AutomationTool.InternalUtils.RunSingleInstance(Func`2 Main, Object Param)
MainFrameActions: Packaging (Windows (64-bit)):    at AutomationTool.Program.Main()
MainFrameActions: Packaging (Windows (64-bit)): Program.Main: AutomationTool exiting with ExitCode=5 (5)
MainFrameActions: Packaging (Windows (64-bit)): Domain_ProcessExit
MainFrameActions: Packaging (Windows (64-bit)): copying UAT log files...
MainFrameActions: Packaging (Windows (64-bit)): BUILD FAILED
PackagingResults:Error: Error Unknown Error

Even with a new project I get this error before the editor even opens:


Running C:/Program Files/Epic Games/4.12/Engine/Binaries/DotNET/UnrealBuildTool.exe MyProject3 Development Win64 -project="E:/Unreal_Game/Test/MyProject3/MyProject3.uproject" -editorrecompile -progress -noubtmakefiles -NoHotReloadFromIDE
 @progress push 5%
Parsing headers for MyProject3Editor
  Running UnrealHeaderTool "E:\Unreal_Game\Test\MyProject3\MyProject3.uproject" "E:\Unreal_Game\Test\MyProject3\Intermediate\Build\Win64\MyProject3Editor\Development\MyProject3Editor.uhtmanifest" -LogCmds="loginit warning, logexit warning, logdatabase error" -Unattended -WarningsAsErrors -installed
Reflection code generated for MyProject3Editor in 5,0535425 seconds
 @progress pop
Performing 7 actions (4 in parallel)
[3/7] Resource ModuleVersionResource.rc.inl
[2/7] Resource PCLaunch.rc
PCH.MyProject3.h.cpp
MyProject3GameMode.cpp
MyProject3.cpp
E:\Unreal_Game\Test\MyProject3\Source\MyProject3\MyProject3.cpp: error C4599: '/IE:\Visual Studio\VC\INCLUDE': command line argument number 261 does not match precompiled headerE:\Unreal_Game\Test\MyProject3\Source\MyProject3\MyProject3GameMode.cpp: error C4599: '/IE:\Visual Studio\VC\INCLUDE': command line argument number 261 does not match precompiled header

MyProject3.generated.cpp
E:\Unreal_Game\Test\MyProject3\Intermediate\Build\Win64\UE4Editor\Inc\MyProject3\MyProject3.generated.cpp: error C4599: '/IE:\Visual Studio\VC\INCLUDE': command line argument number 261 does not match precompiled header
ERROR: UBT ERROR: Failed to produce item: E:\Unreal_Game\Test\MyProject3\Binaries\Win64\UE4Editor-MyProject3.dll
Total build time: 62,59 seconds

I would suggest dropping this by the answerhub so you get the support you need! :smiley: