I’ve been getting the error seen below when Rider opens and loads the project. Main issue in the log file seems to be a vast amount of “Couldn’t extract path to PCH” messages. I’m having trouble getting Rider to “see” a generated header from a blueprint I created and was hoping fixing this project model definition issue would in turn fix that issue.
What I’ve tried:
Updating Windows SDK. I now have 10.0.22000 and 10.0.22621 on my PC.
Updated to latest Visual Studio 2022 Community version and made sure to click the c++ options during install
Are your header classes visible inside Unreal Engine itself by any chance? I had a similar issue as you. For me it was because I had originally manually put a c++ file inside my project folder in order to generate the solution file (by right-clicking on the .uproject file and then selecting ‘Generate Visual Studio Project Files’)
This appeared to work, but generating the files this way caused the project to miss some important target files. Afterwards my source files were not visible in UE nor did I see the C++ folder. I couldn’t generate the project files in Rider either, getting the same PCH errors as you.
I’d check if perhaps you’re also missing these target files:/Source/.Target.cs
/Source/Editor.Target.cs
If so, you can try deleting your solution file. Move your C++ files temporarily somewhere else. Then inside UE add a new C++ file under the Tools section, and regenerate the solution file using ‘Refresh Rider Uproject project’, also under Tools. Then move your files back and refresh one more time. This fixed it for me.
I found that this patch for the UnrealBuildTool was able to unstick the process - be sure to check the log it generates just in case.
As noted check “C:\Users_yourusername_\AppData\Roaming\Unreal Engine\AutomationTool\Logs\C+Program+Files+Epic+Games+UE_5.4” or similar folder for the .txt file with the long name.