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.
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.)
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.