# How may I resolve an error "Couldn't find target rules file for target 'ProjectName' when building a project?

**URL:** <https://forums.unrealengine.com/t/how-may-i-resolve-an-error-couldnt-find-target-rules-file-for-target-projectname-when-building-a-project/411707>\
**Category:** Programming & Scripting\
**Tags:** unreal-engine\
**Created:** [December 8, 2017, 3:35am UTC](https://forums.unrealengine.com/t/how-may-i-resolve-an-error-couldnt-find-target-rules-file-for-target-projectname-when-building-a-project/411707 "2017-12-08T03:35:03Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![tech1187](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@tech1187](https://forums.unrealengine.com/u/tech1187)\
**Post date:** [December 8, 2017, 3:35am UTC](https://forums.unrealengine.com/t/how-may-i-resolve-an-error-couldnt-find-target-rules-file-for-target-projectname-when-building-a-project/411707/1 "2017-12-08T03:35:03Z")

</div>

Hello, I have just started a new project using Unreal Engine 4.18 with nearly nothing in the project and had added a few C++ files to the project. These C++ files worked well in the previous versions of Unreal Engine. Every time I try to compile them I get the following log message and have no idea how to solve this one. I have found a few other posts on the same subject, but nothing relating to the issue dealing with Unreal it self. Please, will some one help me out with this. Here is a copy of the full log I receive.

ERROR: Couldn’t find target rules file for target ‘AyselKeep’ in rules assembly ‘UE4Rules, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null’.

```
   Location: C:\Program Files\Epic Games\UE_4.18\Engine\Intermediate\Build\BuildRules\UE4Rules.dll
   Target rules found:
    UE4Editor - C:\Program Files\Epic Games\UE_4.18\Engine\Source\UE4Editor.Target.cs
    UE4Game - C:\Program Files\Epic Games\UE_4.18\Engine\Source\UE4Game.Target.cs
    UnrealHeaderTool - C:\Program Files\Epic Games\UE_4.18\Engine\Source\Programs\UnrealHeaderTool\UnrealHeaderTool.Target.cs
```

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_49a519741](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_49a519741](https://forums.unrealengine.com/u/anonymous_user_49a519741)\
**Post date:** [December 8, 2017, 4:11am UTC](https://forums.unrealengine.com/t/how-may-i-resolve-an-error-couldnt-find-target-rules-file-for-target-projectname-when-building-a-project/411707/2 "2017-12-08T04:11:14Z")

</div>

In your Source directory, there needs to be a “target” file for each build type you want (that means whether it’s building the editor, game, or a server).

If you need an example, you can create a template project and look in that source. The files will be marked \*.Target.cs.

If it worked before then those files must not have gotten copied over somehow. If they’re gone for good you can recreate them by copying from a template project and renaming the files/classes so they match your project name.

---

<div class="post-metadata">

**Author:** ![tech1187](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@tech1187](https://forums.unrealengine.com/u/tech1187)\
**Post date:** [December 8, 2017, 7:15pm UTC](https://forums.unrealengine.com/t/how-may-i-resolve-an-error-couldnt-find-target-rules-file-for-target-projectname-when-building-a-project/411707/3 "2017-12-08T19:15:29Z")

</div>

That was very helpful. Thanks for the info, well pleased with your help. 😃

---

<div class="post-metadata">

**Author:** ![Roel](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Roel](https://forums.unrealengine.com/u/Roel)\
**Post date:** [August 19, 2018, 2:57pm UTC](https://forums.unrealengine.com/t/how-may-i-resolve-an-error-couldnt-find-target-rules-file-for-target-projectname-when-building-a-project/411707/4 "2018-08-19T14:57:20Z")

</div>

I had this issue when creating projects on one of my computers. For some reason projects created on one of the computers create the following setting in the .uproject file (just open it with a text editor):

> “Enterprise”: true,  
> I removed the setting from the .uproject file and now it compiles.

---

<div class="post-metadata">

**Author:** ![BigShishi](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@BigShishi](https://forums.unrealengine.com/u/BigShishi)\
**Post date:** [September 4, 2018, 2:10am UTC](https://forums.unrealengine.com/t/how-may-i-resolve-an-error-couldnt-find-target-rules-file-for-target-projectname-when-building-a-project/411707/5 "2018-09-04T02:10:31Z")

</div>

Although I don’t know why, it solved my problem perfectly!

---

<div class="post-metadata">

**Author:** ![CometGoat](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@CometGoat](https://forums.unrealengine.com/u/CometGoat)\
**Post date:** [October 20, 2018, 11:22am UTC](https://forums.unrealengine.com/t/how-may-i-resolve-an-error-couldnt-find-target-rules-file-for-target-projectname-when-building-a-project/411707/6 "2018-10-20T11:22:07Z")

</div>

This solved it for me too!

---

<div class="post-metadata">

**Author:** ![LeFxGuy](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@LeFxGuy](https://forums.unrealengine.com/u/LeFxGuy)\
**Post date:** [November 20, 2018, 11:13am UTC](https://forums.unrealengine.com/t/how-may-i-resolve-an-error-couldnt-find-target-rules-file-for-target-projectname-when-building-a-project/411707/7 "2018-11-20T11:13:25Z")

</div>

Fixed it for me, too. Enterprise means that you have Unreal Studio access.

---

<div class="post-metadata">

**Author:** ![tech1187](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@tech1187](https://forums.unrealengine.com/u/tech1187)\
**Post date:** [November 20, 2018, 12:06pm UTC](https://forums.unrealengine.com/t/how-may-i-resolve-an-error-couldnt-find-target-rules-file-for-target-projectname-when-building-a-project/411707/8 "2018-11-20T12:06:44Z")

</div>

Thank you guys for offering some assistance here. Next issue with this part I am dealing with is, what do I do if there is no “Enterprise”: true, located in any part of my codes? So far I have not located this yet even while using the search option to help locate it.

---

<div class="post-metadata">

**Author:** ![LeFxGuy](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@LeFxGuy](https://forums.unrealengine.com/u/LeFxGuy)\
**Post date:** [November 20, 2018, 2:09pm UTC](https://forums.unrealengine.com/t/how-may-i-resolve-an-error-couldnt-find-target-rules-file-for-target-projectname-when-building-a-project/411707/9 "2018-11-20T14:09:22Z")

</div>

this is in the uproject file itself. Which should be quite clear. Just right-click on your uproject and openit with a text editor. Beware that this is not always the correct solution. If you dont have Enterprise = true set, there could still be other problems with your project that lead to failed packages.

---

<div class="post-metadata">

**Author:** ![di0deman](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@di0deman](https://forums.unrealengine.com/u/di0deman)\
**Post date:** [December 12, 2018, 1:49am UTC](https://forums.unrealengine.com/t/how-may-i-resolve-an-error-couldnt-find-target-rules-file-for-target-projectname-when-building-a-project/411707/10 "2018-12-12T01:49:16Z")

</div>

This solved my problem perfectly! Thank you so much.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_f536382b](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_f536382b](https://forums.unrealengine.com/u/anonymous_user_f536382b)\
**Post date:** [January 24, 2019, 12:05pm UTC](https://forums.unrealengine.com/t/how-may-i-resolve-an-error-couldnt-find-target-rules-file-for-target-projectname-when-building-a-project/411707/11 "2019-01-24T12:05:40Z")

</div>

yep! solved!

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_329b642e](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_329b642e](https://forums.unrealengine.com/u/anonymous_user_329b642e)\
**Post date:** [January 28, 2019, 2:05pm UTC](https://forums.unrealengine.com/t/how-may-i-resolve-an-error-couldnt-find-target-rules-file-for-target-projectname-when-building-a-project/411707/12 "2019-01-28T14:05:00Z")

</div>

+1 for being the solution. I came here from a project started in the SpatialOS branch of UE and back to the main branch. I guess by default they set their projects to Enterprise.

---

<div class="post-metadata">

**Author:** ![CommanderStarkil](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@CommanderStarkil](https://forums.unrealengine.com/u/CommanderStarkil)\
**Post date:** [September 30, 2019, 7:52pm UTC](https://forums.unrealengine.com/t/how-may-i-resolve-an-error-couldnt-find-target-rules-file-for-target-projectname-when-building-a-project/411707/13 "2019-09-30T19:52:37Z")

</div>

Tnx!!! Helped me with my project as well.

---

<div class="post-metadata">

**Author:** ![ahsan4313](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@ahsan4313](https://forums.unrealengine.com/u/ahsan4313)\
**Post date:** [December 7, 2020, 6:53am UTC](https://forums.unrealengine.com/t/how-may-i-resolve-an-error-couldnt-find-target-rules-file-for-target-projectname-when-building-a-project/411707/14 "2020-12-07T06:53:03Z")

</div>

that helped me as well.  
Thank you

---

<div class="post-metadata">

**Author:** ![Dwilco741](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Dwilco741](https://forums.unrealengine.com/u/Dwilco741)\
**Post date:** [June 22, 2022, 3:53am UTC](https://forums.unrealengine.com/t/how-may-i-resolve-an-error-couldnt-find-target-rules-file-for-target-projectname-when-building-a-project/411707/15 "2022-06-22T03:53:10Z")

</div>

Not sure if this is relevant to you anymore, but for the record the issue turned out to be I was using “BluePrintReadOnly” with private variables. Once i moved them to the public that fixed the build issue.
