Unable to delete SharedPCH.Engine.ShadowErrors

Got this error and have no clue how to fix it. Can’t even find other people online getting this error :/.

Severity Code Description Project File Line Suppression State
Error Unable to delete C:\Users\Liamm\Documents\Game Design\Unreal Projects\ZombieShooter\Intermediate\Build\Win64\ZombieShooterEditor\Development (Unable to delete \?\C:\Users\Liamm\Documents\Game Design\Unreal Projects\ZombieShooter\Intermediate\Build\Win64\ZombieShooterEditor\Development\Engine\SharedPCH.Engine.ShadowErrors.h)
File: C:\Users\Liamm\Documents\Game Design\Unreal Projects\ZombieShooter\Intermediate\ProjectFiles\UnrealBuildTool

Any ideas? It also asked me to put the header file include at the top above the game header.

Normal:

#include "ZombieShooter.h"
#include "ZombieShooterGameModeBase.h"

Code to fix the error:

#include "ZombieShooterGameModeBase.h"
#include "ZombieShooter.h"

Yeah, I am getting that too :frowning: Any way to refresh the question?

Hi! Somebody from my team just had a very similar issue (it was a “rename” operation failing, instead of the “delete” you described here, but on the same file). In their case, it appears to have been caused by their antivirus software, preventing the file mentioned in the error message to be renamed.
I’d advise you to completely disable your antivirus while you are building.

I’ve read similar errors can also be caused by special characters in the file path, or the path being too long (over 260).

Hope this helps, cheers! :slight_smile:

1 Like

Hi!

Launching Visual Studio as Administrator fixed the issue for me