C++ Transition Guide for 4.20

Hi,
I have serious problems with packaging a runtime plugin.

it halt with an error:

ERROR: The first include statement in source file ‘D:\UE4\MyProjects\EOC\RTSPluginV178\RTS\HostProject\Plugins\RTS\Source\RTS\Private\RTSEntity\RTSObstacle.cpp’ is trying to include the file ‘RTSObstacle.h’ as the precompiled header, but that file could not be located in any of the module’s include search paths.

Earlier I got a warning:
warning: Referenced directory ‘D:\Programs\Epic Games\UE_4.20\Engine\Source\RTS\Public’ does not exist. full message:


UATHelper: Package Plugin Task (Windows): Reading plugin from D:\UE4\MyProjects\EOC\RTSPluginV178\RTS\HostProject\Plugins\RTS\RTS.uplugin...
UATHelper: Package Plugin Task (Windows): Building plugin for host platforms: Win64
UATHelper: Package Plugin Task (Windows): Running: D:\Programs\Epic Games\UE_4.20\Engine\Binaries\DotNET\UnrealBuildTool.exe UE4Editor Win64 Development -plugin=D:\UE4\MyProjects\EOC\RTSPluginV178\RTS\HostProject\Plugins\RTS\RTS.uplugin -iwyu -precompile -nosharedpch -noubtmakefiles -receipt=D:\UE4\MyProjects\EOC\RTSPluginV178\RTS\HostProject\Plugins\RTS\Bin
aries\Win64\UE4Editor.target -NoHotReload -log="D:\Programs\Epic Games\UE_4.20\Engine\Programs\AutomationTool\Saved\Logs\UBT-UE4Editor-Win64-Development.txt"
UATHelper: Package Plugin Task (Windows):   Using Visual Studio 2015 14.0 toolchain (D:\VisualStudio\Microsoft Visual Studio 14.0\VC) and Windows 8.1 SDK (C:\Program Files (x86)\Windows Kits\8.1).
UATHelper: Package Plugin Task (Windows):   D:\UE4\MyProjects\EOC\RTSPluginV178\RTS\HostProject\Plugins\RTS\Source\RTS\RTS.Build.cs: warning: Referenced directory 'D:\Programs\Epic Games\UE_4.20\Engine\Source\RTS\Public' does not exist.
UATHelper: Package Plugin Task (Windows):   Parsing headers for UE4Editor
UATHelper: Package Plugin Task (Windows):     Running UnrealHeaderTool UE4Editor "D:\Programs\Epic Games\UE_4.20\Engine\Intermediate\Build\Win64\UE4Editor\Development\UE4Editor.uhtmanifest" -LogCmds="loginit warning, logexit warning, logdatabase error" -Unattended -WarningsAsErrors -installed
UATHelper: Package Plugin Task (Windows):   Reflection code generated for UE4Editor in 37,8254232 seconds
UATHelper: Package Plugin Task (Windows):   ERROR: The first include statement in source file 'D:\UE4\MyProjects\EOC\RTSPluginV178\RTS\HostProject\Plugins\RTS\Source\RTS\Private\RTSEntity\RTSObstacle.cpp' is trying to include the file 'RTSObstacle.h' as the precompiled header, but that file could not be located in any of the module's include search paths.
UATHelper: Package Plugin Task (Windows):          (see D:\Programs\Epic Games\UE_4.20\Engine\Programs\AutomationTool\Saved\Logs\UBT-UE4Editor-Win64-Development.txt for full exception trace)
UATHelper: Package Plugin Task (Windows): Took 108,6284721s to run UnrealBuildTool.exe, ExitCode=5
UATHelper: Package Plugin Task (Windows): ERROR: UnrealBuildTool failed. See log for more details. (D:\Programs\Epic Games\UE_4.20\Engine\Programs\AutomationTool\Saved\Logs\UBT-UE4Editor-Win64-Development.txt)
UATHelper: Package Plugin Task (Windows):        (see D:\Programs\Epic Games\UE_4.20\Engine\Programs\AutomationTool\Saved\Logs\Log.txt for full exception trace)
UATHelper: Package Plugin Task (Windows): AutomationTool exiting with ExitCode=5 (5)
UATHelper: Package Plugin Task (Windows): BUILD FAILED

then I changed in my plugin called RTS the RTS.Build.cs as follows:



//PublicIncludePaths.AddRange(
        //    new string] {
        //        "RTS/Public"
        //        // ... add public include paths required here ...
        //    }
        //    );

PublicIncludePaths.Add(Path.Combine(ModuleDirectory, "Public"));


now the compiler time warning, and the packaging warning disappears but the packaging stops with the same error complaining about an include :
ERROR: The first include statement in source file ‘D:\UE4\MyProjects\EOC\RTSPluginV178\RTS\HostProject\Plugins\RTS\Source\RTS\Private\RTSEntity\RTSObstacle.cpp’ is trying to include the file ‘RTSObstacle.h’ as the precompiled header, but that file could not be located in any of the module’s include search paths.

any hints for solving this problem?

btw I’m using VS2015Community…