Unreal Engine4 & Visual Studio 2017 mismatch

I’m following along the lectures and just completed the PositionReport BeginPlay message with ObjectName, but I’m stuck at a point where Unreal Engine 4.19.2 compiles and builds just fine, but Visual Studio fails to build.

Unreal Engine Output:
CompilerResultsLog: New page: Compilation - Oct 19, 2018, 3:00:57 AM
CompilerResultsLog: Using ‘git status’ to determine working set for adaptive non-unity build.
CompilerResultsLog: Creating makefile for hot reloading BuildingEscape (modules to compile have changed)
CompilerResultsLog: Compiling game modules for hot reload
CompilerResultsLog: Target is up to date
CompilerResultsLog: Total build time: 33.86 seconds (NoActionsToExecute executor: 0.00 seconds)
LogMainFrame: MainFrame: Module compiling took 34.030 seconds
LogContentBrowser: Native class hierarchy populated in 0.0186 seconds. Added 2455 classes and 562 folders.
Display: HotReload took 34.1s.
MapCheck: New page: Map Check
Cmd: MAP REBUILD ALLVISIBLE
LogEditorServer: Rebuildmap Clear paths rebuilt
LogMaterial: Missing cached shader map for material FDebugViewModeMaterialProxy WorldGridMaterial, compiling. Is special engine material.
LogMaterial: Missing cached shader map for material FDebugViewModeMaterialProxy DefaultMaterial, compiling.
LogShaderCompilers: Display: Shaders left to compile 2
LogShaderCompilers: Display: Shaders left to compile 1
LogMaterial: Missing cached shader map for material FDebugViewModeMaterialProxy MaterialInstanceDynamic_6, compiling.
LogMaterial: Missing cached shader map for material FDebugViewModeMaterialProxy M_Chair, compiling.
LogMaterial: Missing cached shader map for material FDebugViewModeMaterialProxy M_Rock, compiling.
LogShaderCompilers: Display: Shaders left to compile 3
LogShaderCompilers: Display: Shaders left to compile 2
LogShaderCompilers: Display: Shaders left to compile 1
TextureStreamingBuild: Display: Compiling optional shaders took 1.471 seconds.
LogLevel: Display: Export Material TexCoord Scales took 0.029 seconds.
TextureStreamingBuild: Display: Build Texture Streaming took 0.005 seconds.
LightingResults: New page: Lighting Build - Oct 19, 2018, 3:01:30 AM
LogSwarmInterface: [OpenConnection] Registering TCP channel …
LogSwarmInterface: [OpenConnection] Connecting to agent …
LogSwarmInterface: [TryOpenConnection] Testing the Agent
LogSwarmInterface: [TryOpenConnection] Opening Connection to Agent
LogSwarmInterface: [TryOpenConnection] Local Process ID is 4416
LogStaticLightingSystem: Warning: No importance volume found, so the scene bounding box was used. You can optimize your scene’s quality and lighting build times by adding importance volumes.
LogStaticLightingSystem: Running Lightmass w/ ImmediateImport mode ENABLED
LogStaticLightingSystem: Running Lightmass w/ ImmediateProcess mode ENABLED
LogStaticLightingSystem: Running Lightmass w/ Sorting mode ENABLED
LogStaticLightingSystem: Running Lightmass w/ Mapping paddings ENABLED
LogStaticLightingSystem: Running Lightmass w/ Mapping debug paddings DISABLED
Cmd: MAP CHECK DONTDISPLAYDIALOG
MapCheck: New page: NewMap - Oct 19, 2018, 3:01:35 AM
MapCheck: Map check complete: 0 Error(s), 0 Warning(s), took 882.561ms to complete.
LogEditorBuildUtils: Build time 0:07
Job is a success!
LogVolumetricLightmapImport: Imported Volumetric Lightmap in 0.006s
LogVolumetricLightmapImport: Indirection Texture 16x16x16 = 0.0Mb
LogVolumetricLightmapImport: BrickData 35x5x5 = 0.0Mb
LogVolumetricLightmapImport: Bricks at Level
LogVolumetricLightmapImport: 0: 14.3% covering 100.0% of volume
LogVolumetricLightmapImport: 1: 14.3% covering 1.6% of volume
LogVolumetricLightmapImport: 2: 71.4% covering 0.1% of volume
LogTexture: Display: Building textures: HQ_Lightmap0_1 (AutoDXT, 256X256)
LogTexture: Display: Building textures: HQ_Lightmap0_2 (AutoDXT, 64X64)
LogTexture: Display: Building textures: LQ_Lightmap_0_1 (DXT1, 256X256)
LogTexture: Display: Building textures: LQ_Lightmap_0_2 (DXT1, 64X64)
LogTexture: Display: Building textures: ShadowMapTexture2D_9 (G8, 32X32)
LogTexture: Display: Building textures: ShadowMapTexture2D_8 (G8, 256X128)
Lightmass on LAPTOP-ET0N5AOJ: 1.36 sec total, 155 ms importing, 16 ms setup, 699 ms photons, 470 ms processing, 0 ms extra exporting [4/4 mappings]. Threads: 4.68 sec total, 424 ms processing.
LogStaticLightingSystem: Illumination: 7.64 sec (32 ms encoding lightmaps, 6 ms encoding shadowmaps)
LogStaticLightingSystem: Lightmap texture memory: 0.1 MB (0.1 MB streaming, 0.0 MB non-streaming), 4 textures
LogStaticLightingSystem: Shadowmap texture memory: 0.0 MB (0.0 MB streaming, 0.0 MB non-streaming), 2 textures
DumpUnbuiltLightIteractions
Lights with unbuilt interactions: 0
Primitives with unbuilt interactions: 0
Cmd: MAP CHECK NOTIFYRESULTS
MapCheck: New page: NewMap - Oct 19, 2018, 3:01:39 AM
MapCheck: Map check complete: 0 Error(s), 0 Warning(s), took 35.539ms to complete.
LogSavePackage: Save=21.29ms
LogSavePackage: Moving ‘…/…/…/…/…/…/UE4_Projects/udemy_c++/03_BuildingEscape/BuildingEscape/Saved/NewMap_Auto46D45200B4804895E22047CA97EFC21CB.tmp’ to ‘…/…/…/…/…/…/UE4_Projects/udemy_c++/03_BuildingEscape/BuildingEscape/Saved/Autosaves/Game/NewMap_Auto4.umap’
LogSavePackage: Display: Finished SavePackage …/…/…/…/…/…/UE4_Projects/udemy_c++/03_BuildingEscape/BuildingEscape/Saved/Autosaves/Game/NewMap_Auto4.umap
LogFileHelpers: Editor autosave (incl. sublevels) for ‘/Game/NewMap’ took 0.101
LogFileHelpers: Editor autosave (incl. sublevels) for all levels took 0.101
OBJ SavePackage: Generating thumbnails for [0] asset(s) in package [/Game/NewMap_BuiltData] ([1] browsable assets)…
OBJ SavePackage: Finished generating thumbnails for package [/Game/NewMap_BuiltData]
LogSavePackage: Save=6.35ms
LogSavePackage: Moving ‘…/…/…/…/…/…/UE4_Projects/udemy_c++/03_BuildingEscape/BuildingEscape/Saved/NewMap_BuiltData_Auto432509E6147E1D3F28B920089FE8304E7.tmp’ to ‘…/…/…/…/…/…/UE4_Projects/udemy_c++/03_BuildingEscape/BuildingEscape/Saved/Autosaves/Game/NewMap_BuiltData_Auto4.uasset’
LogSavePackage: Display: Finished SavePackage …/…/…/…/…/…/UE4_Projects/udemy_c++/03_BuildingEscape/BuildingEscape/Saved/Autosaves/Game/NewMap_BuiltData_Auto4.uasset
LogFileHelpers: Auto-saving content packages took 0.034

Visual Studio Output:
1>------ Rebuild All started: Project: UE4, Configuration: BuiltWithUnrealBuildTool Win32 ------
2>------ Rebuild All started: Project: BuildingEscape, Configuration: Development_Editor x64 ------
2>Cleaning BuildingEscapeEditor Binaries…
2>UnrealBuildTool : error : Unable to clean target while hot-reloading. Close the editor and try again.
2>Using ‘git status’ to determine working set for adaptive non-unity build.
2>Compiling game modules for hot reload
2>Target is up to date
2>Deploying BuildingEscapeEditor Win64 Development…
2>Total build time: 0.93 seconds (NoActionsToExecute executor: 0.00 seconds)
2>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\Microsoft.MakeFile.Targets(49,5): error MSB3073: The command ““D:\Program Files\Epic Games\UE_4.19\Engine\Build\BatchFiles\Rebuild.bat” BuildingEscapeEditor Win64 Development “D:\UE4_Projects\udemy_c++\03_BuildingEscape\BuildingEscape\BuildingEscape.uproject” -WaitMutex -FromMsBuild” exited with code -1.
2>Done building project “BuildingEscape.vcxproj” – FAILED.
========== Rebuild All: 1 succeeded, 1 failed, 0 skipped ==========

Visual Studio Errors:
Severity Code Description Project File Line Suppression State
Error (active) E0393 pointer to incomplete class type is not allowed BuildingEscape D:\UE4_Projects\udemy_c++\03_BuildingEscape\BuildingEscape\Source\BuildingEscape\PositionReporter.cpp 23
Error (active) E0018 expected a ‘)’ BuildingEscape D:\Program Files\Epic Games\UE_4.19\Engine\Source\Runtime\Core\Public\Templates\Atomic.h 188
Error Unable to clean target while hot-reloading. Close the editor and try again. BuildingEscape D:\UE4_Projects\udemy_c++\03_BuildingEscape\BuildingEscape\Intermediate\ProjectFiles\UnrealBuildTool 1
Error MSB3073 The command ““D:\Program Files\Epic Games\UE_4.19\Engine\Build\BatchFiles\Rebuild.bat” BuildingEscapeEditor Win64 Development “D:\UE4_Projects\udemy_c++\03_BuildingEscape\BuildingEscape\BuildingEscape.uproject” -WaitMutex -FromMsBuild” exited with code -1. BuildingEscape C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\Microsoft.MakeFile.Targets 49

Never mind, I guess I should have finished watching lecture 68. It’s the IWYU change in UE 4.17+ that caused problems in VS2017.

did solved the isssue

1> Running UnrealHeaderTool “C:\Users\GL63\Documents\Unreal Projects\BuildingEscape\BuildingEscape.uproject” “C:\Users\GL63\Documents\Unreal Projects\BuildingEscape\Intermediate\Build\Win64\BuildingEscapeEditor\Development\BuildingEscapeEditor.uhtmanifest” -LogCmds=“loginit warning, logexit warning, logdatabase error” -Unattended -WarningsAsErrors -abslog=“C:\Users\GL63\AppData\Local\UnrealBuildTool\Log_UHT.txt” -installed 1>C:/Users/GL63/Documents/Unreal Projects/BuildingEscape/Source/BuildingEscape/PositionReport.h(8): error : #unreal:ask found after .generated.h file - the .generated.h file should always be the last #include in a header 1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.MakeFile.Targets(46,5): error MSB3073: The command “chcp 65001 >NUL && “C:\Program Files\Epic Games\UE_4.25\Engine\Build\BatchFiles\Build.bat” BuildingEscapeEditor Win64 Development -Project=“C:\Users\GL63\Documents\Unreal Projects\BuildingEscape\BuildingEscape.uproject” -WaitMutex -FromMsBuild” exited with code 6. 1>Done building project “BuildingEscape.vcxproj” – FAILED.

Privacy & Terms