The project could not be compiled. Would you like to open it in visual studio?

I am fairly new to unreal engine and came across this error when trying to generate a c++ project: The project could not be compiled. Would you like to open it in visual studio?
This is my crash log: Running C:/Program Files/Epic Games/UE_5.3/Engine/Build/BatchFiles/Build.bat Development Win64 -Project="C:/Users/lorin/OneDrive/Documents/Unreal Projects/MyProjectTEST/MyProjectTEST.uproject" -TargetType=Editor -Progress -NoEngineChanges -NoHotReloadFromIDE Using bundled DotNet SDK version: 6.0.302 Running UnrealBuildTool: dotnet "..\..\Engine\Binaries\DotNET\UnrealBuildTool\UnrealBuildTool.dll" Development Win64 -Project="C:/Users/lorin/OneDrive/Documents/Unreal Projects/MyProjectTEST/MyProjectTEST.uproject" -TargetType=Editor -Progress -NoEngineChanges -NoHotReloadFromIDE Log file: C:\Users\lorin\AppData\Local\UnrealBuildTool\Log.txt Creating makefile for MyProjectTESTEditor (no existing makefile) @progress push 5% Parsing headers for MyProjectTESTEditor Running Internal UnrealHeaderTool "C:\Users\lorin\OneDrive\Documents\Unreal Projects\MyProjectTEST\MyProjectTEST.uproject" "C:\Users\lorin\OneDrive\Documents\Unreal Projects\MyProjectTEST\Intermediate\Build\Win64\MyProjectTESTEditor\Development\MyProjectTESTEditor.uhtmanifest" -WarningsAsErrors -installed Total of 6 written Reflection code generated for MyProjectTESTEditor in 1.605106 seconds @progress pop Building MyProjectTESTEditor... Using Visual Studio 2022 14.39.33520 toolchain (C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.39.33519) and Windows 10.0.22621.0 SDK (C:\Program Files (x86)\Windows Kits\10). Determining max actions to execute in parallel (6 physical cores, 12 logical cores) Executing up to 6 processes, one per physical core ------ Building 11 action(s) started ------ [1/11] Resource Default.rc2 [2/11] Compile [x64] SharedPCH.Engine.Cpp20.cpp C:\Program Files\Epic Games\UE_5.3\Engine\Source\predefined C++ types (compiler internal)(420): error C2248: 'FHazardPointerCollection::FHazardRecord::FHazardRecord': cannot access private member declared in class 'FHazardPointerCollection::FHazardRecord' C:\Program Files\Epic Games\UE_5.3\Engine\Source\Runtime\Core\Public\Experimental\Containers\HazardPointer.h(86): note: see declaration of 'FHazardPointerCollection::FHazardRecord::FHazardRecord' C:\Program Files\Epic Games\UE_5.3\Engine\Source\Runtime\Core\Public\Experimental\Containers\HazardPointer.h(77): note: see declaration of 'FHazardPointerCollection::FHazardRecord' C:\Program Files\Epic Games\UE_5.3\Engine\Source\predefined C++ types (compiler internal)(420): note: the template instantiation context (the oldest one first) is C:\Program Files\Epic Games\UE_5.3\Engine\Source\Runtime\Core\Public\Experimental\Containers\HazardPointer.h(133): note: see reference to function template instantiation 'void __builtin_array_init_helper<FHazardPointerCollection::FHazardRecord>(_T *,size_t) noexcept(<expr>)' being compiled with [ _T=FHazardPointerCollection::FHazardRecord ] Total time in Parallel executor: 20.93 second
I know that there are a lot of forums for this question, but they all have different solutions for this problem and none of those seem to be working for me.
PS: I use UE5.3.2 and Visual Studio 2022

Which exact version is your visual studio ?

There seem other people getting the same issue from the very latest visual studio Failure to create a new project: "cannot access private member declared in class 'FHazardPointerCollection::FHazardRecord'" - #17 by StBlueFire

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.