# Compile Project from Batch file?

**URL:** <https://forums.unrealengine.com/t/compile-project-from-batch-file/278979>\
**Category:** Programming & Scripting\
**Tags:** unreal-engine\
**Created:** [March 29, 2014, 10:19pm UTC](https://forums.unrealengine.com/t/compile-project-from-batch-file/278979 "2014-03-29T22:19:34Z")\
**Posts on this page:** 19\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous\_user\_b9fdc589](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_b9fdc589](https://forums.unrealengine.com/u/anonymous_user_b9fdc589)\
**Post date:** [March 29, 2014, 10:19pm UTC](https://forums.unrealengine.com/t/compile-project-from-batch-file/278979/1 "2014-03-29T22:19:34Z")

</div>

Hello,

During the beta I was using the following command to compile my **uproject** outside of Visual Studios :

```
"C:\Rocket\Engine\Binaries\DotNET\UnrealBuildTool.exe" ExilEditor Win64 Development "C:\Rocket\Projects\Exil\Exil.uproject" -rocket

```

Now under the official version, I tried a similar command :

```
"C:\GitHub\UnrealEngine\Engine\Binaries\DotNET\UnrealBuildTool.exe" ExilEditor Win64 Development "V:\UE4Projects\Exil.uproject"

```

Unfortunately this command alone seems to not work anymore. I get the following error :

```
ERROR: Couldn't find target rules file for target 'ExilEditor' in rules assembly 'ExilEditorModuleRules, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'.
Location: V:\UE4Projects\Intermediate\Build\BuildRules\ExilEditorModuleRules.dll
Target rules found:
        UE4Client - C:\GitHub\UnrealEngine\Engine\Source\UE4Client.Target.cs
        UE4Editor - C:\GitHub\UnrealEngine\Engine\Source\UE4Editor.Target.cs
        UE4Game - C:\GitHub\UnrealEngine\Engine\Source\UE4Game.Target.cs
        UE4Server - C:\GitHub\UnrealEngine\Engine\Source\UE4Server.Target.cs
        BlankProgram - C:\GitHub\UnrealEngine\Engine\Source\Programs\BlankProgram\BlankProgram.Target.cs
        CrashReportClient - C:\GitHub\UnrealEngine\Engine\Source\Programs\CrashReporter\CrashReportClient\CrashReportClient.Target.cs
        MinidumpDiagnostics - C:\GitHub\UnrealEngine\Engine\Source\Programs\CrashReporter\MinidumpDiagnostics\MinidumpDiagnostics.Target.cs
        UnrealLaunchDaemon - C:\GitHub\UnrealEngine\Engine\Source\Programs\IOS\UnrealLaunchDaemon\UnrealLaunchDaemon.Target.cs
        ShaderCompileWorker - C:\GitHub\UnrealEngine\Engine\Source\Programs\ShaderCompileWorker\ShaderCompileWorker.Target.cs
        SlateViewer - C:\GitHub\UnrealEngine\Engine\Source\Programs\SlateViewer\SlateViewer.Target.cs
        SymbolDebugger - C:\GitHub\UnrealEngine\Engine\Source\Programs\SymbolDebugger\SymbolDebugger.Target.cs
        UnrealFileServer - C:\GitHub\UnrealEngine\Engine\Source\Programs\UnrealFileServer\UnrealFileServer.Target.cs
        UnrealFrontend - C:\GitHub\UnrealEngine\Engine\Source\Programs\UnrealFrontend\UnrealFrontend.Target.cs
        UnrealHeaderTool - C:\GitHub\UnrealEngine\Engine\Source\Programs\UnrealHeaderTool\UnrealHeaderTool.Target.cs
        UnrealLightmass - C:\GitHub\UnrealEngine\Engine\Source\Programs\UnrealLightmass\UnrealLightmass.Target.cs
        UnrealPak - C:\GitHub\UnrealEngine\Engine\Source\Programs\UnrealPak\UnrealPak.Target.cs

```

* * *

Any idea what to change/add to make the compilation doable outside Visual Studios ? I have no clues of what to do regarding this error message.

---

<div class="post-metadata">

**Author:** ![RalphTrickey](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@RalphTrickey](https://forums.unrealengine.com/u/RalphTrickey)\
**Post date:** [March 29, 2014, 11:33pm UTC](https://forums.unrealengine.com/t/compile-project-from-batch-file/278979/2 "2014-03-29T23:33:25Z")

</div>

I’d try UE4Game instead of Development. If that doesn’t work, someone else may have the answer.

---

<div class="post-metadata">

**Author:** ![DarthB](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@DarthB](https://forums.unrealengine.com/u/DarthB)\
**Post date:** [March 30, 2014, 6:50am UTC](https://forums.unrealengine.com/t/compile-project-from-batch-file/278979/3 "2014-03-30T06:50:49Z")

</div>

I would assume that something inside the \*Target.cs or \*.Build.cs files that control the unreal build tool has changed from beta to the current version.

Maybe there are differences between your ExilEditor.target.cs and the \*Target.cs files that ship with the engine that indicate the error?

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_b9fdc589](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_b9fdc589](https://forums.unrealengine.com/u/anonymous_user_b9fdc589)\
**Post date:** [March 30, 2014, 2:10pm UTC](https://forums.unrealengine.com/t/compile-project-from-batch-file/278979/4 "2014-03-30T14:10:27Z")

</div>

I tried, it doesn’t work. :\

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_b9fdc589](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_b9fdc589](https://forums.unrealengine.com/u/anonymous_user_b9fdc589)\
**Post date:** [March 30, 2014, 2:12pm UTC](https://forums.unrealengine.com/t/compile-project-from-batch-file/278979/5 "2014-03-30T14:12:16Z")

</div>

So, I tried :

```
"C:\GitHub\UnrealEngine\Engine\Build\BatchFiles\Build.bat" UE4Game Win64 Development

```

This worked, it recompiled the full engine. So my thought here is that calling the UnrealBuildTool with a target that doesn’t exists locally produce an error. I have no idea why during the Rocket Beta it was working globally and not now anymore…

Or maybe it’s because I use the engine version I compiled myself ?

---

<div class="post-metadata">

**Author:** ![Kris](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/kris/32/758129_2.png) [@Kris](https://forums.unrealengine.com/u/Kris)\
**Post date:** [March 30, 2014, 5:41pm UTC](https://forums.unrealengine.com/t/compile-project-from-batch-file/278979/6 "2014-03-30T17:41:37Z")

</div>

I included a batch file that does exactly this in the Notepad++ tutorial on the wiki.

> **[A new, community-hosted Unreal Engine Wiki](https://forums.unrealengine.com/t/a-new-community-hosted-unreal-engine-wiki/141494)**
>
> After over a year in maintenance mode, the official Unreal Engine Wiki is now permanently offline. These resources now live on a new community-run Unreal Engine Community Wiki — ue4community.wiki! You will be able to find content from the official...

From memory, you need to add “-rocket”.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_b9fdc589](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_b9fdc589](https://forums.unrealengine.com/u/anonymous_user_b9fdc589)\
**Post date:** [March 30, 2014, 6:18pm UTC](https://forums.unrealengine.com/t/compile-project-from-batch-file/278979/7 "2014-03-30T18:18:18Z")

</div>

I already tried, it has no effect. But thanks for the zip file, I will look into it.

---

<div class="post-metadata">

**Author:** ![Kris](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/kris/32/758129_2.png) [@Kris](https://forums.unrealengine.com/u/Kris)\
**Post date:** [March 30, 2014, 6:28pm UTC](https://forums.unrealengine.com/t/compile-project-from-batch-file/278979/8 "2014-03-30T18:28:58Z")

</div>

So you did (in the first post).  
My bad ☹

The only other thing I can think of is t try running the UnrealBuildTool from the Unreal Engine directory.  
This is how I have it setup in the batch file:

```
echo Switching to Unreal Engine directory...
pushd "C:\Program Files\Unreal Engine\4.0"
echo Now in "%CD%"
if not exist .\Engine\Binaries\DotNET\UnrealBuildTool.exe goto Error_NoUnrealBuildTool
echo Running UnrealBuildTool...
.\Engine\Binaries\DotNET\UnrealBuildTool.exe %PROJECT_NAME%Editor Win64 Development "%PROJECT_DIR%\%PROJECT_FILE%" -rocket
popd
goto Check_Compile_Error

```

This definitely works with a the **binary build** of Unreal Engine 4.  
Not sure if it will work with a custom build.  
I’ll have to try it myself.  
Converting this to a comment since it didn’t answer it for you (yet).

Please let me know how you get on with it.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_b9fdc589](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_b9fdc589](https://forums.unrealengine.com/u/anonymous_user_b9fdc589)\
**Post date:** [March 30, 2014, 7:01pm UTC](https://forums.unrealengine.com/t/compile-project-from-batch-file/278979/9 "2014-03-30T19:01:29Z")

</div>

I just tried that and it still doesn’t work. I switched to the binary build too just in case. I still get the same problem. It’s like the compiler can’t find my “ExilEditor.Target.cs” which is properly defined inside the “Intermediate\Build\BuildRules\ExilEditorModuleRulesSourceFiles.txt”. :\

---

<div class="post-metadata">

**Author:** ![Kris](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/kris/32/758129_2.png) [@Kris](https://forums.unrealengine.com/u/Kris)\
**Post date:** [March 30, 2014, 7:14pm UTC](https://forums.unrealengine.com/t/compile-project-from-batch-file/278979/10 "2014-03-30T19:14:17Z")

</div>

Probably stating the obvious, but can you build a project based off one of the C++ templates?

I had to recreate my build target based off one of the a C++ templates to make things play nice.

---

<div class="post-metadata">

**Author:** ![terry\_burns85](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@terry\_burns85](https://forums.unrealengine.com/u/terry_burns85)\
**Post date:** [March 30, 2014, 7:34pm UTC](https://forums.unrealengine.com/t/compile-project-from-batch-file/278979/11 "2014-03-30T19:34:07Z")

</div>

Hi ,

It looks like the configurations and target setup has changed since your original command.

ExilEditor would now simply be; Exil  
and Development should now be; Development\_Editor

it may also be worth noting that Win64 may need updating with x64.

Hope this helps,  
Terence

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_b9fdc589](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_b9fdc589](https://forums.unrealengine.com/u/anonymous_user_b9fdc589)\
**Post date:** [March 30, 2014, 7:37pm UTC](https://forums.unrealengine.com/t/compile-project-from-batch-file/278979/12 "2014-03-30T19:37:10Z")

</div>

Still “nope” unfortunately. ☹

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_b9fdc589](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_b9fdc589](https://forums.unrealengine.com/u/anonymous_user_b9fdc589)\
**Post date:** [March 30, 2014, 7:40pm UTC](https://forums.unrealengine.com/t/compile-project-from-batch-file/278979/13 "2014-03-30T19:40:46Z")

</div>

I copied the line from the NMake settings of my Visual Studios project, so I can’t see why I would have made a mistake like that (which was what Epic Games developers recommended me during the Beta). By the way, your suggestion doesn’t work, the configuration name is not recognized at all.

---

<div class="post-metadata">

**Author:** ![terry\_burns85](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@terry\_burns85](https://forums.unrealengine.com/u/terry_burns85)\
**Post date:** [March 30, 2014, 7:46pm UTC](https://forums.unrealengine.com/t/compile-project-from-batch-file/278979/14 "2014-03-30T19:46:22Z")

</div>

It does appear that your project files are stale. Since you upgraded have you had a chance to regenerate the project files. ExilEditor, unless you specifically named your project that, should not exist. instead you should have one project file for your game, and separate configurations.

In my case, I have

Solution ‘UE4’  
-\>Engine  
-\>-\>UE4

-\>Games  
-\>-\>MyGame

and in configurations i have  
Development  
Development Client  
Development Editor  
Development Server

Does your setup resemble this?

Terence

---

<div class="post-metadata">

**Author:** ![terry\_burns85](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@terry\_burns85](https://forums.unrealengine.com/u/terry_burns85)\
**Post date:** [March 30, 2014, 7:59pm UTC](https://forums.unrealengine.com/t/compile-project-from-batch-file/278979/15 "2014-03-30T19:59:21Z")

</div>

Ah, please ignore my previous comment. I overlooked that you had Unreal Build Tool in your command.

I have just attempted to repro your issue on my end and found it was successful.

D:\GitHub\UnrealEngine\Engine\Binaries\DotNET\>UnrealBuildTool.exe HurlGameEditor Win64 Development “D:\GitHub\UnrealEngine\HurlGame”  
Target is up to date.

I’ll see if I can repro your issue another way.

Terence

---

<div class="post-metadata">

**Author:** ![terry\_burns85](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@terry\_burns85](https://forums.unrealengine.com/u/terry_burns85)\
**Post date:** [March 30, 2014, 8:12pm UTC](https://forums.unrealengine.com/t/compile-project-from-batch-file/278979/16 "2014-03-30T20:12:16Z")

</div>

I was just able to repro by altering the path of the uproject,

**D:\GitHub\UnrealEngine\Engine\Binaries\DotNET\>UnrealBuildTool.exe HurlGameEditor Win64 Development "D:\GitHub\UnrealEngine\HurlGame"**  
ERROR: Couldn’t find target rules file for target ‘HurlGameEditor’ in rules assembly ‘HurlGameEditorModuleRules, Version=0.0.0.0, Culture=neutral, PublicKeyToke  
n=null’.  
[…]

Vs

**D:\GitHub\UnrealEngine\Engine\Binaries\DotNET\>UnrealBuildTool.exe HurlGameEditor Win64 Development "D:\GitHub\UnrealEngine\HurlGame\HurlGame.uproject"**  
Target is up to date.

It may be worth verifying your uproject filepath:  
“V:\UE4Projects\Exil.uproject”

Terence

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_b9fdc589](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_b9fdc589](https://forums.unrealengine.com/u/anonymous_user_b9fdc589)\
**Post date:** [March 30, 2014, 8:20pm UTC](https://forums.unrealengine.com/t/compile-project-from-batch-file/278979/17 "2014-03-30T20:20:36Z")

</div>

Ho gosh, I feel so dumb right now. You are right, my path was wrong since the beginning. Hugh. \>\_\>

---

<div class="post-metadata">

**Author:** ![terry\_burns85](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@terry\_burns85](https://forums.unrealengine.com/u/terry_burns85)\
**Post date:** [March 30, 2014, 8:21pm UTC](https://forums.unrealengine.com/t/compile-project-from-batch-file/278979/18 "2014-03-30T20:21:44Z")

</div>

Glad it’s sorted! 🙂

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_24cff47d](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_24cff47d](https://forums.unrealengine.com/u/anonymous_user_24cff47d)\
**Post date:** [January 30, 2018, 4:38am UTC](https://forums.unrealengine.com/t/compile-project-from-batch-file/278979/19 "2018-01-30T04:38:10Z")

</div>

This worked in my case:

```
"path\to\BatchFiles\Build.bat" "MyUProjectEditor" Win64 Development -WarningsAsErrors "path\to\MyUProject.uproject"

```

Note that you have to attach “Editor” suffix to first argument. The build.bat available in BatchFiles folder calles UnrealHeaderTool. Arguments must be in this exact order.
