Why cleaning project only in source built engine cleans Ue4 as well?

I am using a source built UE4 because I wanted to compile a stand alone server.

In visual studio I went to build-> project only -> clean <Myproject name> It started cleaning and when It was done I hit build->Build solution and it started to build engine modules.

While I only cleaned the game project build so why it needs to build the whole engine again?

I think it maybe because I didn’t use build->project only -> build<project Name> but still that dosen’t mean it should build everything from scratch , that takes hours.

The engine is always included in the ‘solution’, so you have to build the project instead, more specificially, the VS project of your Unreal Engine game.

You can clean an individual project by using the Engine/Build/BatchFiles/Clean.bat script. As far as I remember the argument you need to provide is the project name.

Or in you Visual Studio project solution.
Right click on your project/ game name.
And press Project Only > and select (Rebuild Only Project Name, Clean Only Project Name). and so 4th.

Having the same problem as OP.

Method 1: Right click project -> Project Only -> Clean <Project Name>
Method 2: Engine/Build/BatchFiles/Clean.bat <Project Name> <Platform> <Config>

After doing either of these methods, the next time I Right click project -> Build, the entire engine is rebuilt.

May be worth noting that I’m using incredibuild. Engine version 4.10. VS 2013.

Just delete YourGame/Intermediate/Build instead of doing a project clean.

Y

You should run clean because Visual Studio generates XML data for linking.
And this do not get deleted when you only delete Intermediate folders as they are saved in “.\User” and/or “.%AppData%” (for Windows users).

In most cases this will not be an issue but I personally avoid it just to be safe.

I scream out in pain every time i accidentally do this, lol. :slight_smile:

Ctrl + Pause Break should stop the build, which can be handy if you’ve accidentally started a build/clean of the entire engine - you can sometimes catch it in time and prevent a disaster :slight_smile: