Compile error after adding basic code

Hi,

I want to experiment with loading text files via Blueprint. I created a brand new project, with no starter content, and added the code from this page: How can I load text from file with blueprint? - UI - Epic Developer Community Forums

I haven’t done anything else. Yet when I click compile inside the UE4 editor, it fails and I get the following errors in the log:

Anyone have any idea what’s going on here?

This is unrelated to the code that you added, it’s a C# problem linked to UnrealBuildTool. It could be a problem with Mono, or with the conversion of a 4.8 project to 4.9. Try to reinstall UE4 4.9 from a clean base.

I’m getting exactly the same error. Unreal Engine 4.9.2, OS X 10.10.5. I’m just following the tutorial at 3 - Write and Compile C++ Code | Unreal Engine Documentation, with a new project. That error comes up in the log when pressing the Compile button inside UE.

I fixed this by commenting out the line that says “PrivateDependencyModuleNames.AddRange(new string] { });” in Source/MyProject/MyProject.Build.cs. The empty array of dependencies here was obviously causing PatchActionHistoryForHotReloadAssembling to fail.