Cannot compile code in editor (generated conflicts)

If you add a new class, a new function or a new component you need to close editor, compile from VS and then reopen the editor - as long it causes changes to the editor, this is required.
However if you are only changing the code of already existing functions then you can compile from the editor.

Hello Everyone,

So, when trying to make changes to .cpp or .h files in VS2013 and then trying to compile in the editor I am getting the following error.

Info ERROR: ‘C:/Users/Jamie/Documents/Unreal Projects/MyProject2/Intermediate/Build/Win64/Inc/MyProject2/MyProject2.generated.inl’: Changes to generated code are not allowed - conflicts written to ‘C:/Users/Jamie/Documents/Unreal Projects/MyProject2/Intermediate/Build/Win64/Inc/MyProject2/MyProject2.generated.inl.conflict’

Info Error: Failed to generate code for MyProject2

Info ERROR: UnrealHeaderTool failed for target ‘MyProject2’ (platform: Win64, module info: C:\Users\Jamie\Documents\Unreal Projects\MyProject2\Intermediate\Build\Win64\MyProject2\Development\UnrealHeaderTool.manifest).

However when I close the editor and then compile in VS2013 then re-open the editor my changes have been compiled. This is really disrupting what could be a great workflow. I assume this is something I have done?

It is the same on using github source (4.0.1 and 4.0.2)
and the Launcher project templates.

I look forward to an answer.
Thank you.

I am not adding new classes. I am simply making edits to the My Character class from the FPS template… Is that error that I mentioned due to needing to restart?

I was seeing such same issues until I installed the VS Extension that comes in /Engine/Extras/UnrealVS/VS2013.

Then using that, setting my game as the Launcher (be sure to right click the toolbar and select “UnrealVS” to show it) and launching my game, I never saw any of these generated conflicts again.

With the game set as the launcher, I use F5 to launch an instance and hot code deploy in editor by using Ctrl Alt Shift P.

However, as EvilCleric states, you must stop the process and recompile from VS after adding new classes.

Hope you solve the issue! It was making me pull my hair out!

compile from VS and then reopen the editor” This was the solution to me.
So for anyone else having this problem, here you go, short and sweet.

I had the same problem. Found a nice workaround in this video: UE4/Unreal Engine 4|German|v4.24.2|From Scratch – #3 Unser Characteraufsatz CPP-Ready - YouTube
Is in German, but you can understand the importent parts.