Unreal Engine no longer opening projects

I am currently working on a project where I’m trying out different shaders and post processing effects. The project was initially a blueprint project but I later added the C++ files in order to work with custom shader files (unfortunatly, I never got this working). But when I try to open my project it will crash. Below is the crash report that is generated:

Assertion failed: IFileManager::Get().MakeDirectory(*Input.DumpDebugInfoPath, true) [File:D:/Build/++UE4/Sync/Engine/Source/Runtime/Engine/Private/ShaderCompiler/ShaderCompiler.cpp] [Line: 3379] Failed to create directory for shader debug info 'C:/UnrealProjects/MyProject/Saved/ShaderDebugInfo/PCD3D_SM5/DefaultDeferredDecalMaterial/TGPUSkinVertexFactoryDefault/TBasePassVSFSelfShadowedCachedPointIndirectLightingPolicyAtmosphericFog/0_9f0f39654be6ea03'

UE4Editor_Core
UE4Editor_Core
UE4Editor_Engine
UE4Editor_Engine
UE4Editor_Engine
UE4Editor_Engine
UE4Editor_Engine
UE4Editor_Engine
UE4Editor_Engine
UE4Editor_Engine
UE4Editor_Engine
UE4Editor_Engine
UE4Editor_Engine
UE4Editor_CoreUObject
UE4Editor_Engine
UE4Editor_Engine
UE4Editor_Engine
UE4Editor_CoreUObject
UE4Editor_CoreUObject
UE4Editor_CoreUObject
UE4Editor_CoreUObject
UE4Editor_CoreUObject
UE4Editor_CoreUObject
UE4Editor_CoreUObject
UE4Editor_CoreUObject
UE4Editor_Engine
UE4Editor_Engine
UE4Editor_CoreUObject
UE4Editor_CoreUObject
UE4Editor_CoreUObject
UE4Editor_Engine
UE4Editor_CoreUObject
UE4Editor_CoreUObject
UE4Editor_CoreUObject
UE4Editor
UE4Editor
UE4Editor
UE4Editor
UE4Editor
kernel32
ntdll

This error appears for any project that contains and C++ code, if the project contains only blueprints then it will open and will work correctly. Unreal was working fine a few days ago and I could open my project without it crashing. I don’t think I’ve changed anything and it suddenly has stopped working.

I’ve tried looking on the internet and cannot find anything that has worked. I’ve verified the engine install and completely uninstalled and reinstalled the engine, but I get the same error. I have also tried running ‘Generate Visual Studio Project Files’, which completes without an error, but once again once I try and open the project in an engine it will crash.

How did you implemented that custom shader code?

These folders (with ShaderDebugInfo) aren’t created by default. You must have enabled CVars for the shader development in ConsoleVariables.ini (like r.ShaderDevelopmentMode). Please try disabling them and restarting. Alternatively, if you want to keep them, then also enable r.DumpShaderDebugShortNames (it is in the same Engine/Config/ConsoleVariables.ini file) because the folder creation error is likely due to path being longer than the PATH_MAX (260 characters) on Windows.

Regards,
RCL