Custom foliage type missing foliage dependency

I’m trying to create a custom class of Foliage type to include some additional properties, however after adding a new class derived from FoliageType I get the following error:

Clearly, there is a dependency missing from my build, but I can’t figure out why, because the class [UFoliageType][2] belongs to module Foliage which is included in my build dependencies.

using UnrealBuildTool;

public class SGame : ModuleRules
    public SGame(ReadOnlyTargetRules Target) : base(Target)
        PCHUsage = PCHUsageMode.UseExplicitOrSharedPCHs;

        PublicDependencyModuleNames.AddRange(new string[] { "Core", "CoreUObject", "Engine", "InputCore", "UMG", "Foliage" });

        PrivateDependencyModuleNames.AddRange(new string[] { });


Any ideas what I’m doing wrong?

EDIT: This might have to do something with the fact that FoliageType uses a MinimalAPI specifier. Is there any workaround for this?

Those type of errors seem to be an indication that we are not supposed to extend from that class.

Here’s another similar error: