4.17 preview 3 refuses to compile C++ project after 1 or 2 times

I have Visual Studio 2017 version 15.2 (26430.16) installed and 4.17 preview 3 refuses to compile my project after one or two times. Below is the error message.

1>------ Build started: Project: HelixOrigin, Configuration: DebugGame_Editor x64 ------
1>Performing full C++ include scan (building a new target)
1>EXEC : error : System.ArgumentNullException: Value cannot be null.
1>Parameter name: source
1>   at System.Linq.Enumerable.Any[TSource](IEnumerable`1 source, Func`2 predicate)
1>   at UnrealBuildTool.ExternalExecution.ExecuteHeaderToolIfNecessary(BuildConfiguration BuildConfiguration, UEBuildTarget Target, CppCompileEnvironment GlobalCompileEnvironment, List`1 UObjectModules, FileReference ModuleInfoFileName, ECompilationResult& UHTResult)
1>   at UnrealBuildTool.UnrealBuildTool.RunUBT(BuildConfiguration BuildConfiguration, String[] Arguments, FileReference ProjectFile)
1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\Microsoft.MakeFile.Targets(44,5): error MSB3075: The command ""D:\Epic Games\UE_4.17\Engine\Build\BatchFiles\Build.bat" HelixOriginEditor Win64 DebugGame "E:\Unreal Projects\HelixOrigin\HelixOrigin.uproject" -waitmutex" exited with code 5. Please verify that you have sufficient rights to run this command.
1>Done building project "HelixOrigin.vcxproj" -- FAILED.
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

Time Elapsed 00:00:00.693

Workaround so far is to switch solution configuration from Development Editor to DebugGame Editor. Then it compiles but if I try to compile again, it fails with the above message for both solution configurations. So final solution is to close VS completely and start again.

Forum thread: Annoying compile issue in 4.17 preview 3 - C++ - Unreal Engine Forums

Getting the same issue here as well in the release build

Hey ryanjon2040-

I created a project and added an actor class to it. I have been able to compile successive changes to my class without running into any compile errors. Can you provide more information about the steps you’re using and/or the class you’re compiling? Does this occur in a new project as well?

Hi Doug,

It will compile for the first few times actually. Please try the below steps:

1: Create a new blueprint project and add a new actor c++ class.

2: Let the VS automatically start after first compile and close the editor.

3: Now make a change inside the actor file (like comment or just remove and add semicolon) and compile.

4: Keep repeating step 3 and eventually after 1 or 2 compiles it will fail.

Please note I was using Visual Studio 2017 with the latest update (IIRC it was Update 2).

As others have posted, I’m having a slightly different issue but also related to UHT / UBT.

One computer had VS2015 with Update 3 on it prior to my upgrade. I can build the engine from source, but I can’t compile my project. In 4.16 I had no issues. The other computer has just been upgraded to VS2015 with Update 3 and it won’t compile the project either. I can compile a blank 4.17 project but NOT my own.

I’m using a source build and can’t switch because of changes I’ve made that the project relies on. I’m using Release branch.

Edit: I’ve resolved the above issue - seems UBT is a real pig in this release :confused:

Apologies for this. I’ve submitted a fix in commit 5b2a514bea74d4cb3bf0508ccecf49bba1752522.

We’ll try to get a QFE out as soon as possible.

Links to download the QFE for this issue are available here:

Current Available Quick-Fix Solutions - Announcements - Unreal Engine Forums