This was working for me up until I upgraded my engine from 4.17.2 to 4.20.2. Now, no matter what project I attempt to build the DevelopmentServer configuration with, I get the following error:
1>------ Build started: Project: BattleRoyale, Configuration: Development_Server x64 ------
1>Performing full C++ include scan (building a new target)
1>Using 'git status' to determine working set for adaptive non-unity build.
1>Creating makefile for BattleRoyaleServer (no existing makefile)
1>UnrealBuildTool : error : Couldn't find target rules file for target 'UE4Server' in rules assembly 'UE4Rules, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'.
1> Location: D:\UE4Projects\installed-build\Windows\Engine\Intermediate\Build\BuildRules\UE4Rules.dll
1> Target rules found:
1> (see ../Programs/UnrealBuildTool/Log.txt for full exception trace)
1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\Microsoft.MakeFile.Targets(44,5): error MSB3075: The command "D:\UE4Projects\installed-build\Windows\Engine\Build\BatchFiles\Build.bat BattleRoyaleServer Win64 Development "C:\Workspace\src\github.com\shaunrandall\battle_royale\BattleRoyale.uproject" -WaitMutex -FromMsBuild" exited with code 5. Please verify that you have sufficient rights to run this command.
1>Done building project "BattleRoyale.vcxproj" -- FAILED. ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
I know my source engine is setup correctly because I can use it to build the DevelopmentServer configuration for any project without issue.
I have added the following lines to my InstalledEngineBuild.xml:
<!-- Tag the generated includes for this target -->
<Tag Files="Engine/Intermediate/Build/Win64/UE4/Inc/...;Engine/Plugins/.../Intermediate/Build/Win64/UE4/Inc/..." With="#UE4Game Win64 Includes"/>
<Tag Files="Engine/Intermediate/Build/Win64/UE4Server/Inc/...;Engine/Plugins/.../Intermediate/Build/Win64/UE4Server/Inc/..." With="#UE4Game Win64 Includes"/>
The only things that have changed are:
Source engine version (4.17.2 -> 4.20.2)
The Visual Studio version (2015 -> 2017)
The things I have tried are:
Delete the following project folders then regenerate visual studio project files: Binaries, Intermediate, Saved, .vs and .sln file.
Ensure VS 2017 is installed with “Desktop development with C++” and “.NET desktop development” and “Game development with C++”.
Create a Game.uprojectdirs file in the root of my installed build directory that points to my project location.
Create a brand new project from the installed build, then copy the generated <ProjectName>EditorTarget.cs to create a <ProjectName>Server.Target.cs to ensure the format was correct.
Rebuild the installed engine 3 different times.
Anybody have any ideas, cause I’m running out…hence me creating a thread about it.
You need source engine build (i.e. GitHub source code download) to do it. Installed builds (from Editor) don’t include everything you need. This tutorial (sorta outdated, but made edits up to 4.18) provides the methods in building Server/Editor targets.
Looks like this limitation of Installed Engine Build is lifted already, at least for UE 4.26.x .
Documentation is still missing it, and is misleading. But in [FONT=Courier New]Engine\Build\InstalledEngineBuild.xml there are already options for doing this (and selecting many other things like included configurations) too:
<!-- Set up target types -->
<Option Name="WithClient" Restrict="true|false" DefaultValue="false" Description="Include precompiled client targets"/>
<Option Name="WithServer" Restrict="true|false" DefaultValue="false" Description="Include precompiled server targets"/>
<!-- Which game configurations to include for packaged applications -->
<Option Name="GameConfigurations" DefaultValue="DebugGame;Development;Shipping" Description="Which game configurations to include for packaged applications"/>
Use it with ‘[FONT=Courier New]-set:WithClient=true and -set:WithServer=true’ when invoking BuildGraph command with this script.