So I am using the Rider IDE and I noticed that whenever I want to compile a C++ project, I must first close down either the editor or the IDE (depending on where I am compiling from), otherwise I get an error. At first, I thought that I was missing some component from VS build tools or something but the weird part is that I don’t need to do this when using UE 4.27, only in 5.0 and I can’t understand why! When testing this in UE 4.27 (where it works as expected), Live Coding is turned off (and yet, I can even create new C++ classes and recompile without ever closing the editor, it doesn’t only work for small changes). Thus, I have tried to both enable live coding and disable it in UE 5.0 but whatever I do I still get the same behavior.
If Live Coding is enabled I get the error message “Unable to build while Live Coding is active. Exit the editor and game, or press Ctrl+Alt+F11 if iterating on code in the editor or game”.
If I disable Live Coding I get the error message “cannot open file ‘C:\Users\xxx\Documents\Unreal Projects\MyProject\Binaries\Win64\UnrealEditor-MyProject.dll’”
If I install the RiderLink plugin (which is pretty much required of you want to utilize the Unreal features of Rider) I get severeal error messages similar to the one above, compaining about not being able to open some .dll files in the RiderLink plugin folder (within the Uproject folder).
Compiling directly from the editor gives me the exact same results.
Have any of you other Rider users experienced this in UE5? Is it a bug?
Does this also occur for you Visual Studio users out there?
I have the same error using visual studio 2022 and UE5, but I presume the Code Editor does not matter here.
It is true that with UE 4.27 I was able to compile from VS, even with Unreal editor open.
no compile error or warning
Then with UE5, I realized:
Both Code Editor and UE use yourProjectName\Binaries\Win64\UnrealEditor-yourProjectName.dll.
In fact even if I was able to compile, sometime I had Unreal editor 4.27 crashes, but I did not know why. Now it is clear. VS changes/updates/modifies this .dll that is used by Unreal Editor.
The only solution I suggest is :
if you have to change header file (.h) close Unreal Editor, compile from your Code Editor then open unreal editor again.
if you have to change .cpp files go on with Live Coding.
Live Coding replaces hot reload, So you should use live coding
I realized that using Live Coding worked fine as long as I didn’t compile from the IDE AND didn’t install the “RiderLink” plugin to the engine that Rider asks you to install when creating a new project. For some reason this plugin is causing issues for me… but only in UE5.
I have heard from others that they are using Rider and the RiderLink plugin just fine in UE5. I have no idea why it’s giving me such a hard time.
Yep, the same bug with live coding OFF. VS 2022 doesnt compile diff dlls, which required for hot reload, it just tries to replace original dll. Buf if you use “recompile” in Editor, it works fine.