UE5.2.0 Always Missing Target File

Every time I launch UE5, I get this popup message:
The MyProjectEditor.target file does not exist. Would you like to build the editor?
I hit yes, and move on. I’m guessing this is related to my other issue, where hitting Compile in UE5 results in this error:

Using bundled DotNet SDK version: 6.0.302 Running UnrealBuildTool: dotnet "..\..\Engine\Binaries\DotNET\UnrealBuildTool\UnrealBuildTool.dll" -Target="MyProjectEditorNonUnity Win64 Development -Project=""C:/Users/nope/Documents/UnrealProjects/MyProject/MyProject.uproject""" -LiveCoding -LiveCodingModules="C:/Program Files/Epic Games/UE_5.2/Engine/Intermediate/LiveCodingModules.txt" -LiveCodingManifest="C:/Program Files/Epic Games/UE_5.2/Engine/Intermediate/LiveCoding.json" -WaitMutex -LiveCodingLimit=100 Log file: C:\Users\nope\AppData\Local\UnrealBuildTool\Log.txt Creating makefile for MyProjectEditorNonUnity (no existing makefile) Couldn't find target rules file for target 'MyProjectEditorNonUnity' in rules assembly 'UE5Rules, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'. Location: C:\Program Files\Epic Games\UE_5.2\Engine\Intermediate\Build\BuildRules\UE5Rules.dll Target rules found:

This is happening in a completely empty C++ project. My new project has both a *.Target.cs and an *Editor.Target.cs file in its Source folder.

Any ideas on how to fix this?

5 Likes

I’m getting the same error, just updated my project from 5.0.3 to 5.2

Hello,

I’m having the same issue on new 5.2 c++ projects.

New 5.1 c++ projects work fine though.

I think the .target file it’s looking for is not the ones in “Source”, but the one in : “MyProject”\Binaries\Win64

There is one called “MyProjectEditorNonUnity.target” there. And if I delete it and press “Yes” when I launch the project and Unreal tells me it’s missing, it will be created.

If I close the project and relaunch it, it will tell me it’s missing, even though it literally just created it.

Now, I noticed that in my 5.1 project the file does not have “NonUnity” in it and the “Missing target file” window that pops up (in 5.2) is asking for “MyProjectEditor.target” and not “MyProjectEditorNonUnity.target” so I removed “NonUnity” from the file name.

After doing that the project will launch without the “Missing target file” window/warning, but live compiling still doesn’t work and does the same error message.(same thing if I have both a “MyProjectEditorNonUnity.target” file and a “MyProjectEditor.target” file.)

"Couldn’t find target rules file for target ‘MyProjectEditorNonUnity’ in rules assembly ‘UE5Rules, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null’.
Location: C:\Program Files\Epic Games\UE_5.2\Engine\Intermediate\Build\BuildRules\UE5Rules.dll
Target rules found:

Build failed."

I don’t know how to fix this but I think there is a clue in there ? Hope someone can figure it out, or it gets fixed in 5.2.1.

1 Like

Any update on this?

1 Like

Seems like it works now on 5.2.1 for me. Both livecoding and the target file generation/detection.

1 Like

Adding to this in case it helps someone else out… while the detection of the file is working now in 5.2.1, I still have an issue where if I rebuild, the Engine by default creates a “NonUnity.target” file and then subsequently complains that it can’t find the Unity version (which doesn’t have that “NonUnity” at the end of the file name).

To solve this, I had to explicitly put “bUseUnityBuild = true” in my Target.cs. Now it generates the expected file.

1 Like

Hey guys, the problem is this commit:
https://github.com/EpicGames/UnrealEngine/commit/b3b649da38fa1ced42f6d11006e061e03179e4df

I will copy the workaround here:
Just add this to your target.cs
Name = "ProjectNameEditor";

1 Like

Do you mean like this?
image

it doesnt work for me… im on 5.2.1

In your case it seems like

Name = "MyProjectEditor";

should work

1 Like

Ye tried that as well and it didnt work. Also tried “bUseUnityBuild = true”. that didnt work either…

Ok so this worked for me. You need to go to your BuildConfiguration.xml file and change bUseUnityBuild to true like this:
image

Using unity build has its own drawbacks, if you don’t want to and it’s consciously - setting Name explicitly should work.