UAE - Found module file .dll (API version 3299760), but it was incompatible with the current engine API version (3452394)

Hi, I’m testing an example project with my 64-bit Windows 10 desktop and Visual Studio 2017.

The Windows 8.1 SDK and Windows 10 SDK (10.0.10586, 10.0.14393) are installed on the desktop.

I have chosen the “Flying” example to test this and I named the project as “Test4Git”.

For testing, I have just added a class and levels.

It is obvious that, with the Unreal Editor, the build was successful and I clicked the play button.

I have referred this [wiki page; How to package your game with commands][2].

// In CMD
C:\Program Files\Epic Games\UE_4.16\Engine\Build\BatchFiles> RunUAT BuildCookRun -project="C:\Users\\Documents\Unreal Projects\Test4Git\Test4Git.uproject" -noP4 -platform=Win64 -clientconfig=Development -serverconfig=Development -cook -allmaps -build -stage -pak -archive -archivedirectory="C:\Users\\Desktop\temp\Output"

When I run that command on UE4.16,

UnrealBuildTool: Performing 7 actions (4 in parallel)
UnrealBuildTool: PCH.UELinkerFixups.cpp
UnrealBuildTool: PCH.Test4Git.cpp
UnrealBuildTool: UELinkerFixups.cpp
UnrealBuildTool: Test4Git.generated.cpp
UnrealBuildTool: Test4Git.cpp
UnrealBuildTool: MyPlayerController.cpp
UnrealBuildTool: [7/7] Link Test4Git.exe
UnrealBuildTool:    Creating library C:\Users\\Documents\Unreal Projects\Test4Git\Binaries\Win64\Test4Git.lib and object C:\Users\\Documents\Unreal Projects\Test4Git\Binaries\Win64\Test4Git.exp
UnrealBuildTool: Total build time: 95.50 seconds (Local executor: 81.56 seconds)
CommandUtils.Run: Run: Took 95.7293673s to run UnrealBuildTool.exe, ExitCode=0

Project.Build: ********** BUILD COMMAND COMPLETED **********
Project.Cook: ********** COOK COMMAND STARTED **********
CommandUtils.RunCommandlet: Running UE4Editor Cook for project C:\Users\\Documents\Unreal Projects\Test4Git\Test4Git.uproject
CommandUtils.RunCommandlet: Commandlet log file is C:\Program Files\Epic Games\UE_4.16\Engine\Programs\AutomationTool\Saved\Cook-2017.07.11-17.24.00.txt
CommandUtils.Run: Run: C:\Program Files\Epic Games\UE_4.16\Engine\Binaries\Win64\UE4Editor-Cmd.exe "C:\Users\\Documents\Unreal Projects\Test4Git\Test4Git.uproject" -run=Cook  -NoLogTimes -TargetPlatform=WindowsNoEditor -fileopenlog -unversioned -abslog="C:\Program Files\Epic Games\UE_4.16\Engine\Programs\AutomationTool\Saved\Cook-2017.07.11-17.24.00.txt" -stdout -CrashForUAT -unattended
Cook: LogInit:Display: Running engine for game: Test4Git
Cook: LogInit:Display: RandInit(368512278) SRandInit(368512278).
Cook: LogModuleManager:Warning: Found module file ../../../../../../Users//Documents/Unreal Projects/Test4Git/Binaries/Win64/UE4Editor-Test4Git.dll (API version 3299760), but it was incompatible with the current engine API version (3452394). This is likely a stale module that must be recompiled.
Cook: LogInit:Warning: Incompatible or missing module: UE4Editor-Test4Git.dll
CommandUtils.Run: Run: Took 3.7212081s to run UE4Editor-Cmd.exe, ExitCode=1
Project.Cook: Cook failed. Deleting cooked data.

Program.Main: ERROR: AutomationTool terminated with exception: AutomationTool.AutomationException: Cook failed. ---> AutomationTool.CommandletException: BUILD FAILED: Failed while running Cook for C:\Users\\Documents\Unreal Projects\Test4Git\Test4Git.uproject; see log C:\Program Files\Epic Games\UE_4.16\Engine\Programs\AutomationTool\Saved\Logs\Cook-2017.07.11-17.24.04.txt
   at AutomationTool.CommandUtils.RunCommandlet(FileReference ProjectName, String UE4Exe, String Commandlet, String Parameters) in C:\Program Files\Epic Games\UE_4.16\Engine\Source\Programs\AutomationTool\AutomationUtils\CommandletUtils.cs:line 407

Program.Main: AutomationTool exiting with ExitCode=25 (Error_UnknownCookFailure)
BUILD FAILED

this Exitcode=25 error is shown and this is the [Cook-2017.07.11-17.24.04.txt][3] file.

That file says that UE4Editor-Test4Git.dll (API version 3299760), but it was incompatible with the current engine API version (3452394)

So I thought using UE4.15 or lower could solve this.

However, 4.15 UAT threw a different error message (error number 5), even though the Windows SDKs were installed.

UnrealBuildTool: Creating makefile for Test4Git (UnrealBuildTool.exe is newer)
UnrealBuildTool: Performing 7 actions (4 in parallel)
UnrealBuildTool: PCH.UELinkerFixups.cpp
UnrealBuildTool: PCH.Test4Git.cpp
UnrealBuildTool: UELinkerFixups.cpp
UnrealBuildTool: MyPlayerController.cpp
UnrealBuildTool: Test4Git.generated.cpp
UnrealBuildTool: Test4Git.cpp
UnrealBuildTool: C:\Users\\Documents\Unreal Projects\Test4Git\Intermediate\Build\Win64\UE4\Inc\Test4Git\Test4Git.generated.cpp(46): error C2143: syntax error: missing ';' before '<'
UnrealBuildTool: C:\Users\\Documents\Unreal Projects\Test4Git\Intermediate\Build\Win64\UE4\Inc\Test4Git\Test4Git.generated.cpp(46): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
UnrealBuildTool: C:\Users\\Documents\Unreal Projects\Test4Git\Intermediate\Build\Win64\UE4\Inc\Test4Git\Test4Git.generated.cpp(47): error C2039: 'SetCppTypeInfo': is not a member of 'UClass'
UnrealBuildTool: C:\Users\\Documents\Unreal Projects\Test4Git\Intermediate\Build\Win64\UE4\Inc\Test4Git\Test4Git.generated.cpp(22): note: see declaration of 'UClass'
UnrealBuildTool: C:\Users\\Documents\Unreal Projects\Test4Git\Intermediate\Build\Win64\UE4\Inc\Test4Git\Test4Git.generated.cpp(47): error C2065: 'StaticCppClassTypeInfo': undeclared identifier
UnrealBuildTool: C:\Users\\Documents\Unreal Projects\Test4Git\Intermediate\Build\Win64\UE4\Inc\Test4Git\Test4Git.generated.cpp(61): error C2661: 'FCompiledInDefer::FCompiledInDefer': no overloaded function takes 8 arguments
UnrealBuildTool: ERROR: UBT ERROR: Failed to produce item: C:\Users\\Documents\Unreal Projects\Test4Git\Binaries\Win64\Test4Git.pdb
UnrealBuildTool: Total build time: 71.48 seconds (Local executor: 0.00 seconds)
CommandUtils.Run: Run: Took 71.7603997s to run UnrealBuildTool.exe, ExitCode=5
Program.Main: ERROR: AutomationTool terminated with exception: AutomationTool.CommandUtils+CommandFailedException: Command failed (Result:5):

This is the Cpp code.

// Test4Git\Test4Git.generated.cpp

// line 22
TEST4GIT_API class UClass* Z_Construct_UClass_AMyPlayerController();

// line 46
static TCppClassTypeInfo<TCppClassTypeTraits<AMyPlayerController> > StaticCppClassTypeInfo;
				OuterClass->SetCppTypeInfo(&StaticCppClassTypeInfo);

// line 61
static FCompiledInDefer Z_CompiledInDefer_UClass_AMyPlayerController(Z_Construct_UClass_AMyPlayerController, &AMyPlayerController::StaticClass, TEXT("/Script/Test4Git"), TEXT("AMyPlayerController"), false, nullptr, nullptr, nullptr);

I really want to build this example project using the UAE so I can configure my CI configuration.

What should I fix to make it happen?

[Unreal Projects/Test4Git/Intermediate/ProjectFiles/Test4Git.vcxproj][4]

[Unreal Projects/Test4Git/Intermediate/ProjectFiles/UE4.vcxproj][5]

-Best Regards,