# No server.build.cs file when making a dedicated server?

**URL:** <https://forums.unrealengine.com/t/no-server-build-cs-file-when-making-a-dedicated-server/481646>\
**Category:** Platform & Builds\
**Tags:** dedicated-server, unreal-engine, packaging-projects, question\
**Created:** [April 9, 2021, 8:26am UTC](https://forums.unrealengine.com/t/no-server-build-cs-file-when-making-a-dedicated-server/481646 "2021-04-09T08:26:21Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Phonicz](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Phonicz](https://forums.unrealengine.com/u/Phonicz)\
**Post date:** [April 9, 2021, 8:26am UTC](https://forums.unrealengine.com/t/no-server-build-cs-file-when-making-a-dedicated-server/481646/1 "2021-04-09T08:26:21Z")

</div>

So I was told I should have a projectname.server.build.cs file in my source folder after packaging my dedicated server.

My dedicated server is working, package works and it runs fine, but I cannot find that file anywhere and need it so I can input some steam settings to get my servers to show up in game.

Has anyone ever heard of this happening / have any ideas about it?

Thanks for any help anyone may be able to lend

---

<div class="post-metadata">

**Author:** ![GrumbleBunny](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@GrumbleBunny](https://forums.unrealengine.com/u/GrumbleBunny)\
**Post date:** [April 9, 2021, 9:01am UTC](https://forums.unrealengine.com/t/no-server-build-cs-file-when-making-a-dedicated-server/481646/2 "2021-04-09T09:01:52Z")

</div>

build.cs files are for defining a code module, I’ve never made one for my servers. Are you looking for ProjectNameServer.Target.cs? That’s the file that defines a build target which you need for a dedicated server. It should in your source directory next to ProjectNameEditor.Target.cs and ProjectName.Target.cs

If it is something you need to add to a .build.cs file, you should be able to add it to your ProjectName.Build.cs which will be in Source/ProjectName/

---

<div class="post-metadata">

**Author:** ![Phonicz](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Phonicz](https://forums.unrealengine.com/u/Phonicz)\
**Post date:** [April 9, 2021, 7:24pm UTC](https://forums.unrealengine.com/t/no-server-build-cs-file-when-making-a-dedicated-server/481646/3 "2021-04-09T19:24:33Z")

</div>

Thank you for the response GrumbleBunny!. I did indeed look at my projectname.build.cs file, but when I inputted the lines needed there was a packaging error when I try to re-package it as a server.

error CS0103: The name ‘GlobalDefinitions’ does not exist in the current context.

Lines I added:

```
    GlobalDefinitions.Add("UE4_PROJECT_STEAMSHIPPINGID = 480");
    GlobalDefinitions.Add("UE4_PROJECT_STEAMPRODUCTNAME = \"TestName\"");
    GlobalDefinitions.Add("UE4_PROJECT_STEAMGAMEDIR = \"xxx\"");
    GlobalDefinitions.Add("UE4_PROJECT_STEAMGAMEDESC = \"Test Game Desc\"");

```

I have the servers working otherwise, just they never show up in-game in the server browser, Only in the steam server browser. So was told this would help but maybe thats the wrong information?

Nonetheless thank you for your assistance.

---

<div class="post-metadata">

**Author:** ![GrumbleBunny](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@GrumbleBunny](https://forums.unrealengine.com/u/GrumbleBunny)\
**Post date:** [April 9, 2021, 8:25pm UTC](https://forums.unrealengine.com/t/no-server-build-cs-file-when-making-a-dedicated-server/481646/4 "2021-04-09T20:25:21Z")

</div>

Where did you put those lines in the file?

---

<div class="post-metadata">

**Author:** ![Phonicz](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Phonicz](https://forums.unrealengine.com/u/Phonicz)\
**Post date:** [April 9, 2021, 9:55pm UTC](https://forums.unrealengine.com/t/no-server-build-cs-file-when-making-a-dedicated-server/481646/5 "2021-04-09T21:55:09Z")

</div>

I put them in my projectnameserver.target.cs file

Theyre in the second section of the file.

> Blockquote

// Copyright Epic Games, Inc. All Rights Reserved.

using UnrealBuildTool;  
using System.Collections.Generic;

public class SCPFFServerTarget : TargetRules //Change this line according to the name of your project  
{  
public SCPFFServerTarget(TargetInfo Target) : base(Target) //Change this line according to the name of your project  
{  
Type = TargetType.Server;  
DefaultBuildSettings = BuildSettingsVersion.V2;  
ExtraModuleNames.Add(“testgame”); //Change this line according to the name of your project

```
    GlobalDefinitions.Add("UE4_PROJECT_STEAMSHIPPINGID = 1425660");
    GlobalDefinitions.Add("UE4_PROJECT_STEAMPRODUCTNAME = \"testgame\"");
    GlobalDefinitions.Add("UE4_PROJECT_STEAMGAMEDIR = \"xxx\"");
    GlobalDefinitions.Add("UE4_PROJECT_STEAMGAMEDESC = \"Test Game Desc\"");

}

```

}

I now just get this error though when building the game in VS"

 ![335440-nodirectory.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/d/2/9/d29bdf536260d5cf5709a5109596f7419cded2f7.png)

---

<div class="post-metadata">

**Author:** ![Phonicz](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Phonicz](https://forums.unrealengine.com/u/Phonicz)\
**Post date:** [April 9, 2021, 9:55pm UTC](https://forums.unrealengine.com/t/no-server-build-cs-file-when-making-a-dedicated-server/481646/6 "2021-04-09T21:55:50Z")

</div>

It seems its thinking those GlobalDefintions are references to files oddly.
