Must generate new Visual Studio files after any change to code in order to compile

I am working on the very beginnings of the BuildingEscape section, and I am having a bizarre series of errors. When trying to just output with UE_LOG, If I make seemingly ANY changes to my code, even to a newly generated c++ component, this error is produced:

Failed to produce item: C:\Users\Tyler\Documents\Unreal Projects\EscapeBuilding\Intermediate\Build\Win64\UE4Editor\Development\UE4Editor-EscapeBuilding-9373.lib

Error MSB3075 The command ““C:\Program Files\Epic Games\UE_4.16\Engine\Build\BatchFiles\Build.bat” EscapeBuildingEditor Win64 Development “C:\Users\Tyler\Documents\Unreal Projects\EscapeBuilding\EscapeBuilding.uproject” -waitmutex” exited with code 5. Please verify that you have sufficient rights to run this command.

Now, if I save my all of my work, close both programs, delete the visual studio files, and finally generate new ones then it will compile just fine, and the code will work. However, if I were to remove the code and bring it back to the initial state of a new c++ component, then the same errors will be produced. Though, the “UE4Editor-EscapeBuilding-9373.lib” part will have a different ####.lib.

I have tested this about 10 times now when advancing through the project 3 times from scratch. I can enter the new code, get those same errors, go through the steps, generate new files, and everything will work fine. I have gotten the output log to successfully output the locations of the rock and the chair. But when I remove the position output code and recompile? Same errors. I put the code that works back into the file. Same errors. Go through all the steps, and it works again.

Does anyone have any clue what is going on? I tried reinstalling Unreal Engine with versions 4.15.3 and 4.16. I am using Visual Studio 2017. I have tried everything I can think of to resolves this, and have not had any luck. I really would like to continue working on this course, but this is an absolute roadblock that is killing my motivation.

Thanks for any help!

Well, I decided to continue on with my makeshift method of getting things to compile, and now the error is gone. Everything works as it should despite making no obvious changes to anything. I’ll accept the good fortune, but maybe this may come in handy for someone else.

I am having this same issue also every time I try to hit play UE crash completely, I’ve restarted the project from scratch about 3-4 times and left UE for a couple of months, came back. Same issue, will try your solution tho

Privacy & Terms