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

**URL:** <https://forums.unrealengine.com/t/targets-with-a-unique-build-environment-cannot-be-built-with-an-installed-engine/1353217>\
**Category:** Programming & Scripting\
**Tags:** unreal-engine, editor, CPP, question\
**Created:** [October 30, 2023, 9:15pm UTC](https://forums.unrealengine.com/t/targets-with-a-unique-build-environment-cannot-be-built-with-an-installed-engine/1353217 "2023-10-30T21:15:40Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![SweetdealRU1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@SweetdealRU1](https://forums.unrealengine.com/u/SweetdealRU1)\
**Post date:** [October 30, 2023, 9:15pm UTC](https://forums.unrealengine.com/t/targets-with-a-unique-build-environment-cannot-be-built-with-an-installed-engine/1353217/1 "2023-10-30T21:15:40Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![Truksama](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Truksama](https://forums.unrealengine.com/u/Truksama)\
**Post date:** [December 1, 2023, 2:48pm UTC](https://forums.unrealengine.com/t/targets-with-a-unique-build-environment-cannot-be-built-with-an-installed-engine/1353217/2 "2023-12-01T14:48:16Z")

</div>

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

> [@Generate Project files fails on Installed / Binary Build](https://forums.unrealengine.com/t/generate-project-files-fails-on-installed-binary-build/476677/4):
>
> In case someone else needs help resolving this: try commenting out “BuildEnvironment = TargetBuildEnvironment.Unique;” in the Target.cs file(s) of your project

---

<div class="post-metadata">

**Author:** ![Ciprian\_Stanciu](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/ciprian_stanciu/32/1194635_2.png) [@Ciprian\_Stanciu](https://forums.unrealengine.com/u/Ciprian_Stanciu)\
**Post date:** [December 15, 2023, 3:57pm UTC](https://forums.unrealengine.com/t/targets-with-a-unique-build-environment-cannot-be-built-with-an-installed-engine/1353217/3 "2023-12-15T15:57:56Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Tang\_Bean](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/tang_bean/32/872951_2.png) [@Tang\_Bean](https://forums.unrealengine.com/u/Tang_Bean)\
**Post date:** [December 16, 2023, 2:11pm UTC](https://forums.unrealengine.com/t/targets-with-a-unique-build-environment-cannot-be-built-with-an-installed-engine/1353217/4 "2023-12-16T14:11:26Z")

</div>

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](https://forums.unrealengine.com/t/the-citysample-project-is-not-generated-sln/1343145/4)

---

<div class="post-metadata">

**Author:** ![Tang\_Bean](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/tang_bean/32/872951_2.png) [@Tang\_Bean](https://forums.unrealengine.com/u/Tang_Bean)\
**Post date:** [December 16, 2023, 2:11pm UTC](https://forums.unrealengine.com/t/targets-with-a-unique-build-environment-cannot-be-built-with-an-installed-engine/1353217/5 "2023-12-16T14:11:30Z")

</div>

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