Cleaning project sometimes removes engine files

Using visual studio Clean Project, or even XCode Clean sometime removes files in the Engine directory. like UE4-Core.dll, etc.

Maybe that is because I have plugins in my project.

Hey Yata,

Thanks for submitting the issue, however part of the clean up process to is to remove files such as the UE4-Core.dll, when needed. Furthermore, because you are speaking for Visual Studio and XCode, we do not think that this is a bug with the Unreal Engine.

If you still believe this may be a bug, please provide steps for us to reproduce the issue, and we will continue our investigation.


But I am using Launcher downloaded Engine. And after cleaning my project Unreal Engine became unusable.

The Clean functionality in Visual Studio will delete all of the built data (such as dlls) from your project. This is fine for when you are working with source builds, as you have the ability to rebuild and recreate these files, but on the binary (launcher) version, you cannot rebuild them. I would highly recommend you do not use Clean; ever.

With that said, if you already have done this, open the Epic Games Launcher, go to the Unreal Engine tab, and with the current version you have installed, click the drop down and then click “Verify”. This should clean up any of the damage Visual Studio has done to your install by re-downloading what was deleted.

Yes, Kyle, I know how to fix this. But the problem is tha Epic Games officially leaves the possibility to break everything. Why not to fix Clean project functionality for?

Actually I don’t understand why it is intended to clean engine files even in source build. There are two projects in the solutions - one for game and one for engine. If I would like to clean engine - I would press clean on Engine project.
If I press clean on Game project, I expect only Game project files to be cleaned - cleaning Engine in that case makes no sense to me at all. - That is completely unusual and unpredictable behavior - no build system works like that.

Epic Games doesn’t officially develop Visual Studio, therefor doesn’t have control of changing Visual Studio code, such as Clean Project.

Furthermore, the Clean functionality is not unusual or unpredictable behavior. What you experienced is exactly what Clean is used for and expected.

Actually Visual Studio is not doing the clean. It is calling a command Epic games provide it when generating the solution. So it is up to a developer to decide what to clean, it is quite a standard practice.

Options for a Game project.

Options for an UE project.

That is Visual Studio and options for Visual Studio, not Unreal Engine.

Kyle, no, that is command which is generated by UBT and saved to generated project file. Visual Studio just execute it when Clean menu item is pressed.

Thanks for clarifying.

The issue is being tracked. You can follow it here:

The answer above still applies for now. If using the binary, the clean option has a chance to remove engine dlls and other important files. The only option if you have done this to reclaim them is to re-download them from the Epic Games Launcher.

If you are using the source build, you can recompile the engine to get them back.

Thanks for filling an issue, Kyle.

Can you add to it that the same behaviour is on windows too.

And expected behaviour is that Game project’s clean command would clean only Game project (and it’s plugins) build files. And UE project clean command will do nothing (or clean UE engine files only if we are building the source build and our project is inside UE source dir )