Targets with a unique build environment cannot be built with an installed engine.

Hey there!

I got a Game Module that has:

Target.Program;

But I got no clue how to actually build it. When I run:

Build.bat -projectfiles -project=“D:\UE5\Projects\New\Game\Game.uproject”
The Error that pops up is:

Targets with a unique build environment cannot be built with an installed engine.

Do I need to grab Unreal Editor Source Code? But how I go from there?

Hi, I followed the thread linked below when encountering the same issue, and it helped me resolve the issue.

In the case of City Sample and UE 5.3.2 that line doesn’t exist in any .Target file and I even tried doing “BuildEnvironment = TargetBuildEnvironment.Shared;” in all .Target files and nothing changed, I still can’t generate the project files.

Oh, I think I have found the way to resolve the issue. You can try to delete the CitySampleCookedEditor.Target.cs file. It’s worked for me.

Refer to: The CitySample project is not generated .sln - #4 by WATY22461

+1, I encountered into the same issue, do you resolve it now? THX!