GameViewportClientClassName is not a valid class name

I having trouble getting the editor to run with my game code. My game is split into two modules. The first is the bulk of the common stuff and the second is stuff that is only needed for clients (mostly menues). Everything compiles just fine. But when I try to start the editor, I get this error:

LogUObjectGlobals:Warning: Failed to find object ‘Class /Script/MyGame.MyViewportClient’
Assertion failed: GameViewportClientClass != NULL [File:/work/unreal/UnrealEngine/Engine/Source/Runtime/Engine/Private/UnrealEngine.cpp] [Line: 1336]

This class is defined and it lives in the client module. I’m guessing that the client module didn’t get included in the editor build. However, I can’t see anything wrong with the target.cs or build.cs files that would cause the client module to be omitted. Is there a trick to getting the editor builds to load multiple game modules?

Dependencies: MyGame ← MyClient ← MyGameEditor

*** MyGameEditor.Target.cs


using UnrealBuildTool;
using System.Collections.Generic;

public class MyGameEditorTarget : TargetRules
{
	public MyGameEditorTarget(TargetInfo Target)
	{
		Type = TargetType.Editor;
	}

	//
	// TargetRules interface.
	//

	public override void SetupBinaries(
		TargetInfo Target,
		ref List<UEBuildBinaryConfiguration> OutBuildBinaryConfigurations,
		ref List<string> OutExtraModuleNames
		)
	{
		OutExtraModuleNames.Add("MyGame");
		OutExtraModuleNames.Add("MyClient");		
        OutExtraModuleNames.Add("MyGameEditor");	
        
        OutExtraModuleNames.Add("OnlineSubsystemNull");
	}
}

*** MyGameEditor.Build.cs


using UnrealBuildTool;

public class MyGameEditor : ModuleRules
{
    public MyGameEditor(TargetInfo Target)
	{
        bFasterWithoutUnity = true;
        MinFilesUsingPrecompiledHeaderOverride = 1;

        if (Target.Platform == UnrealTargetPlatform.Linux)
        {
            // Hack for LINUXMessageBoxExt
            //PublicDependencyModuleNames.AddRange(new string] { "UE4X11" });
        }

		PublicDependencyModuleNames.AddRange(new string] { "Core", "CoreUObject", "Engine", "InputCore", "UnrealEd", "Slate", "SlateCore", "SlateRHIRenderer", "MyClient", "OnlineSubsystem", "OnlineSubsystemUtils" });
	}
}


*** MyClient.Build.cs


using UnrealBuildTool;

public class MyClient : ModuleRules
{
    public MyClient(TargetInfo Target)
    {
        
        PublicDependencyModuleNames.AddRange(new string] { "Core", "AppFramework", "RHI", "UMG", "AssetRegistry", "Slate", "SlateCore", "SlateRHIRenderer", "MyGame" });

		// DynamicallyLoadedModuleNames.Add("OnlineSubsystemNull");
		// DynamicallyLoadedModuleNames.Add("OnlineSubsystemSteam");

		PublicIncludePaths.AddRange(
			new string] {
				"MyClient/Menus/Public"
		});
    }
}


*** MyGame.Build.cs


using UnrealBuildTool;

public class MyGame : ModuleRules
{
    public MyGame(TargetInfo Target)
    {
        bFasterWithoutUnity = true;
        MinFilesUsingPrecompiledHeaderOverride = 1;


        PublicDependencyModuleNames.AddRange(new string] { "Core", "CoreUObject", "Engine", "OnlineSubsystem", "OnlineSubsystemUtils" });

		// DynamicallyLoadedModuleNames.Add("OnlineSubsystemNull");
		DynamicallyLoadedModuleNames.Add("OnlineSubsystemSteam");
    }
}


I think I see the problem, but I don’t know how to fix it. The compile process produced 3 libraries (one for each module) and it seems the editor is only expecting one module and making no effort to load the other two. So the editor needs to know there are three libs in my game, or the three libs need to be rolled into one big lib. What needs to be done?