Problem with cook for dedicated server of project

hi i use unreal 4.15 and try to package it for dedicated server
i use this tutorial

in this section

  1. Target file instructions for engine version 4.15
    for create mygametarget.cs
    i create a file name b562server.Target.cs
    and copy past this code

    using UnrealBuildTool;
    using System.Collections.Generic;

    [SupportedPlatforms(UnrealPlatformClass.Server)]
    public class b562ServerTarget : TargetRules
    {
    public b562ServerTarget(TargetInfo Target)
    {
    Type = TargetType.Server;
    bUsesSteam = false;
    }

    //
    // TargetRules interface.
    //
    
    public override void SetupBinaries(
        TargetInfo Target,
        ref List<UEBuildBinaryConfiguration> OutBuildBinaryConfigurations,
        ref List<string> OutExtraModuleNames
        )
    {
        OutExtraModuleNames.Add("b562");
    }
    

    }

but when i generat code for visual studio have a error

Running D:/unreal source//Engine/Binaries/DotNET/UnrealBuildTool.exe -projectfiles -project=“E:/server/b562/b562.uproject” -game -engine -progress
Discovering modules, targets and source code for project…
UnrealBuildTool Exception: ERROR: Expecting to find a type to be declared in a target rules named ‘b562Target’. This type must derive from the ‘TargetRules’ type defined by Unreal Build Tool.

Hey mblogest,

Give that guide a try instead. However, note that you’ll need to omit the last three functions in your Target.cs file for 4.15. I’ve successfully built a dedicated server using that method multiple times. Also, give it a shot in a clean project to ensure that there is not an issue with your current project.

Let me know if that helps