"ERROR: Unable to find target 'UE4Game'" - Packaging fails

Hello. I am unable to package my project since I updated it to 4.26. I was able to package it fine in 4.25.
I’m packaging it for Windows 64-bit.

It seems to be having a problem with the “build target”. It is trying to find the build target called “UE4game” but is returning an error for some reason:

Log.WriteException: ERROR: Unable to find target 'UE4Game'
Log.WriteException:        (see C:\Users\Quark\AppData\Roaming\Unreal Engine\AutomationTool\Logs\C+Program+Files+Epic+Games+UE_4.26\Log.txt for full exception trace)

I’ve attached the log file below. I desperately need help with this as I cannot package the game at this point and have no idea how to fix this. PLEASE help.

link text

Well, I ended up just migrating to a fresh project. I would assume this error happens because of how I’ve been upgrading my project through many engine versions over the course of a few years. It’s all good now.

I was able to fix this problem without migrating by just deleting all the generated folders (Binaries, build, saved, etc) and rebuilding the project.

This didn’t work for me. I’m using UE version 4.26.2. I have recently deleted all obsolete engine versions and obsolete projects, so perhaps that has something to do with my error?

I am in the process of migrating all of the folders from content into a new, empty project without starter content. This is a viable option early on, but if this error comes back late in development, it could be a big issue.

Some additional things I had to do include:

  1. Select my default game mode from “Project Settings > Maps & Modes”.
  2. Setup a default startup map for editor & Game mode in “Project Settings > Maps & Modes”
  3. Recreate Custom Collision “Object Channels” from “Project Settings > Collision”
  4. Re-add my custom Software Cursor from “Project Settings > Engine > User Interface”

I will report back if packaging is successful or not.

is there any update about this? i am having the same error and dont want to migrate the project…

how did it go?

OK so I had those same issues and after some try and error I was able to fix my project. All I did was to delete the Intermediate file from the project, and boom!!! I was able to pack my game. Hope that is of some help. I was careful and made a copy of the original project and that’s the one I use as Guinee pig.

Someone on StackOverflow had the solution for this. The ProjectNameSample.cs needs to be coped to a new ProjectName.Target.cs file, and the interior class name also changed to reflect the file name (if copying the file stated, it should already have “Target” in the class name and not need to be renamed).

350573-unreal-targetnotfound-packaging-01.png

350572-unreal-targetnotfound-packaging-02.png

Here was my solve for this. Because fixing redirects didn’t work for me.
I changed the name of the folders housing the assets that UE couldn’t find. This “created” a new folder… example… folder 1 was called “clothes”, rename to “clothes2”. Both folders now exist, but there isn’t actually any assets in “clothes”, they are all in “clothes2”. So I did that for ever asset that won’t load. And then went into my file explorer and deleted out the old folders, example “clothes”, leave “clothes2” in there!. Then it all worked for me!