can't include "Online.h" even after altering build.cs

My build.cs file looks like this:



using UnrealBuildTool;

public class Smashy : ModuleRules
{
	public Smashy(TargetInfo Target)
	{
		PublicDependencyModuleNames.AddRange(
            new string] {
                                "Core",
				"CoreUObject",
				"Engine",
				"OnlineSubsystem",
				"OnlineSubsystemUtils",
				"AssetRegistry",
                                "AIModule",
                         }
                );
	}
}


And i’ve rebuilt my solution. But including “Online.h” in any of my files results in a “cannot open source file” error. Any ideas?

1 Like

I solved this by changing the way i rebuilt the solution. instead of rebuilding from inside VS2013, i right clicked the uproject file in explorer and hit “generate visual studio project files”.

3 Likes

Thanks for that. That fixed it for me too.

Sep/2016 - ue4 4.12.5 confirmed fix for me as well! Thanks!

6/24/2017 4.16.1 this solved my problem as well but for OnlineSubsystem.h

Thanx. You saved my day. :slight_smile: