Packaging error from fresh 5.3.2 build

I recently set up a new project using a source build using 5.3.2. I haven’t modified anything. When I try to package for Windows, I get this error:

UATHelper: Packaging (Windows): D:\Projects\Dust\Dust\Engine\Source\Programs\BaseTextureBuildWorker\BaseTextureBuildWorker.Target.cs(7,45): error CS0246: The type or namespace name 'TextureBuildWorkerTarget' could not be found (are you missing a using directive or an assembly reference?)
UATHelper: Packaging (Windows): D:\Projects\Dust\Dust\Engine\Source\Programs\BaseTextureBuildWorker\BaseTextureBuildWorker.Target.cs(9,59): error CS1729: 'TextureBuildWorkerTarget' does not contain a constructor that takes 1 arguments
UATHelper: Packaging (Windows): D:\Projects\Dust\Dust\Engine\Source\Programs\BaseTextureBuildWorker\BaseTextureBuildWorker.Target.cs(11,3): error CS0103: The name 'LaunchModuleName' does not exist in the current context
UATHelper: Packaging (Windows): System.NullReferenceException: Object reference not set to an instance of an object.
UATHelper: Packaging (Windows):    at AutomationTool.ProjectUtils.CompileAndLoadTargetsAssembly(ProjectProperties Properties, FileReference TargetsDllFilename, Boolean DoNotCompile, List`1 TargetScripts) in D:\Projects\Dust\Dust\Engine\Source\Programs\AutomationTool\AutomationUtils\ProjectUtils.cs:line 483
UATHelper: Packaging (Windows):    at AutomationTool.ProjectUtils.DetectTargetsForProject(ProjectProperties Properties, List`1 ExtraSearchPaths) in D:\Projects\Dust\Dust\Engine\Source\Programs\AutomationTool\AutomationUtils\ProjectUtils.cs:line 461
UATHelper: Packaging (Windows):    at AutomationTool.ProjectUtils.DetectProjectProperties(FileReference RawProjectPath, List`1 ClientTargetPlatforms, List`1 ClientTargetConfigurations, Boolean AssetNativizationRequested) in D:\Projects\Dust\Dust\Engine\Source\Programs\AutomationTool\AutomationUtils\ProjectUtils.cs:line 266
UATHelper: Packaging (Windows):    at AutomationTool.ProjectUtils.GetProjectProperties(FileReference RawProjectPath, List`1 ClientTargetPlatforms, List`1 ClientTargetConfigurations, Boolean AssetNativizationRequested) in D:\Projects\Dust\Dust\Engine\Source\Programs\AutomationTool\AutomationUtils\ProjectUtils.cs:line 178
UATHelper: Packaging (Windows):    at AutomationTool.ProjectParams.AutodetectSettings(Boolean bReset) in D:\Projects\Dust\Dust\Engine\Source\Programs\AutomationTool\AutomationUtils\ProjectParams.cs:line 2388

I’ve taken a look at BaseTextureBuildWorker.Target.cs and I don’t see anything particularly wrong with it. I don’t understand well how C# finds classes, or where to check compilation order.

Any help appreciated!

Can you post the entire log?

Sure

LogUObjectHash: Compacting FUObjectHashTables data took   0.52ms
LogMonitoredProcess: Running Serialized UAT: [ cmd.exe /c ""D:/Projects/Dust/Dust/Engine/Build/BatchFiles/RunUAT.bat"  -ScriptsForProject="D:/Projects/Dust/Dust/Dust.uproject" Turnkey -command=VerifySdk -platform=Win64 -UpdateIfNeeded -EditorIO -EditorIOPort=52146  -project="D:/Projects/Dust/Dust/Dust.uproject" BuildCookRun -nop4 -utf8output -nocompileeditor -skipbuildeditor -cook  -project="D:/Projects/Dust/Dust/Dust.uproject" -target=Dust  -unrealexe="D:\Projects\Dust\Dust\Engine\Binaries\Win64\UnrealEditor-Cmd.exe" -platform=Win64 -stage -archive -package -build -pak -iostore -compressed -p
rereqs -archivedirectory="D:/Projects/Dust/PackagedBuilds" -clientconfig=Development" -nocompile -nocompileuat ]
UATHelper: Packaging (Windows): Running AutomationTool...
UATHelper: Packaging (Windows): Using bundled DotNet SDK version: 6.0.302
UATHelper: Packaging (Windows): Starting AutomationTool...
UATHelper: Packaging (Windows): Parsing command line: -ScriptsForProject=D:/Projects/Dust/Dust/Dust.uproject Turnkey -command=VerifySdk -platform=Win64 -UpdateIfNeeded -EditorIO -EditorIOPort=52146 -project=D:/Projects/Dust/Dust/Dust.uproject BuildCookRun -nop4 -utf8output -nocompileeditor -skipbuildeditor -cook -project=D:/Projects/Dust/Dust/Dust.uproject -target=Dust -unrealexe=D:\Projects\Dust\Dust\Engine\Binaries\Win64\UnrealEditor-Cmd.exe -platform=Win64 -stage -archive -package -build -pak -iostore -compressed -prereqs -archivedirectory=D:/Projects/Dust/PackagedBuilds -clientconfig=Devel
opment -nocompile -nocompileuat
UATHelper: Packaging (Windows): Initializing script modules...
UATHelper: Packaging (Windows): Total script module initialization time: 0.19 s.
UATHelper: Packaging (Windows): Executing commands...
UATHelper: Packaging (Windows): Installed Sdk validity:
UATHelper: Packaging (Windows): Win64: (Status=Valid, MinAllowed_Sdk=10.0.00000.0, MaxAllowed_Sdk=10.9.99999.0, Current_Sdk=10.0.22621.0, Allowed_AutoSdk=10.0.18362.0, Current_AutoSdk=, Flags="InstalledSdk_ValidVersionExists")
UATHelper: Packaging (Windows): Scanning for envvar changes...
UATHelper: Packaging (Windows): ... done! 
UATHelper: Packaging (Windows): Cleaning Temp Paths...
UATHelper: Packaging (Windows): BUILD SUCCESSFUL
UATHelper: Packaging (Windows): Setting up ProjectParams for D:\Projects\Dust\Dust\Dust.uproject
UATHelper: Packaging (Windows): D:\Projects\Dust\Dust\Engine\Source\Programs\BaseTextureBuildWorker\BaseTextureBuildWorker.Target.cs(7,45): error CS0246: The type or namespace name 'TextureBuildWorkerTarget' could not be found (are you missing a using directive or an assembly reference?)
UATHelper: Packaging (Windows): D:\Projects\Dust\Dust\Engine\Source\Programs\BaseTextureBuildWorker\BaseTextureBuildWorker.Target.cs(9,59): error CS1729: 'TextureBuildWorkerTarget' does not contain a constructor that takes 1 arguments
UATHelper: Packaging (Windows): D:\Projects\Dust\Dust\Engine\Source\Programs\BaseTextureBuildWorker\BaseTextureBuildWorker.Target.cs(11,3): error CS0103: The name 'LaunchModuleName' does not exist in the current context
UATHelper: Packaging (Windows): System.NullReferenceException: Object reference not set to an instance of an object.
UATHelper: Packaging (Windows):    at AutomationTool.ProjectUtils.CompileAndLoadTargetsAssembly(ProjectProperties Properties, FileReference TargetsDllFilename, Boolean DoNotCompile, List`1 TargetScripts) in D:\Projects\Dust\Dust\Engine\Source\Programs\AutomationTool\AutomationUtils\ProjectUtils.cs:line 483
UATHelper: Packaging (Windows):    at AutomationTool.ProjectUtils.DetectTargetsForProject(ProjectProperties Properties, List`1 ExtraSearchPaths) in D:\Projects\Dust\Dust\Engine\Source\Programs\AutomationTool\AutomationUtils\ProjectUtils.cs:line 461
UATHelper: Packaging (Windows):    at AutomationTool.ProjectUtils.DetectProjectProperties(FileReference RawProjectPath, List`1 ClientTargetPlatforms, List`1 ClientTargetConfigurations, Boolean AssetNativizationRequested) in D:\Projects\Dust\Dust\Engine\Source\Programs\AutomationTool\AutomationUtils\ProjectUtils.cs:line 266
UATHelper: Packaging (Windows):    at AutomationTool.ProjectUtils.GetProjectProperties(FileReference RawProjectPath, List`1 ClientTargetPlatforms, List`1 ClientTargetConfigurations, Boolean AssetNativizationRequested) in D:\Projects\Dust\Dust\Engine\Source\Programs\AutomationTool\AutomationUtils\ProjectUtils.cs:line 178
UATHelper: Packaging (Windows):    at AutomationTool.ProjectParams.AutodetectSettings(Boolean bReset) in D:\Projects\Dust\Dust\Engine\Source\Programs\AutomationTool\AutomationUtils\ProjectParams.cs:line 2388
UATHelper: Packaging (Windows):    at AutomationTool.ProjectParams..ctor(FileReference RawProjectPath, BuildCommand Command, String Device, String MapToRun, String AdditionalServerMapParams, ParamList`1 Port, String RunCommandline, String StageCommandline, String BundleName, String StageDirectoryParam, String UnrealExe, String UE4Exe, String SignPak, List`1 ClientConfigsToBuild, List`1 ServerConfigsToBuild, ParamList`1 MapsToCook, ParamList`1 MapIniSectionsToCook, ParamList`1 DirectoriesToCook, String DDCGraph, String InternationalizationPreset, ParamList`1 CulturesToCook, ParamList`1 ClientCo
okedTargets, ParamList`1 EditorTargets, ParamList`1 ServerCookedTargets, List`1 ClientTargetPlatforms, Dictionary`2 ClientDependentPlatformMap, List`1 ServerTargetPlatforms, Dictionary`2 ServerDependentPlatformMap, List`1 ConfigOverrideParams, Nullable`1 Build, Nullable`1 SkipBuildClient, Nullable`1 SkipBuildEditor, Nullable`1 Cook, Nullable`1 Run, Nullable`1 SkipServer, Nullable`1 Clean, Nullable`1 Compressed, Nullable`1 ForceUncompressed, String AdditionalPakOptions, String AdditionalIoStoreOptions, String ForceOodleDllVersion, Nullable`1 IterativeCooking, String IterateSharedCookedBuild, Nu
llable`1 IterateSharedBuildUsePrecompiledExe, Nullable`1 CookAll, Nullable`1 CookPartialGC, Nullable`1 CookInEditor, String CookOutputDir, Nullable`1 CookMapsOnly, Nullable`1 CookOnTheFly, Nullable`1 CookOnTheFlyStreaming, Nullable`1 UnversionedCookedContent, Nullable`1 OptionalContent, Nullable`1 EncryptIniFiles, Nullable`1 EncryptPakIndex, Nullable`1 EncryptEverything, Nullable`1 SkipCookingEditorContent, String AdditionalCookerOptions, String OriginalReleaseVersion, String BasedOnReleaseVersion, String CreateReleaseVersion, String CreateReleaseVersionBasePath, String BasedOnReleaseVersionBa
sePath, String ReferenceContainerGlobalFileName, String ReferenceContainerCryptoKeys, Nullable`1 GeneratePatch, Nullable`1 AddPatchLevel, Nullable`1 StageBaseReleasePaks, String DiscVersion, String DLCName, String DLCOverrideCookedSubDir, String DLCOverrideStagedSubDir, String DiffCookedContentPath, Nullable`1 DLCIncludeEngineContent, Nullable`1 DLCPakPluginFile, Nullable`1 DLCActLikePatch, Nullable`1 CrashReporter, Nullable`1 DedicatedServer, Nullable`1 Client, Nullable`1 Deploy, String DeployFolder, String GetFile, Nullable`1 FileServer, Nullable`1 Foreign, Nullable`1 ForeignCode, Nullable`1
 LogWindow, Nullable`1 NoCleanStage, Nullable`1 NoClient, Nullable`1 NoDebugInfo, Nullable`1 SeparateDebugInfo, Nullable`1 MapFile, Nullable`1 NoXGE, Nullable`1 SkipPackage, Nullable`1 NeverPackage, Nullable`1 Package, Nullable`1 Pak, Nullable`1 IgnorePaksFromDifferentCookSource, Nullable`1 IoStore, Nullable`1 ZenStore, String NoZenAutoLaunch, Nullable`1 SkipIoStore, Nullable`1 GenerateOptimizationData, Nullable`1 Prereqs, String AppLocalDirectory, Nullable`1 NoBootstrapExe, Nullable`1 SignedPak, Nullable`1 PakAlignForMemoryMapping, Nullable`1 RehydrateAssets, Nullable`1 NullRHI, Nullable`1 Fa
keClient, Nullable`1 EditorTest, Nullable`1 RunAutomationTests, String RunAutomationTest, Nullable`1 CrashIndex, Nullable`1 SkipCook, Nullable`1 SkipCookOnTheFly, Nullable`1 SkipPak, Nullable`1 PrePak, Nullable`1 SkipStage, Nullable`1 Stage, Nullable`1 Manifests, Nullable`1 CreateChunkInstall, Nullable`1 SkipEncryption, Nullable`1 Unattended, Nullable`1 NumClients, Nullable`1 Archive, String ArchiveDirectoryParam, Nullable`1 ArchiveMetaData, Nullable`1 CreateAppBundle, String SpecifiedClientTarget, String SpecifiedServerTarget, ParamList`1 ProgramTargets, Nullable`1 Distribution, String Packag
eEncryptionKeyFile, Nullable`1 Prebuilt, Nullable`1 RunTimeoutSeconds, String SpecifiedArchitecture, String ServerArchitecture, String EditorArchitecture, String ClientArchitecture, String ProgramArchitecture, String UbtArgs, String AdditionalPackageOptions, Nullable`1 IterativeDeploy, Nullable`1 FastCook, Nullable`1 IgnoreCookErrors, Nullable`1 CodeSign, Nullable`1 TreatNonShippingBinariesAsDebugFiles, Nullable`1 UseExtraFlavor, String Provision, String Certificate, String Team, Boolean AutomaticSigning, String Trace, String TraceHost, String TraceFile, String SessionLabel, ParamList`1 InMaps
ToRebuildLightMaps, ParamList`1 InMapsToRebuildHLOD, ParamList`1 TitleID, Nullable`1 RetainStagedDirectory) in D:\Projects\Dust\Dust\Engine\Source\Programs\AutomationTool\AutomationUtils\ProjectParams.cs:line 1276
UATHelper: Packaging (Windows):    at BuildCookRun.SetupParams() in D:\Projects\Dust\Dust\Engine\Source\Programs\AutomationTool\Scripts\BuildCookRun.Automation.cs:line 50
UATHelper: Packaging (Windows):    at BuildCookRun.ExecuteBuild() in D:\Projects\Dust\Dust\Engine\Source\Programs\AutomationTool\Scripts\BuildCookRun.Automation.cs:line 41
UATHelper: Packaging (Windows):    at AutomationTool.BuildCommand.Execute() in D:\Projects\Dust\Dust\Engine\Source\Programs\AutomationTool\AutomationUtils\BuildCommand.cs:line 345
UATHelper: Packaging (Windows):    at AutomationTool.BuildCommand.ExecuteAsync() in D:\Projects\Dust\Dust\Engine\Source\Programs\AutomationTool\AutomationUtils\BuildCommand.cs:line 354
UATHelper: Packaging (Windows):    at AutomationTool.Automation.ExecuteAsync(List`1 CommandsToExecute, Dictionary`2 Commands) in D:\Projects\Dust\Dust\Engine\Source\Programs\AutomationTool\AutomationUtils\Automation.cs:line 265
UATHelper: Packaging (Windows):    at AutomationTool.Automation.ProcessAsync(ParsedCommandLine AutomationToolCommandLine, StartupTraceListener StartupListener, HashSet`1 ScriptModuleAssemblies) in D:\Projects\Dust\Dust\Engine\Source\Programs\AutomationTool\AutomationUtils\Automation.cs:line 164
UATHelper: Packaging (Windows): (see D:\Projects\Dust\Dust\Engine\Programs\AutomationTool\Saved\Logs\Log.txt for full exception trace)
UATHelper: Packaging (Windows): AutomationTool executed for 0h 0m 1s
UATHelper: Packaging (Windows): AutomationTool exiting with ExitCode=1 (Error_Unknown)
UATHelper: Packaging (Windows): BUILD FAILED
PackagingResults: Error: Unknown Error

Got it.

And you said:

[quote=“basisvector, post:1, topic:1696363, username:basisvector”]
I recently set up a new project using a source build
[/quote]…

Does this mean that you tried to package an empty project? I’m not 100% certain what you mean by this.

I mean I started working on a project, so it’s not an empty project, but I don’t have that much in it yet. The process quits so quickly after starting the package I don’t think it’s even looking at my files yet.

Understood.

Then try packaging a completely new/empty project to make sure the issue has nothing to do with any of your assets.

Did you make a Editor Build only or an Installed Build ? if you made an Editor only build you may be missing to build some module require to package.

I think it might also be my toolchain. I am using VS Community 2022 17.9, but when I look at the docs on installing VS for 5.3, it says 17.6 is the recommended version. But you cannot install that version from Community.

I tried VS 2019, but it was complaining about the version of .NET when generating files:

Visual Studio 2019 does not support .NET 6.0 C# projects, these projects will not be added to the generated solution.
Please generate the Visual Studio 2022 solution if .NET 6.0 C# project support is required.

So now I’m installing the 17.6 LTS build tools. Not sure if that will work. Must I fork out for VS Professional to get 17.6? Is anyone using 17.9 Community successfully?

I`m using 17.9 latest one.

Also I got this earlier error when trying to build my project (UE5 built fine).

1>Using 'git status' to determine working set for adaptive non-unity build (D:\Projects\Dust\Dust).
1>Invalidating makefile for DustEditor (Definitions.h modified)
1>D:\Projects\Dust\Dust\Engine\Source\Runtime\RenderCore\RenderCore.Build.cs : warning : Referenced directory 'D:\Projects\Dust\Dust\Shaders\Shared' does not exist.
1>D:\Projects\Dust\Dust\Engine\Source\Runtime\Landscape\Landscape.Build.cs : warning : Referenced directory 'D:\Projects\Dust\Dust\Shaders\Shared' does not exist.
1>D:\Projects\Dust\Dust\Engine\Source\Runtime\Messaging\Messaging.Build.cs : warning : Referenced directory 'D:\Projects\Dust\Dust\Source\Runtime\Messaging\Private\Bus' does not exist.
1>D:\Projects\Dust\Dust\Engine\Source\Runtime\Messaging\Messaging.Build.cs : warning : Referenced directory 'D:\Projects\Dust\Dust\Source\Runtime\Messaging\Private\Bridge' does not exist.
1>D:\Projects\Dust\Dust\Engine\Source\Runtime\Windows\D3D11RHI\D3D11RHI.Build.cs : warning : Referenced directory 'D:\Projects\Dust\Dust\Shaders\Shared' does not exist.
1>D:\Projects\Dust\Dust\Engine\Source\Developer\Windows\ShaderFormatD3D\ShaderFormatD3D.Build.cs : warning : Referenced directory 'D:\Projects\Dust\Dust\Shaders\Shared' does not exist.
1>D:\Projects\Dust\Dust\Engine\Source\Runtime\D3D12RHI\D3D12RHI.Build.cs : warning : Referenced directory 'D:\Projects\Dust\Dust\Shaders\Shared' does not exist.
1>D:\Projects\Dust\Dust\Engine\Source\Runtime\Portal\Proxies\PortalProxies.Build.cs : warning : Referenced directory 'D:\Projects\Dust\Dust\Source\Runtime\Portal\Proxies\Private\Account' does not exist.
1>D:\Projects\Dust\Dust\Engine\Source\Runtime\Portal\Proxies\PortalProxies.Build.cs : warning : Referenced directory 'D:\Projects\Dust\Dust\Source\Runtime\Portal\Proxies\Private\Application' does not exist.
1>D:\Projects\Dust\Dust\Engine\Source\Runtime\Portal\Proxies\PortalProxies.Build.cs : warning : Referenced directory 'D:\Projects\Dust\Dust\Source\Runtime\Portal\Proxies\Private\Package' does not exist.

The line RenderCore.build.cs is referencing is:

PrivateIncludePaths.Add("../Shaders/Shared");

The files do exist, however they should be under Engine/Shaders/Shared. I was able to get around this earlier by putting in an absolute path on all of these, but it just seems like something is off. Either my toolchain is wrong, or something else in my environment.

I’ve been trying to install Visual Studio compiler version 17.6, which is the officially supported version, but I’m not sure I’ve done that correctly.

OK I guess I got the right 17.6 component installed, both UE5 and my project solutions now build without errors or anything I needed to adjust.

BUT – same problem when packaging.

[2024.02.18-20.41.13:366][696]LogMonitoredProcess: Running Serialized UAT: [ cmd.exe /c ""D:/Projects/Dust/Dust/Engine/Build/BatchFiles/RunUAT.bat"  -ScriptsForProject="D:/Projects/Dust/Dust/Dust.uproject" Turnkey -command=VerifySdk -platform=Win64 -UpdateIfNeeded -EditorIO -EditorIOPort=64362  -project="D:/Projects/Dust/Dust/Dust.uproject" BuildCookRun -nop4 -utf8output -nocompileeditor -skipbuildeditor -cook  -project="D:/Projects/Dust/Dust/Dust.uproject" -target=Dust  -unrealexe="D:\Projects\Dust\Dust\Engine\Binaries\Win64\UnrealEditor-Cmd.exe" -platform=Win64 -stage -archive -package -build -pak -iostore -compressed -prereqs -archivedirectory="D:/Projects/Dust/PackagedBuilds" -clientconfig=Development" -nocompile -nocompileuat ]
[2024.02.18-20.41.13:414][697]UATHelper: Packaging (Windows): Running AutomationTool...
[2024.02.18-20.41.13:466][701]UATHelper: Packaging (Windows): Using bundled DotNet SDK version: 6.0.302
[2024.02.18-20.41.13:540][703]UATHelper: Packaging (Windows): Starting AutomationTool...
[2024.02.18-20.41.13:551][703]UATHelper: Packaging (Windows): Parsing command line: -ScriptsForProject=D:/Projects/Dust/Dust/Dust.uproject Turnkey -command=VerifySdk -platform=Win64 -UpdateIfNeeded -EditorIO -EditorIOPort=64362 -project=D:/Projects/Dust/Dust/Dust.uproject BuildCookRun -nop4 -utf8output -nocompileeditor -skipbuildeditor -cook -project=D:/Projects/Dust/Dust/Dust.uproject -target=Dust -unrealexe=D:\Projects\Dust\Dust\Engine\Binaries\Win64\UnrealEditor-Cmd.exe -platform=Win64 -stage -archive -package -build -pak -iostore -compressed -prereqs -archivedirectory=D:/Projects/Dust/PackagedBuilds -clientconfig=Development -nocompile -nocompileuat
[2024.02.18-20.41.13:572][704]UATHelper: Packaging (Windows): Initializing script modules...
[2024.02.18-20.41.13:720][717]UATHelper: Packaging (Windows): Total script module initialization time: 0.14 s.
[2024.02.18-20.41.13:878][736]UATHelper: Packaging (Windows): Executing commands...
[2024.02.18-20.41.13:920][742]UATHelper: Packaging (Windows): Installed Sdk validity:
[2024.02.18-20.41.13:920][742]UATHelper: Packaging (Windows): Win64: (Status=Valid, MinAllowed_Sdk=10.0.00000.0, MaxAllowed_Sdk=10.9.99999.0, Current_Sdk=10.0.22621.0, Allowed_AutoSdk=10.0.18362.0, Current_AutoSdk=, Flags="InstalledSdk_ValidVersionExists")
[2024.02.18-20.41.13:920][742]UATHelper: Packaging (Windows): Scanning for envvar changes...
[2024.02.18-20.41.13:920][742]UATHelper: Packaging (Windows): ... done! 
[2024.02.18-20.41.13:920][742]UATHelper: Packaging (Windows): Cleaning Temp Paths...
[2024.02.18-20.41.13:920][742]UATHelper: Packaging (Windows): BUILD SUCCESSFUL
[2024.02.18-20.41.13:920][742]UATHelper: Packaging (Windows): Setting up ProjectParams for D:\Projects\Dust\Dust\Dust.uproject
[2024.02.18-20.41.14:769][843]UATHelper: Packaging (Windows): D:\Projects\Dust\Dust\Engine\Source\Programs\Enterprise\Datasmith\DatasmithSDK\DatasmithSDK.Target.cs(7,23): error CS0234: The type or namespace name 'Rules' does not exist in the namespace 'UnrealBuildTool' (are you missing an assembly reference?)
[2024.02.18-20.41.14:780][845]UATHelper: Packaging (Windows): D:\Projects\Dust\Dust\Engine\Source\Programs\BaseTextureBuildWorker\BaseTextureBuildWorker.Target.cs(7,45): error CS0246: The type or namespace name 'TextureBuildWorkerTarget' could not be found (are you missing a using directive or an assembly reference?)
[2024.02.18-20.41.14:780][845]UATHelper: Packaging (Windows): D:\Projects\Dust\Dust\Engine\Source\Programs\BaseTextureBuildWorker\BaseTextureBuildWorker.Target.cs(9,59): error CS1729: 'TextureBuildWorkerTarget' does not contain a constructor that takes 1 arguments
[2024.02.18-20.41.14:780][845]UATHelper: Packaging (Windows): D:\Projects\Dust\Dust\Engine\Source\Programs\BaseTextureBuildWorker\BaseTextureBuildWorker.Target.cs(11,3): error CS0103: The name 'LaunchModuleName' does not exist in the current context
[2024.02.18-20.41.14:791][846]UATHelper: Packaging (Windows): System.NullReferenceException: Object reference not set to an instance of an object.
[2024.02.18-20.41.14:791][846]UATHelper: Packaging (Windows):    at AutomationTool.ProjectUtils.CompileAndLoadTargetsAssembly(ProjectProperties Properties, FileReference TargetsDllFilename, Boolean DoNotCompile, List`1 TargetScripts) in D:\Projects\Dust\Dust\Engine\Source\Programs\AutomationTool\AutomationUtils\ProjectUtils.cs:line 483
[2024.02.18-20.41.14:791][846]UATHelper: Packaging (Windows):    at AutomationTool.ProjectUtils.DetectTargetsForProject(ProjectProperties Properties, List`1 ExtraSearchPaths) in D:\Projects\Dust\Dust\Engine\Source\Programs\AutomationTool\AutomationUtils\ProjectUtils.cs:line 461
[2024.02.18-20.41.14:791][846]UATHelper: Packaging (Windows):    at AutomationTool.ProjectUtils.DetectProjectProperties(FileReference RawProjectPath, List`1 ClientTargetPlatforms, List`1 ClientTargetConfigurations, Boolean AssetNativizationRequested) in D:\Projects\Dust\Dust\Engine\Source\Programs\AutomationTool\AutomationUtils\ProjectUtils.cs:line 266
[2024.02.18-20.41.14:791][846]UATHelper: Packaging (Windows):    at AutomationTool.ProjectUtils.GetProjectProperties(FileReference RawProjectPath, List`1 ClientTargetPlatforms, List`1 ClientTargetConfigurations, Boolean AssetNativizationRequested) in D:\Projects\Dust\Dust\Engine\Source\Programs\AutomationTool\AutomationUtils\ProjectUtils.cs:line 178
[2024.02.18-20.41.14:791][846]UATHelper: Packaging (Windows):    at AutomationTool.ProjectParams.AutodetectSettings(Boolean bReset) in D:\Projects\Dust\Dust\Engine\Source\Programs\AutomationTool\AutomationUtils\ProjectParams.cs:line 2388
[2024.02.18-20.41.14:802][847]UATHelper: Packaging (Windows):    at AutomationTool.ProjectParams..ctor(FileReference RawProjectPath, BuildCommand Command, String Device, String MapToRun, String AdditionalServerMapParams, ParamList`1 Port, String RunCommandline, String StageCommandline, String BundleName, String StageDirectoryParam, String UnrealExe, String UE4Exe, String SignPak, List`1 ClientConfigsToBuild, List`1 ServerConfigsToBuild, ParamList`1 MapsToCook, ParamList`1 MapIniSectionsToCook, ParamList`1 DirectoriesToCook, String DDCGraph, String InternationalizationPreset, ParamList`1 CulturesToCook, ParamList`1 ClientCookedTargets, ParamList`1 EditorTargets, ParamList`1 ServerCookedTargets, List`1 ClientTargetPlatforms, Dictionary`2 ClientDependentPlatformMap, List`1 ServerTargetPlatforms, Dictionary`2 ServerDependentPlatformMap, List`1 ConfigOverrideParams, Nullable`1 Build, Nullable`1 SkipBuildClient, Nullable`1 SkipBuildEditor, Nullable`1 Cook, Nullable`1 Run, Nullable`1 SkipServer, Nullable`1 Clean, Nullable`1 Compressed, Nullable`1 ForceUncompressed, String AdditionalPakOptions, String AdditionalIoStoreOptions, String ForceOodleDllVersion, Nullable`1 IterativeCooking, String IterateSharedCookedBuild, Nullable`1 IterateSharedBuildUsePrecompiledExe, Nullable`1 CookAll, Nullable`1 CookPartialGC, Nullable`1 CookInEditor, String CookOutputDir, Nullable`1 CookMapsOnly, Nullable`1 CookOnTheFly, Nullable`1 CookOnTheFlyStreaming, Nullable`1 UnversionedCookedContent, Nullable`1 OptionalContent, Nullable`1 EncryptIniFiles, Nullable`1 EncryptPakIndex, Nullable`1 EncryptEverything, Nullable`1 SkipCookingEditorContent, String AdditionalCookerOptions, String OriginalReleaseVersion, String BasedOnReleaseVersion, String CreateReleaseVersion, String CreateReleaseVersionBasePath, String BasedOnReleaseVersionBasePath, String ReferenceContainerGlobalFileName, String ReferenceContainerCryptoKeys, Nullable`1 GeneratePatch, Nullable`1 AddPatchLevel, Nullable`1 StageBaseReleasePaks, String DiscVersion, String DLCName, String DLCOverrideCookedSubDir, String DLCOverrideStagedSubDir, String DiffCookedContentPath, Nullable`1 DLCIncludeEngineContent, Nullable`1 DLCPakPluginFile, Nullable`1 DLCActLikePatch, Nullable`1 CrashReporter, Nullable`1 DedicatedServer, Nullable`1 Client, Nullable`1 Deploy, String DeployFolder, String GetFile, Nullable`1 FileServer, Nullable`1 Foreign, Nullable`1 ForeignCode, Nullable`1 LogWindow, Nullable`1 NoCleanStage, Nullable`1 NoClient, Nullable`1 NoDebugInfo, Nullable`1 SeparateDebugInfo, Nullable`1 MapFile, Nullable`1 NoXGE, Nullable`1 SkipPackage, Nullable`1 NeverPackage, Nullable`1 Package, Nullable`1 Pak, Nullable`1 IgnorePaksFromDifferentCookSource, Nullable`1 IoStore, Nullable`1 ZenStore, String NoZenAutoLaunch, Nullable`1 SkipIoStore, Nullable`1 GenerateOptimizationData, Nullable`1 Prereqs, String AppLocalDirectory, Nullable`1 NoBootstrapExe, Nullable`1 SignedPak, Nullable`1 PakAlignForMemoryMapping, Nullable`1 RehydrateAssets, Nullable`1 NullRHI, Nullable`1 FakeClient, Nullable`1 EditorTest, Nullable`1 RunAutomationTests, String RunAutomationTest, Nullable`1 CrashIndex, Nullable`1 SkipCook, Nullable`1 SkipCookOnTheFly, Nullable`1 SkipPak, Nullable`1 PrePak, Nullable`1 SkipStage, Nullable`1 Stage, Nullable`1 Manifests, Nullable`1 CreateChunkInstall, Nullable`1 SkipEncryption, Nullable`1 Unattended, Nullable`1 NumClients, Nullable`1 Archive, String ArchiveDirectoryParam, Nullable`1 ArchiveMetaData, Nullable`1 CreateAppBundle, String SpecifiedClientTarget, String SpecifiedServerTarget, ParamList`1 ProgramTargets, Nullable`1 Distribution, String PackageEncryptionKeyFile, Nullable`1 Prebuilt, Nullable`1 RunTimeoutSeconds, String SpecifiedArchitecture, String ServerArchitecture, String EditorArchitecture, String ClientArchitecture, String ProgramArchitecture, String UbtArgs, String AdditionalPackageOptions, Nullable`1 IterativeDeploy, Nullable`1 FastCook, Nullable`1 IgnoreCookErrors, Nullable`1 CodeSign, Nullable`1 TreatNonShippingBinariesAsDebugFiles, Nullable`1 UseExtraFlavor, String Provision, String Certificate, String Team, Boolean AutomaticSigning, String Trace, String TraceHost, String TraceFile, String SessionLabel, ParamList`1 InMapsToRebuildLightMaps, ParamList`1 InMapsToRebuildHLOD, ParamList`1 TitleID, Nullable`1 RetainStagedDirectory) in D:\Projects\Dust\Dust\Engine\Source\Programs\AutomationTool\AutomationUtils\ProjectParams.cs:line 1276
[2024.02.18-20.41.14:802][847]UATHelper: Packaging (Windows):    at BuildCookRun.SetupParams() in D:\Projects\Dust\Dust\Engine\Source\Programs\AutomationTool\Scripts\BuildCookRun.Automation.cs:line 50
[2024.02.18-20.41.14:802][847]UATHelper: Packaging (Windows):    at BuildCookRun.ExecuteBuild() in D:\Projects\Dust\Dust\Engine\Source\Programs\AutomationTool\Scripts\BuildCookRun.Automation.cs:line 41
[2024.02.18-20.41.14:802][847]UATHelper: Packaging (Windows):    at AutomationTool.BuildCommand.Execute() in D:\Projects\Dust\Dust\Engine\Source\Programs\AutomationTool\AutomationUtils\BuildCommand.cs:line 345
[2024.02.18-20.41.14:802][847]UATHelper: Packaging (Windows):    at AutomationTool.BuildCommand.ExecuteAsync() in D:\Projects\Dust\Dust\Engine\Source\Programs\AutomationTool\AutomationUtils\BuildCommand.cs:line 354
[2024.02.18-20.41.14:802][847]UATHelper: Packaging (Windows):    at AutomationTool.Automation.ExecuteAsync(List`1 CommandsToExecute, Dictionary`2 Commands) in D:\Projects\Dust\Dust\Engine\Source\Programs\AutomationTool\AutomationUtils\Automation.cs:line 265
[2024.02.18-20.41.14:802][847]UATHelper: Packaging (Windows):    at AutomationTool.Automation.ProcessAsync(ParsedCommandLine AutomationToolCommandLine, StartupTraceListener StartupListener, HashSet`1 ScriptModuleAssemblies) in D:\Projects\Dust\Dust\Engine\Source\Programs\AutomationTool\AutomationUtils\Automation.cs:line 164
[2024.02.18-20.41.14:802][847]UATHelper: Packaging (Windows): (see D:\Projects\Dust\Dust\Engine\Programs\AutomationTool\Saved\Logs\Log.txt for full exception trace)
[2024.02.18-20.41.14:802][847]UATHelper: Packaging (Windows): AutomationTool executed for 0h 0m 1s
[2024.02.18-20.41.14:802][847]UATHelper: Packaging (Windows): AutomationTool exiting with ExitCode=1 (Error_Unknown)
[2024.02.18-20.41.14:814][849]UATHelper: Packaging (Windows): BUILD FAILED
[2024.02.18-20.41.14:827][850]PackagingResults: Error: Unknown Error

Could someone who is packaging successfully in 5.3.2 from the release branch tell me if they have any different versions of the toolchain or the Win64 SDK? Perhaps it’s the version of dotnet it used (6.0)?

Dude did you make what I told you ? right click over BaseTextureWorker and rebuild ?
Do it for Automatic tools, Automatic Script too.

You dont need to worry about dotnet since Unreal has all that libs already installed inside “Engine\Binaries\ThirdParty\DotNet\6.0.302\windows”

Thank you for your ideas TrueFranco. I rebuilt BaseTextureBuildWorker, Automation Tools, etc. Unfortunately it still gives me the same error when packaging. Also thanks for confirming you are using 17.9.

I’m in a similar situation and receiving this same error when trying to package. I’ve just migrated an existing project from using an installer engine 5.3.2 build to a fresh source engine 5.3.2 build, and when trying to package I get the same errors as in basisvector’s last log post.
I’ve tried rebuilding the modules TrueFranco recomended and no dice. @basisvector did you happen to resolve this?

First go to your Visual Studio Instalation and unCheck and Check when I show you.

Then open you UE Source Solution and paste the complete path to your project use double quote(" C:\blablabla\Your_uproject") for the path.

Press number 2.

Your project should open and compile without any issue.

I was getting the exact same problem in my custom engine.
Here’s the solution:
You need to make sure you do the following 2 things:

  • Put your project folder inside of your engine folder, so wherever the UE5.sln would be put your project folder there.
  • Open up cmd in the exact same directory and do the following command:
    GenerateProjectFiles.bat C:\YourPath\YourGame.uproject -Game -Engine

Once you do that compile your game from source and it should start working.