UE 5.1 - Unable to package project for windows with Shipping configuration

Hi all.
I’m working on a game in UE 5.1 that uses both c++ code and blueprints.
Up until recently, I could package the project for Windows using the Shipping configuration without issues. However, recently I’ve started to get the following error (which does not appear when I package the project using any of the other configurations).

[2023.07.10-13.50.45:061][ 52]UATHelper: Packaging (Windows): ********** BUILD COMMAND STARTED **********
[2023.07.10-13.50.45:072][ 52]UATHelper: Packaging (Windows): Running: <UE_5.1 folder>\Engine\Binaries\ThirdParty\DotNet\6.0.302\windows\dotnet.exe “<UE_5.1 folder>\Engine\Binaries\DotNET\UnrealBuildTool\UnrealBuildTool.dll” BloccBuster Win64 Shipping -Project=\BloccBuster.uproject -Clean -NoHotReload \BloccBuster.uproject -NoUBTMakefiles -remoteini=“” -skipdeploy -nobuilduht -log=“\AppData\Roaming\Unreal Engine\AutomationTool\Logs\D+UnrealEngine+UE_5.1\UBT-BloccBuster-Win64-Shi
pping.txt”
[2023.07.10-13.50.45:311][ 67]UATHelper: Packaging (Windows): Log file: \AppData\Roaming\Unreal Engine\AutomationTool\Logs\D+UnrealEngine+UE_5.1\UBT-BloccBuster-Win64-Shipping.txt
[2023.07.10-13.50.45:395][ 72]UATHelper: Packaging (Windows): Cleaning BloccBuster binaries…
[2023.07.10-13.50.45:686][ 89]UATHelper: Packaging (Windows): Took 0.6189053999999999s to run dotnet.exe, ExitCode=0
[2023.07.10-13.50.45:686][ 89]UATHelper: Packaging (Windows): Running: <UE_5.1 folder>\Engine\Binaries\ThirdParty\DotNet\6.0.302\windows\dotnet.exe “<UE_5.1 folder>\Engine\Binaries\DotNET\UnrealBuildTool\UnrealBuildTool.dll” BloccBuster Win64 Shipping -Project=\BloccBuster.uproject \BloccBuster.uproject -NoUBTMakefiles -remoteini=“” -skipdeploy -Manifest=\Intermediate\Build\Manifest.xml -NoHotReload -log=“\AppData\Roaming\Unreal Engine\AutomationToo
l\Logs\D+UnrealEngine+UE_5.1\UBT-BloccBuster-Win64-Shipping_2.txt”
[2023.07.10-13.50.45:978][106]UATHelper: Packaging (Windows): Log file: \AppData\Roaming\Unreal Engine\AutomationTool\Logs\D+UnrealEngine+UE_5.1\UBT-BloccBuster-Win64-Shipping_2.txt
[2023.07.10-13.50.46:060][111]UATHelper: Packaging (Windows): Using ‘git status’ to determine working set for adaptive non-unity build ().
[2023.07.10-13.50.46:738][151]UATHelper: Packaging (Windows): Parsing headers for BloccBuster
[2023.07.10-13.50.46:738][151]UATHelper: Packaging (Windows): Running Internal UnrealHeaderTool \BloccBuster.uproject \Intermediate\Build\Win64\BloccBuster\Shipping\BloccBuster.uhtmanifest -WarningsAsErrors -installed
[2023.07.10-13.50.47:586][199]UATHelper: Packaging (Windows): Total of 58 written
[2023.07.10-13.50.47:596][199]UATHelper: Packaging (Windows): Reflection code generated for BloccBuster in 0.8539733 seconds
[2023.07.10-13.50.47:867][216]UATHelper: Packaging (Windows): Missing precompiled manifest for ‘MessageLog’, ‘<UE_5.1 folder>\Engine\Intermediate\Build\Win64\UnrealGame\Shipping\MessageLog\MessageLog.precompiled’. This module was most likely not flagged for being included in a precompiled build - set ‘PrecompileForTargets = PrecompileTargetsType.Any;’ in MessageLog.build.cs to override. If part of a plugin, also check if its ‘Type’ is correct.
[2023.07.10-13.50.47:898][217]UATHelper: Packaging (Windows): Took 2.2127183s to run dotnet.exe, ExitCode=6
[2023.07.10-13.50.47:908][218]UATHelper: Packaging (Windows): UnrealBuildTool failed. See log for more details. (\AppData\Roaming\Unreal Engine\AutomationTool\Logs\D+UnrealEngine+UE_5.1\UBT-BloccBuster-Win64-Shipping_2.txt)
[2023.07.10-13.50.47:919][219]UATHelper: Packaging (Windows): AutomationTool executed for 0h 0m 5s
[2023.07.10-13.50.47:919][219]UATHelper: Packaging (Windows): AutomationTool exiting with ExitCode=6 (6)
[2023.07.10-13.50.47:971][222]UATHelper: Packaging (Windows): BUILD FAILED
[2023.07.10-13.50.47:985][222]PackagingResults: Error: Unknown Error

Recent changes that I can think of are just that I have started adding functional tests, but I’m not sure if this was the trigger. I’ve hit this problem twice; the first time I noticed that the file Default.ini had a lot of entries (I saw that if you edit in the Project settings the entry “Test directories to not search”, instead of adding just this entry to the Default.ini file, it adds basically an entry for every property in the Packaging section). I reverted the changes in Default.ini and I managed to package the project a couple of times. However, the issue has appeared again, and just editing the Default.ini file is not fixing it.

I’m a bit unclear about how to troubleshoot this issue, so any assistance will be much appreciated. From what I’ve seen in other posts, similar errors appear when using plugins that have issues. However, in my case it’s complaining about MessageLog, which is part of the Editor as far as I understand. If a plugin is causing this I don’t know how to identify it. The log file mentioned in the output does not seem to add more information to the error.

I checked UE_5.1\Engine\Source\Developer\MessageLog\MessageLog.Build.cs, and I saw:
if (Target.bCompileAgainstEngine && Target.Configuration != UnrealTargetConfiguration.Shipping)
{
PrecompileForTargets = PrecompileTargetsType.Any;
}

This is a read only file, so I believe I should not change it, and this code is there for a reason. I’m also not sure if the fact that the error appears for MessageLog is a red herring, and the underlying cause is elsewhere.

Has anybody encountered this before? I’m happy to share more details if needed.
Thanks!

1 Like

Delete your intermediate Folder, your Saved Folder , your Build Folder ,your Binaries Folder, your VS solution file, not the source folder onlye the .sln file.
Right click your project file and Generate Visual Studio project files.
open your VS solution and compile.
Open your project in unreal and pack it with shipping configuration.
Let me know if it work :wink:

Hi @TrueFranco.

Thanks for your reply. :grinning: I’ve tried your suggestion, but unfortunately I’m still getting the same error (Missing precompiled manifest for ‘MessageLog’).

Do you have any other suggestions? I’m new to Unreal Engine, so I’m not sure if I should change any of the Packaging related settings, or something else.

Just a quick update:

  • I’ve added 3 new modules to the project, and split the code I have among them: one for the core functionality, one for shared subsystems and one for testing classes.
    The first 2 are Runtime modules, while the testing one is a DeveloperTool module. My reasoning was that this way the testing code would not get packaged with the game in the Shipping configuration.

This change does not seem to have made any difference, and I’m still getting the same error while packaging the game in Shipping configuration.

I’d really appreciate some troubleshooting tips for this case - I’m assuming my functional tests are the culprit, but chances are they are not, and I just don’t know what to look for.

I’ll keep investigating from my side and I’ll report if I find anything.

Thanks all. :grinning:

Hi all.

Here is another update:

I’ve been looking at all of the commits I have in my git history, and I’ve pinpointed the first one where this issue started to happen. If I’m right, this started to happen when I added “FunctionalTesting” to the Modules section of the .uproject file.

Initially I had:

"Modules": [
{
"Name": "BloccBuster",
"Type": "Runtime",
"LoadingPhase": "Default",
"AdditionalDependencies": [
"Engine"
]
}
],

and then I changed to:

"Modules": [

{
"Name": "BloccBuster",
"Type": "Runtime",
"LoadingPhase": "Default",
"AdditionalDependencies": [
"Engine",
"FunctionalTesting"
]
}
],

Without this addition I get build errors related to the functional tests.
Since then I’ve made some more changes, like splitting my code into different modules, and creating a class that inherits from AFunctionalTest so I can customize my tests in an easier way rather than doing everything in blueprints.

Does anybody know if there is some config/step I have missed?

Thanks! :slight_smile:

Good news. I’ve finally managed to package the project with a Shipping configuration once again. :grinning:

As far as I understand, the issue was that I had in the uproject file a module with an entry in AdditionalDependencies that includes “FunctionalTesting” (and it doesn’t matter if it’s the main module of the project, or a module you create afterwards). Here is an example before the fix:

{
"Name": "TestModule",
"Type": "DeveloperTool",
"LoadingPhase": "Default",
"AdditionalDependencies": [
"FunctionalTesting",
"Engine"
]
},

Although I got all of my testing code in this module, the testing levels and blueprints that use this code are not considered to be part of the module as far as I understand. So the testing blueprints are included in the Shipping build, and then they are missing the dependency, causing the error. (The error message is a bit misleading in my opinion - not sure if this could be improved).

So the full solution has been to create a new plugin where I could extract all of the testing code, plus the test levels and blueprints. This plugin only has a module right now, of type DeveloperTool (so it’s not included in Shipping builds).

  • Note that this module does not need a dependency with FunctionalTesting to work, but you still need to add FunctionalTesting in PrivateDependencyModuleNames in its Build.cs file.
  • I also made sure that the"CanContainContent" property of the plugin is set to true so that I can add the test levels and blueprints.

After this, I removed my old TestModule from the main project, so now I don’t have any module with additional dependencies to FunctionalTesting.

I’m not 100% sure if this is the only solution, or even if it’s the best solution, so if anybody else has other ideas, please let other people know.

I’d also like to know if it’s the standard procedure to move all of the testing code to a plugin (even for other types/levels of testing). If this is the case, maybe the documentation could be improved to reflect this.

5 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.