Automatic packaging, missing receipt

Hello everyone,

I have a problem during the automatic packaging of my projet, but before that here’s how it’s launched :
I have a build machine which uses teamcity to monitor a perforce server.
When a change is detected, teamcity will make a checkout and launch an ant script to build the projet.
The ant script is just a wrapper around “runuat.bat”.
Here’s the relevant part :

        <exec executable="cmd" dir="${ue4.build}" failonerror="true">
          <arg value="/c" />
          <arg value="RunUAT.bat" />
          <arg value="BuildCookRun" />
          <arg value='-project="${ue4.runuat.project}"' />
          <arg value="-noP4" />
          <arg value='-platform=${ue4.runuat.platform}' />
          <arg value="-allmaps" />
          <arg value='-clientconfig=${ue4.runuat.clientconfig}' />
          <arg value="-cook" />
          <arg value="-stage" />
          <arg value="-archive" />
          <arg value='-archivedirectory="${ue4.runuat.archivedirectory}"' />
        </exec>

Here’s the generated command that will be executed

runuat.bat BuildCookRun -project=C:\TeamCity\buildAgent\work\6fd58aa5fd550fb0\Test.uproject -noP4 -platform=Win64 -allmaps -clientconfig=Development -cook -stage -archive -archivedirectory=C:\TeamCity\buildAgent\work\6fd58aa5fd550fb0\Client-build

Anyway, the whole process works, that’s not the problem.

The problem is I recently added Rama’s VictoryBPLibrary plugin as an Engine runtime plugin.
The plugin is correctly installed and works perfectly.

The problem lies with the automation process.

The cooking works without problem, but the “stage” step fails with this error :
**Stage Failed. Missing receipt ‘Test.Target’ **

This only happens on the build machine.
On my development machine, when I package the project for shipping, then there is no problem.
That’s normal, because when I do the package shipping, the receipt is generated.
I can find it in the Intermediate\Source folder.

But that doesn’t seem to be the case on the built machine.

So, does anyone know how I can make my build machine automatically generate the receipt ?

For now my project is Blueprint only, so I don’t have a “Test.Target.cs” file, should I create a dummy c++ class just to have that file ?
Is it even the same file that lies in the source folder or is it different ?

For information, yes I do have visual studio 2015 (community edition) installed on the build machine.
Even if I don’t have c++ files right now, that is “expected”, so the build machine is more or less ready to handle that.

I’m going to try to add a dummy c++ class just to see if that’ll help and report back, but if someone has an idea, I will be glad to hear it.

Thank you.

Hello ,

I’ve never set up a build system like the one you mentioned, but from what you’ve explained, I think you’re on the right track. It may have to do with including Rama’s Victory plugin. It’s been a while since I’ve taken a look at it but if I remember correctly, it’s code based and is requiring a compile whenever you package your project which could be causing this issue to arise. I’d be interested to know the results of whenever you try adding some C++ to the project.

Hello everyone,

I’ve managed to to solve my problem.

My idea (adding a dummy c++ class) dit not solve my problem but it somehow helped me.
Even with the dummy c++ class I was getting the same error, that could only mean one thing : I was missing a step in my build configuration as I could not correctly build and package a projet with c++ code.

So after searching a little bit I found this question :

In that question, someone was having the same problem as I was having (with the dummy c++ class) in a somewhat similar configuration (build system).
He finally found a solution for his situation.
His solution was to call UnrealBuildTool directly like this :

C:/Program Files (x86)/Epic Games/4.11/Engine/Binaries/DotNET/UnrealBuildTool.exe ProjectX Development Win64 -project="D:/ProjectX/ProjectX.uproject" -editorrecompile -progress -noubtmakefiles -NoHotReloadFromIDE -2015

I tested that, and it worked too for my problem.
I removed the dummy c++ class and that worked too.

I was not happy about the call of UnrealBuildTool directly, because it should not be necessary.
You should only call runuat.
So after searching a bit more and looking and the available parameters, I finally found it.
Here’s the step I was missing :

runuat.bat BuildTarget -TargetPlatforms=Win64 -Config=Development -Project=C:\TeamCity\buildAgent\work\6fd58aa5fd550fb0\Test.uproject -Target=Game

The BuildTarget step will generate (or compile) all the necessary intermediate files.
In my case, I need that step in a (for now) Blueprint only projet because I use Rama’s VictoryBPLibrary runtime plugin.
That step will generate the receipt required for the other steps to correctly find and package the plugin with my game.

If you don’t use that plugin, but have c++ code, then I think (not tested) you also need to do that step.
That step will generate/compile the UE4Editor-XXX.dll file required for the next steps.

Anyway, in my situation, the situation is resolved.
I hope the information I put here will help any future searches.

Have a nice day all.

click “launch” in your PC, it will auto build .taget file(in the folder binaries/win64).
If failed, try delete folder win64 and restart editor