I received the same error (or at least very similar), after rebuilding everything nothing worked anymore ;D Let me know if you found what happened please
I had the exact same issue and I found a really easy way to fix it.
I created a Projects folder within the root directory of UE4. Inside that folder I created a C++ project from the side scroller template (like in the video). When I build I get the same error. Here’s the really easy fix.
Create a new file inside UE4 root folder and name it Games.uprojectdirs. Edit the file and write Projects (the name of your folder where the projects are). And that’s it UnrealBuildTool will pick all your projects inside that folder.
I am having this same issue but confuse how to implement this solution. I have the engine root in my D:/ drive and the project in G:/ drive. It knows the project path, but what would I type in the Games.uprojectdirs file?
I am going to guess you have got this answered after 6 months but I’m replying so if others encounter the same issue they can at least reference this comment.
So, “yes” is effectively my answer. However the image in madmaurice’s post shows far more files that I have in that directory. In fact in the root of my install dir there are NO FILES, just folders although they do match the ones shown above (Engine/Projects/Samples/Templates).
My boot drive is "D:" and my UE is installed “D:\Program Files\Epic Games\UE_4.14” - my projects directory (for everything not just UE) is “D:\Projects”.
If I create a file called Games.uprojectdirs (all I did was right click, create text file, edited the filename) and add in one line…
D:\Projects\Unreal
…then save it, my project will not only open and compile it will bring up the Editor and VS - something it did not before the addition of this file. No longer do I get the “ERROR: Couldn’t find target rules file for target” prompt.
So for you, if you still have that issue, you would just change the D:\Projects\Unreal to G:\Projects\MyProject (remember back slashes in the OS, forward slashes for web addresses).
Hope this comment helps someone because I spent a week tearing my hair out trying to get this working and there is very little documentation to tell you about the Games.uprojectdirs file.
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.
that worked for me too, I guess when I install launcher, it can be enterprise or not. On some machines it is and others its not, so jumping between them was an issue, until I removed this line. That being said, I am not using datasmith etc in my project.