Can't build with 4.12.5 and VS 2015 Update 3

Title says it all, really.

Updated project from 4.12.3 to 4.12.5, worked fine, went smooth.

Updated VS 2015 to Update 3, which I though was fine with 4.12.5, can’t build or compile anymore. Different errors; for build, can’t produce .pdb; for compile, can’t produce .dll

Output Log when trying to build for Windows 64-bit (done this many times before):

LogSavePackage: Save=443.18ms
LogSavePackage: Moving '../../../../../../Users/bajji/Documents/Unreal Projects/Browser_prototype 4.12/Saved/UEDPCMinimal_DefaultEE7E90F24EEA62D34020D08238290247.tmp' to '../../../../../../Users/bajji/Documents/Unreal Projects/Browser_prototype 4.12/Saved/Autosaves/Game/StarterContent/Maps/UEDPCMinimal_Default.umap'
LogSavePackage:Display: Finished SavePackage ../../../../../../Users/bajji/Documents/Unreal Projects/Browser_prototype 4.12/Saved/Autosaves/Game/StarterContent/Maps/UEDPCMinimal_Default.umap
LogEditorTransaction: Undo Spawn Play From Here Start
MainFrameActions: Packaging (Windows (64-bit)): Running AutomationTool...
MainFrameActions: Packaging (Windows (64-bit)): Automation.ParseCommandLine: Parsing command line: -ScriptsForProject=C:/Users/bajji/Documents/Unreal Projects/Browser_prototype 4.12/Browser_prototype.uproject BuildCookRun -nocompile -nocompileeditor -installed -nop4 -project=C:/Users/bajji/Documents/Unr
MainFrameActions: Packaging (Windows (64-bit)): eal Projects/Browser_prototype 4.12/Browser_prototype.uproject -cook -stage -archive -archivedirectory=C:/Users/bajji/Documents/Browser Prototype/Exes -package -clientconfig=Development -ue4exe=UE4Editor-Cmd.exe -pak -prereqs -nodebuginfo -targetplatform=Win64 -build -CrashReporter -utf8output
MainFrameActions: Packaging (Windows (64-bit)): Automation.Process: Setting up command environment.
MainFrameActions: Packaging (Windows (64-bit)): BuildCookRun.SetupParams: Setting up ProjectParams for C:\Users\bajji\Documents\Unreal Projects\Browser_prototype 4.12\Browser_prototype.uproject
MainFrameActions: Packaging (Windows (64-bit)): Project.Build: ********** BUILD COMMAND STARTED **********
MainFrameActions: Packaging (Windows (64-bit)): CommandUtils.Run: Run: C:\Program Files (x86)\Epic Games\4.12\Engine\Binaries\DotNET\UnrealBuildTool.exe Browser_prototype Win64 Development -Project="C:\Users\bajji\Documents\Unreal Projects\Browser_prototype 4.12\Browser_prototype.uproject"  "C:\Users\ba
MainFrameActions: Packaging (Windows (64-bit)): jji\Documents\Unreal Projects\Browser_prototype 4.12\Browser_prototype.uproject"  -remoteini="C:\Users\bajji\Documents\Unreal Projects\Browser_prototype 4.12" -noxge -generatemanifest -NoHotReloadFromIDE
MainFrameActions: Packaging (Windows (64-bit)): CommandUtils.Run: Run: Took 3.8014962s to run UnrealBuildTool.exe, ExitCode=0
MainFrameActions: Packaging (Windows (64-bit)): CommandUtils.Run: Run: C:\Program Files (x86)\Epic Games\4.12\Engine\Binaries\DotNET\UnrealBuildTool.exe Browser_prototype Win64 Development -Project="C:\Users\bajji\Documents\Unreal Projects\Browser_prototype 4.12\Browser_prototype.uproject"  "C:\Users\bajji\Documents\Unreal Projects\Browser_prototype 4.12\Bro
wser_prototype.uproject"  -remoteini="C:\Users\bajji\Documents\Unreal Projects\Browser_prototype 4.12" -noxge -NoHotReloadFromIDE -ignorejunk
MainFrameActions: Packaging (Windows (64-bit)): UnrealBuildTool: Performing 2 actions (2 in parallel)
MainFrameActions: Packaging (Windows (64-bit)): UnrealBuildTool: readInputFile.cpp
MainFrameActions: Packaging (Windows (64-bit)): UnrealBuildTool: C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE\string(6): fatal error C1083: Cannot open include file: 'istream': No such file or directory
MainFrameActions: Packaging (Windows (64-bit)): UnrealBuildTool: **ERROR: UBT ERROR: Failed to produce item: C:\Users\bajji\Documents\Unreal Projects\Browser_prototype 4.12\Binaries\Win64\Browser_prototype.pdb**
MainFrameActions: Packaging (Windows (64-bit)): UnrealBuildTool: Total build time: 8.64 seconds
MainFrameActions: Packaging (Windows (64-bit)): CommandUtils.Run: Run: Took 8.8742852s 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 (x86)\Epic Games\4.12\Engine\Binaries\DotNET\UnrealBuildTool.exe Browser_prototype Win64 Development -Project="C:\Users\bajji\Documents\Unreal Projects\Browser_prototype
 4.12\Browser_prototype.uproject"  "C:\Users\bajji\Documents\Unreal Projects\Browser_prototype 4.12\Browser_prototype.uproject"  -remoteini="C:\Users\bajji\Documents\Unreal Projects\Browser_prototype 4.12" -noxge -NoHotReloadFromIDE -ignorejunk. See logfile for details: 'UnrealBuildTool-2016.07.28-16.40.29.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 CommandLine, String LogName, Dictionary`2 EnvVars)
MainFrameActions: Packaging (Windows (64-bit)):    at AutomationTool.UE4Build.BuildWithUBT(String TargetName, UnrealTargetPlatf
MainFrameActions: Packaging (Windows (64-bit)): orm TargetPlatform, String Config, FileReference UprojectPath, Boolean ForceMonolithic, Boolean ForceNonUnity, Boolean ForceDebugInfo, Boolean ForceFlushMac, Boolean DisableXGE, String InAddArgs, Boolean ForceUnity, Dictionary`2 EnvVars)
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

Output Log when trying to compile:

LogVSAccessor:Warning: Couldn't access Visual Studio
Recompiling GamepadUMGPlugin...
Recompiling Browser_prototype...
Launching UnrealBuildTool... [C:/Program Files (x86)/Epic Games/4.12/Engine/Binaries/DotNET/UnrealBuildTool.exe Browser_prototype -ModuleWithSuffix GamepadUMGPlugin 7537 -ModuleWithSuffix Browser_prototype 6073 Win64 Development -editorrecompile -canskiplink "C:/Users/bajji/Documents/Unreal Projects/Browser_prototype 4.12/Browser_prototype.uproject"  -2015]
Warning: Starting HotReload took  0.1s.
CompilerResultsLog: New page: Compilation - Jul 28, 2016, 8:56:25 AM
CompilerResultsLog: Info Creating makefile for hot reloading Browser_prototype (UnrealBuildTool.exe is newer)
CompilerResultsLog: Info Compiling game modules for hot reload
CompilerResultsLog: Info Parsing headers for Browser_prototypeEditor
CompilerResultsLog: Info   Running UnrealHeaderTool "C:\Users\bajji\Documents\Unreal Projects\Browser_prototype 4.12\Browser_prototype.uproject" "C:\Users\bajji\Documents\Unreal Projects\Browser_prototype 4.12\Intermediate\Build\Win64\Browser_prototypeEditor\Development\Browser_prototypeEditor.uhtmanifest" -LogCmds="loginit warning, logexit warning, logdatab
ase error" -Unattended -WarningsAsErrors -installed
CompilerResultsLog: Info Reflection code generated for Browser_prototypeEditor in 8.6675648 seconds
CompilerResultsLog: Info Performing 18 actions (2 in parallel)
CompilerResultsLog: Info [2/18] Resource PCLaunch.rc
CompilerResultsLog: Info PCH.Browser_prototype.h.cpp
CompilerResultsLog: Info Module.GamepadUMGPlugin.cpp
CompilerResultsLog: Info [4/18] Resource ModuleVersionResource.rc.inl
CompilerResultsLog: Info [5/18] Resource PCLaunch.rc
CompilerResultsLog: Info GamepadUMGPlugin.generated.cpp
CompilerResultsLog: Info GenerateGeneObjects.cpp
CompilerResultsLog: Info Browser_prototype.generated.cpp
CompilerResultsLog: Info ScaleVectors.cpp
CompilerResultsLog: Info readInputFiles.cpp
CompilerResultsLog: Info Browser_prototype.cpp
CompilerResultsLog: Info Auto_Layout_C.cpp
CompilerResultsLog: Info readInputFile.cpp
CompilerResultsLog: Info C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE\string(6): fatal error C1083: Cannot open include file: 'istream': No such file or directory
CompilerResultsLog: Info GenerateTrack.cpp
CompilerResultsLog: Info MyBlueprintFunctionLibrary.cpp
CompilerResultsLog: Info [16/18] Resource ModuleVersionResource.rc.inl
CompilerResultsLog: Info [17/18] Link UE4Editor-GamepadUMGPlugin-7537.dll
CompilerResultsLog: Info    Creating library C:\Users\bajji\Documents\Unreal Projects\Browser_prototype 4.12\Plugins\GamepadUMGPlugin\Intermediate\Build\Win64\UE4Editor\Development\UE4Editor-GamepadUMGPlugin-7537.lib and object C:\Users\bajji\Documents\Unreal Projects\Browser_prototype 4.12\Plugins\GamepadUMGPlugin\Intermediate\Build\Win64\UE4Editor\Developm
ent\UE4Editor-GamepadUMGPlugin-7537.exp
CompilerResultsLog: Info **ERROR: UBT ERROR: Failed to produce item: C:\Users\bajji\Documents\Unreal Projects\Browser_prototype 4.12\Binaries\Win64\UE4Editor-Browser_prototype-6073.dll**
CompilerResultsLog: Info Total build time: 108.81 seconds
LogMainFrame: MainFrame: Module compiling took 109.161 seconds
Warning: HotReload failed, recompile failed

Hey ,

Can you make sure that no other versions of Visual Studio are running and that nothing regarding the project you are trying to compile is open? Such as a notepad open of a file in the project.

The “UBT ERROR: Failed to produce item…” can mean that it simply cant write over the project files because they are currently being used by another program.

No other versions of VS are running, though I believe Update 2 is still installed. I’m actually reverting to Update 2 now to see if that helps the situation.

OK, so it turns out that the problem was with VS and not UE4 (sorry). My VS install had been slightly corrupted (probably because I had cancelled an update partway through then updated again). Everything worked fine, but certain things were missing, like istream.

Long story short, I uninstalled VS the normal way, nuked the remaining traces with Visual Studio Uninstaller, deleted the for-some-reason still existing Microsoft Visual Studio 14.0 folder in Program Files (x86), and reinstalled VS with Update 3.

It works fine now.