New Blank project wont compile ue5

First enviroment I’m running latest Win11 Pro with both VS2022 and VS2019 installed, i notice it defaulted to vs2022 when opening project file tho could be due to system associations.

Go to make a new project if I select C++ it says:

The project could not be compiled. Would you like to open it in Visual Studio?

Running C:/Program Files/Epic Games/UE_5.0/Engine/Binaries/DotNET/UnrealBuildTool/UnrealBuildTool.exe Development Win64 -Project=“C:/Users//Documents/Unreal Projects/spacetest1/spacetest1.uproject" -TargetType=Editor -Progress -NoEngineChanges -NoHotReloadFromIDE
Log file: C:\Users*
\AppData\Local\UnrealBuildTool\Log.txt
Creating makefile for spacetest1Editor (no existing makefile)
@progress push 5%
Parsing headers for spacetest1Editor
Running UnrealHeaderTool "C:\Users*
\Documents\Unreal Projects\spacetest1\spacetest1.uproject" "C:\Users*\Documents\Unreal Projects\spacetest1\Intermediate\Build\Win64\spacetest1Editor\Development\spacetest1Editor.uhtmanifest" -LogCmds=“loginit warning, logexit warning, logdatabase error” -Unattended -WarningsAsErrors -abslog="C:\Users**\AppData\Local\UnrealBuildTool\Log_UHT.txt” -installed
Reflection code generated for spacetest1Editor in 2.0943455 seconds
@progress pop
Building spacetest1Editor…
Using Visual Studio 2019 14.29.30143 toolchain (C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133) and Windows 10.0.22000.0 SDK (C:\Program Files (x86)\Windows Kits\10).
[Adaptive Build] Excluded from spacetest1 unity file: spacetest1.cpp, spacetest1GameModeBase.cpp
Determining max actions to execute in parallel (16 physical cores, 32 logical cores)
Executing up to 16 processes, one per physical core
Building 9 actions with 9 processes…
[1/9] Resource Default.rc2
[2/9] Compile SharedPCH.Engine.ShadowErrors.cpp
C:\Program Files\Epic Games\UE_5.0\Engine\Source\Runtime\SlateCore\Public\Layout\BasicLayoutWidgetSlot.h(78): error C2556: ‘void TAlignmentWidgetSlotMixin::SetHorizontalAlignment(EHorizontalAlignment)’: overloaded function differs only by return type from ‘MixedIntoType &TAlignmentWidgetSlotMixin::SetHorizontalAlignment(EHorizontalAlignment)’
with
[
SlotType=FBasicLayoutWidgetSlot
]
and
[
MixedIntoType=FBasicLayoutWidgetSlot
]
C:\Program Files\Epic Games\UE_5.0\Engine\Source\Runtime\SlateCore\Public\Layout\BasicLayoutWidgetSlot.h(63): note: see declaration of ‘TAlignmentWidgetSlotMixin::SetHorizontalAlignment’
with
[
SlotType=FBasicLayoutWidgetSlot
]
C:\Program Files\Epic Games\UE_5.0\Engine\Source\Runtime\SlateCore\Public\Layout\BasicLayoutWidgetSlot.h(464): note: see reference to class template instantiation ‘TAlignmentWidgetSlotMixin’ being compiled
with
[
SlotType=FBasicLayoutWidgetSlot
]
C:\Program Files\Epic Games\UE_5.0\Engine\Source\Runtime\SlateCore\Public\Layout\BasicLayoutWidgetSlot.h(511): note: see reference to class template instantiation ‘TBasicLayoutWidgetSlot’ being compiled
C:\Program Files\Epic Games\UE_5.0\Engine\Source\Runtime\SlateCore\Public\Layout\BasicLayoutWidgetSlot.h(77): error C2040: ‘TAlignmentWidgetSlotMixin::SetHorizontalAlignment’: ‘void (EHorizontalAlignment)’ differs in levels of indirection from ‘MixedIntoType &(EHorizontalAlignment)’
with
[
SlotType=FBasicLayoutWidgetSlot
]
and
[
MixedIntoType=FBasicLayoutWidgetSlot
]
C:\Program Files\Epic Games\UE_5.0\Engine\Source\Runtime\SlateCore\Public\Layout\BasicLayoutWidgetSlot.h(79): error C2059: syntax error: ‘if’
C:\Program Files\Epic Games\UE_5.0\Engine\Source\Runtime\SlateCore\Public\Layout\BasicLayoutWidgetSlot.h(80): error C2334: unexpected token(s) preceding ‘{’; skipping apparent function body
C:\Program Files\Epic Games\UE_5.0\Engine\Source\Runtime\SlateCore\Public\Layout\BasicLayoutWidgetSlot.h(78): error C2556: ‘void TAlignmentWidgetSlotMixin::SetHorizontalAlignment(EHorizontalAlignment)’: overloaded function differs only by return type from ‘MixedIntoType &TAlignmentWidgetSlotMixin::SetHorizontalAlignment(EHorizontalAlignment)’
with
[
SlotType=SOverlay::FOverlaySlot
]
and
[
MixedIntoType=SOverlay::FOverlaySlot
]
C:\Program Files\Epic Games\UE_5.0\Engine\Source\Runtime\SlateCore\Public\Layout\BasicLayoutWidgetSlot.h(63): note: see declaration of ‘TAlignmentWidgetSlotMixin::SetHorizontalAlignment’
with
[
SlotType=SOverlay::FOverlaySlot
]
C:\Program Files\Epic Games\UE_5.0\Engine\Source\Runtime\SlateCore\Public\Layout\BasicLayoutWidgetSlot.h(464): note: see reference to class template instantiation ‘TAlignmentWidgetSlotMixin’ being compiled
with
[
SlotType=SOverlay::FOverlaySlot
]
C:\Program Files\Epic Games\UE_5.0\Engine\Source\Runtime\SlateCore\Public\Widgets\SOverlay.h(42): note: see reference to class template instantiation ‘TBasicLayoutWidgetSlotSOverlay::FOverlaySlot’ being compiled
C:\Program Files\Epic Games\UE_5.0\Engine\Source\Runtime\SlateCore\Public\Layout\BasicLayoutWidgetSlot.h(77): error C2040: ‘TAlignmentWidgetSlotMixin::SetHorizontalAlignment’: ‘void (EHorizontalAlignment)’ differs in levels of indirection from ‘MixedIntoType &(EHorizontalAlignment)’
with
[
SlotType=SOverlay::FOverlaySlot
]
and
[
MixedIntoType=SOverlay::FOverlaySlot
]
C:\Program Files\Epic Games\UE_5.0\Engine\Source\Runtime\SlateCore\Public\Layout\BasicLayoutWidgetSlot.h(78): error C2556: ‘void TAlignmentWidgetSlotMixin::SetHorizontalAlignment(EHorizontalAlignment)’: overloaded function differs only by return type from ‘MixedIntoType &TAlignmentWidgetSlotMixin::SetHorizontalAlignment(EHorizontalAlignment)’
with
[
SlotType=SBoxPanel::FSlot
]
and
[
MixedIntoType=SBoxPanel::FSlot
]
C:\Program Files\Epic Games\UE_5.0\Engine\Source\Runtime\SlateCore\Public\Layout\BasicLayoutWidgetSlot.h(63): note: see declaration of ‘TAlignmentWidgetSlotMixin::SetHorizontalAlignment’
with
[
SlotType=SBoxPanel::FSlot
]
C:\Program Files\Epic Games\UE_5.0\Engine\Source\Runtime\SlateCore\Public\Layout\BasicLayoutWidgetSlot.h(464): note: see reference to class template instantiation ‘TAlignmentWidgetSlotMixin’ being compiled
with
[
SlotType=SBoxPanel::FSlot
]
C:\Program Files\Epic Games\UE_5.0\Engine\Source\Runtime\SlateCore\Public\Widgets\SBoxPanel.h(36): note: see reference to class template instantiation ‘TBasicLayoutWidgetSlot’ being compiled
with
[
SlotType=SBoxPanel::FSlot
]
C:\Program Files\Epic Games\UE_5.0\Engine\Source\Runtime\SlateCore\Public\Widgets\SBoxPanel.h(139): note: see reference to class template instantiation ‘SBoxPanel::TSlotSBoxPanel::FSlot’ being compiled
C:\Program Files\Epic Games\UE_5.0\Engine\Source\Runtime\SlateCore\Public\Layout\BasicLayoutWidgetSlot.h(77): error C2040: ‘TAlignmentWidgetSlotMixin::SetHorizontalAlignment’: ‘void (EHorizontalAlignment)’ differs in levels of indirection from ‘MixedIntoType &(EHorizontalAlignment)’
with
[
SlotType=SBoxPanel::FSlot
]
and
[
MixedIntoType=SBoxPanel::FSlot
]
C:\Program Files\Epic Games\UE_5.0\Engine\Source\Runtime\SlateCore\Public\Layout\BasicLayoutWidgetSlot.h(78): error C2556: ‘void TAlignmentWidgetSlotMixin::SetHorizontalAlignment(EHorizontalAlignment)’: overloaded function differs only by return type from ‘MixedIntoType &TAlignmentWidgetSlotMixin::SetHorizontalAlignment(EHorizontalAlignment)’
with
[
SlotType=SHorizontalBox::FSlot
]
and
[
MixedIntoType=SHorizontalBox::FSlot
]
C:\Program Files\Epic Games\UE_5.0\Engine\Source\Runtime\SlateCore\Public\Layout\BasicLayoutWidgetSlot.h(63): note: see declaration of ‘TAlignmentWidgetSlotMixin::SetHorizontalAlignment’
with
[
SlotType=SHorizontalBox::FSlot
]
C:\Program Files\Epic Games\UE_5.0\Engine\Source\Runtime\SlateCore\Public\Layout\BasicLayoutWidgetSlot.h(464): note: see reference to class template instantiation ‘TAlignmentWidgetSlotMixin’ being compiled
with
[
SlotType=SHorizontalBox::FSlot
]
C:\Program Files\Epic Games\UE_5.0\Engine\Source\Runtime\SlateCore\Public\Widgets\SBoxPanel.h(36): note: see reference to class template instantiation ‘TBasicLayoutWidgetSlot’ being compiled
with
[
SlotType=SHorizontalBox::FSlot
]
C:\Program Files\Epic Games\UE_5.0\Engine\Source\Runtime\SlateCore\Public\Widgets\SBoxPanel.h(227): note: see reference to class template instantiation ‘SBoxPanel::TSlotSHorizontalBox::FSlot’ being compiled
C:\Program Files\Epic Games\UE_5.0\Engine\Source\Runtime\SlateCore\Public\Layout\BasicLayoutWidgetSlot.h(77): error C2040: ‘TAlignmentWidgetSlotMixin::SetHorizontalAlignment’: ‘void (EHorizontalAlignment)’ differs in levels of indirection from ‘MixedIntoType &(EHorizontalAlignment)’
with
[
SlotType=SHorizontalBox::FSlot
]
and
[
MixedIntoType=SHorizontalBox::FSlot
]
C:\Program Files\Epic Games\UE_5.0\Engine\Source\Runtime\SlateCore\Public\Layout\BasicLayoutWidgetSlot.h(78): error C2556: ‘void TAlignmentWidgetSlotMixin::SetHorizontalAlignment(EHorizontalAlignment)’: overloaded function differs only by return type from ‘MixedIntoType &TAlignmentWidgetSlotMixin::SetHorizontalAlignment(EHorizontalAlignment)’
with
[
SlotType=SVerticalBox::FSlot
]
and
[
MixedIntoType=SVerticalBox::FSlot
]
C:\Program Files\Epic Games\UE_5.0\Engine\Source\Runtime\SlateCore\Public\Layout\BasicLayoutWidgetSlot.h(63): note: see declaration of ‘TAlignmentWidgetSlotMixin::SetHorizontalAlignment’
with
[
SlotType=SVerticalBox::FSlot
]
C:\Program Files\Epic Games\UE_5.0\Engine\Source\Runtime\SlateCore\Public\Layout\BasicLayoutWidgetSlot.h(464): note: see reference to class template instantiation ‘TAlignmentWidgetSlotMixin’ being compiled
with
[
SlotType=SVerticalBox::FSlot
]
C:\Program Files\Epic Games\UE_5.0\Engine\Source\Runtime\SlateCore\Public\Widgets\SBoxPanel.h(36): note: see reference to class template instantiation ‘TBasicLayoutWidgetSlot’ being compiled
with
[
SlotType=SVerticalBox::FSlot
]
C:\Program Files\Epic Games\UE_5.0\Engine\Source\Runtime\SlateCore\Public\Widgets\SBoxPanel.h(330): note: see reference to class template instantiation ‘SBoxPanel::TSlotSVerticalBox::FSlot’ being compiled
C:\Program Files\Epic Games\UE_5.0\Engine\Source\Runtime\SlateCore\Public\Layout\BasicLayoutWidgetSlot.h(77): error C2040: ‘TAlignmentWidgetSlotMixin::SetHorizontalAlignment’: ‘void (EHorizontalAlignment)’ differs in levels of indirection from ‘MixedIntoType &(EHorizontalAlignment)’
with
[
SlotType=SVerticalBox::FSlot
]
and
[
MixedIntoType=SVerticalBox::FSlot
]
C:\Program Files\Epic Games\UE_5.0\Engine\Source\Runtime\SlateCore\Public\Layout\BasicLayoutWidgetSlot.h(78): error C2556: ‘void TAlignmentWidgetSlotMixinSUniformWrapPanel::FSlot::SetHorizontalAlignment(EHorizontalAlignment)’: overloaded function differs only by return type from ‘MixedIntoType &TAlignmentWidgetSlotMixin::SetHorizontalAlignment(EHorizontalAlignment)’
with
[
MixedIntoType=SUniformWrapPanel::FSlot
]
C:\Program Files\Epic Games\UE_5.0\Engine\Source\Runtime\SlateCore\Public\Layout\BasicLayoutWidgetSlot.h(63): note: see declaration of ‘TAlignmentWidgetSlotMixinSUniformWrapPanel::FSlot::SetHorizontalAlignment’
C:\Program Files\Epic Games\UE_5.0\Engine\Source\Runtime\Slate\Public\Widgets\Layout\SUniformWrapPanel.h(25): note: see reference to class template instantiation ‘TAlignmentWidgetSlotMixinSUniformWrapPanel::FSlot’ being compiled
C:\Program Files\Epic Games\UE_5.0\Engine\Source\Runtime\SlateCore\Public\Layout\BasicLayoutWidgetSlot.h(77): error C2040: ‘TAlignmentWidgetSlotMixinSUniformWrapPanel::FSlot::SetHorizontalAlignment’: ‘void (EHorizontalAlignment)’ differs in levels of indirection from ‘MixedIntoType &(EHorizontalAlignment)’
with
[
MixedIntoType=SUniformWrapPanel::FSlot
]

If i choose the open in visual studio option it opens it in vs2022 and the build log errors are:

Build started…
1>------ Skipped Build: Project: UE5, Configuration: BuiltWithUnrealBuildTool Win64 ------
1>Project not selected to build for this solution configuration
2>------ Build started: Project: spacetest1, Configuration: Development_Editor x64 ------
2>Using bundled DotNet SDK
2>Log file: C:\Users*\AppData\Local\UnrealBuildTool\Log.txt
2>Building spacetest1Editor…
2>Using Visual Studio 2019 14.29.30143 toolchain (C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133) and Windows 10.0.22000.0 SDK (C:\Program Files (x86)\Windows Kits\10).
2>[Adaptive Build] Excluded from spacetest1 unity file: spacetest1.cpp, spacetest1GameModeBase.cpp
2>Determining max actions to execute in parallel (16 physical cores, 32 logical cores)
2> Executing up to 16 processes, one per physical core
2>Building 8 actions with 8 processes…
2>[1/8] Compile SharedPCH.Engine.ShadowErrors.cpp
2>C:\Program Files\Epic Games\UE_5.0\Engine\Source\Runtime\SlateCore\Public\Layout\BasicLayoutWidgetSlot.h(78): error C2556: ‘void TAlignmentWidgetSlotMixin::SetHorizontalAlignment(EHorizontalAlignment)’: overloaded function differs only by return type from ‘MixedIntoType &TAlignmentWidgetSlotMixin::SetHorizontalAlignment(EHorizontalAlignment)’
2> with
2> [
2> SlotType=FBasicLayoutWidgetSlot
2> ]
2> and
2> [
2> MixedIntoType=FBasicLayoutWidgetSlot
2> ]
2>C:\Program Files\Epic Games\UE_5.0\Engine\Source\Runtime\SlateCore\Public\Layout\BasicLayoutWidgetSlot.h(63): note: see declaration of ‘TAlignmentWidgetSlotMixin::SetHorizontalAlignment’
2> with
2> [
2> SlotType=FBasicLayoutWidgetSlot
2> ]
2>C:\Program Files\Epic Games\UE_5.0\Engine\Source\Runtime\SlateCore\Public\Layout\BasicLayoutWidgetSlot.h(464): note: see reference to class template instantiation ‘TAlignmentWidgetSlotMixin’ being compiled
2> with
2> [
2> SlotType=FBasicLayoutWidgetSlot
2> ]
2>C:\Program Files\Epic Games\UE_5.0\Engine\Source\Runtime\SlateCore\Public\Layout\BasicLayoutWidgetSlot.h(511): note: see reference to class template instantiation ‘TBasicLayoutWidgetSlot’ being compiled
2>C:\Program Files\Epic Games\UE_5.0\Engine\Source\Runtime\SlateCore\Public\Layout\BasicLayoutWidgetSlot.h(77): error C2040: ‘TAlignmentWidgetSlotMixin::SetHorizontalAlignment’: ‘void (EHorizontalAlignment)’ differs in levels of indirection from ‘MixedIntoType &(EHorizontalAlignment)’
2> with
2> [
2> SlotType=FBasicLayoutWidgetSlot
2> ]
2> and
2> [
2> MixedIntoType=FBasicLayoutWidgetSlot
2> ]
2>C:\Program Files\Epic Games\UE_5.0\Engine\Source\Runtime\SlateCore\Public\Layout\BasicLayoutWidgetSlot.h(79): error C2059: syntax error: ‘if’
2>C:\Program Files\Epic Games\UE_5.0\Engine\Source\Runtime\SlateCore\Public\Layout\BasicLayoutWidgetSlot.h(80): error C2334: unexpected token(s) preceding ‘{’; skipping apparent function body
2>C:\Program Files\Epic Games\UE_5.0\Engine\Source\Runtime\SlateCore\Public\Layout\BasicLayoutWidgetSlot.h(78): error C2556: ‘void TAlignmentWidgetSlotMixin::SetHorizontalAlignment(EHorizontalAlignment)’: overloaded function differs only by return type from ‘MixedIntoType &TAlignmentWidgetSlotMixin::SetHorizontalAlignment(EHorizontalAlignment)’
2> with
2> [
2> SlotType=SOverlay::FOverlaySlot
2> ]
2> and
2> [
2> MixedIntoType=SOverlay::FOverlaySlot
2> ]
2>C:\Program Files\Epic Games\UE_5.0\Engine\Source\Runtime\SlateCore\Public\Layout\BasicLayoutWidgetSlot.h(63): note: see declaration of ‘TAlignmentWidgetSlotMixin::SetHorizontalAlignment’
2> with
2> [
2> SlotType=SOverlay::FOverlaySlot
2> ]
2>C:\Program Files\Epic Games\UE_5.0\Engine\Source\Runtime\SlateCore\Public\Layout\BasicLayoutWidgetSlot.h(464): note: see reference to class template instantiation ‘TAlignmentWidgetSlotMixin’ being compiled
2> with
2> [
2> SlotType=SOverlay::FOverlaySlot
2> ]
2>C:\Program Files\Epic Games\UE_5.0\Engine\Source\Runtime\SlateCore\Public\Widgets\SOverlay.h(42): note: see reference to class template instantiation ‘TBasicLayoutWidgetSlotSOverlay::FOverlaySlot’ being compiled
2>C:\Program Files\Epic Games\UE_5.0\Engine\Source\Runtime\SlateCore\Public\Layout\BasicLayoutWidgetSlot.h(77): error C2040: ‘TAlignmentWidgetSlotMixin::SetHorizontalAlignment’: ‘void (EHorizontalAlignment)’ differs in levels of indirection from ‘MixedIntoType &(EHorizontalAlignment)’
2> with
2> [
2> SlotType=SOverlay::FOverlaySlot
2> ]
2> and
2> [
2> MixedIntoType=SOverlay::FOverlaySlot
2> ]
2>C:\Program Files\Epic Games\UE_5.0\Engine\Source\Runtime\SlateCore\Public\Layout\BasicLayoutWidgetSlot.h(78): error C2556: ‘void TAlignmentWidgetSlotMixin::SetHorizontalAlignment(EHorizontalAlignment)’: overloaded function differs only by return type from ‘MixedIntoType &TAlignmentWidgetSlotMixin::SetHorizontalAlignment(EHorizontalAlignment)’
2> with
2> [
2> SlotType=SBoxPanel::FSlot
2> ]
2> and
2> [
2> MixedIntoType=SBoxPanel::FSlot
2> ]
2>C:\Program Files\Epic Games\UE_5.0\Engine\Source\Runtime\SlateCore\Public\Layout\BasicLayoutWidgetSlot.h(63): note: see declaration of ‘TAlignmentWidgetSlotMixin::SetHorizontalAlignment’
2> with
2> [
2> SlotType=SBoxPanel::FSlot
2> ]
2>C:\Program Files\Epic Games\UE_5.0\Engine\Source\Runtime\SlateCore\Public\Layout\BasicLayoutWidgetSlot.h(464): note: see reference to class template instantiation ‘TAlignmentWidgetSlotMixin’ being compiled
2> with
2> [
2> SlotType=SBoxPanel::FSlot
2> ]
2>C:\Program Files\Epic Games\UE_5.0\Engine\Source\Runtime\SlateCore\Public\Widgets\SBoxPanel.h(36): note: see reference to class template instantiation ‘TBasicLayoutWidgetSlot’ being compiled
2> with
2> [
2> SlotType=SBoxPanel::FSlot
2> ]
2>C:\Program Files\Epic Games\UE_5.0\Engine\Source\Runtime\SlateCore\Public\Widgets\SBoxPanel.h(139): note: see reference to class template instantiation ‘SBoxPanel::TSlotSBoxPanel::FSlot’ being compiled
2>C:\Program Files\Epic Games\UE_5.0\Engine\Source\Runtime\SlateCore\Public\Layout\BasicLayoutWidgetSlot.h(77): error C2040: ‘TAlignmentWidgetSlotMixin::SetHorizontalAlignment’: ‘void (EHorizontalAlignment)’ differs in levels of indirection from ‘MixedIntoType &(EHorizontalAlignment)’
2> with
2> [
2> SlotType=SBoxPanel::FSlot
2> ]
2> and
2> [
2> MixedIntoType=SBoxPanel::FSlot
2> ]
2>C:\Program Files\Epic Games\UE_5.0\Engine\Source\Runtime\SlateCore\Public\Layout\BasicLayoutWidgetSlot.h(78): error C2556: ‘void TAlignmentWidgetSlotMixin::SetHorizontalAlignment(EHorizontalAlignment)’: overloaded function differs only by return type from ‘MixedIntoType &TAlignmentWidgetSlotMixin::SetHorizontalAlignment(EHorizontalAlignment)’
2> with
2> [
2> SlotType=SHorizontalBox::FSlot
2> ]
2> and
2> [
2> MixedIntoType=SHorizontalBox::FSlot
2> ]
2>C:\Program Files\Epic Games\UE_5.0\Engine\Source\Runtime\SlateCore\Public\Layout\BasicLayoutWidgetSlot.h(63): note: see declaration of ‘TAlignmentWidgetSlotMixin::SetHorizontalAlignment’
2> with
2> [
2> SlotType=SHorizontalBox::FSlot
2> ]
2>C:\Program Files\Epic Games\UE_5.0\Engine\Source\Runtime\SlateCore\Public\Layout\BasicLayoutWidgetSlot.h(464): note: see reference to class template instantiation ‘TAlignmentWidgetSlotMixin’ being compiled
2> with
2> [
2> SlotType=SHorizontalBox::FSlot
2> ]
2>C:\Program Files\Epic Games\UE_5.0\Engine\Source\Runtime\SlateCore\Public\Widgets\SBoxPanel.h(36): note: see reference to class template instantiation ‘TBasicLayoutWidgetSlot’ being compiled
2> with
2> [
2> SlotType=SHorizontalBox::FSlot
2> ]
2>C:\Program Files\Epic Games\UE_5.0\Engine\Source\Runtime\SlateCore\Public\Widgets\SBoxPanel.h(227): note: see reference to class template instantiation ‘SBoxPanel::TSlotSHorizontalBox::FSlot’ being compiled
2>C:\Program Files\Epic Games\UE_5.0\Engine\Source\Runtime\SlateCore\Public\Layout\BasicLayoutWidgetSlot.h(77): error C2040: ‘TAlignmentWidgetSlotMixin::SetHorizontalAlignment’: ‘void (EHorizontalAlignment)’ differs in levels of indirection from ‘MixedIntoType &(EHorizontalAlignment)’
2> with
2> [
2> SlotType=SHorizontalBox::FSlot
2> ]
2> and
2> [
2> MixedIntoType=SHorizontalBox::FSlot
2> ]
2>C:\Program Files\Epic Games\UE_5.0\Engine\Source\Runtime\SlateCore\Public\Layout\BasicLayoutWidgetSlot.h(78): error C2556: ‘void TAlignmentWidgetSlotMixin::SetHorizontalAlignment(EHorizontalAlignment)’: overloaded function differs only by return type from ‘MixedIntoType &TAlignmentWidgetSlotMixin::SetHorizontalAlignment(EHorizontalAlignment)’
2> with
2> [
2> SlotType=SVerticalBox::FSlot
2> ]
2> and
2> [
2> MixedIntoType=SVerticalBox::FSlot
2> ]
2>C:\Program Files\Epic Games\UE_5.0\Engine\Source\Runtime\SlateCore\Public\Layout\BasicLayoutWidgetSlot.h(63): note: see declaration of ‘TAlignmentWidgetSlotMixin::SetHorizontalAlignment’
2> with
2> [
2> SlotType=SVerticalBox::FSlot
2> ]
2>C:\Program Files\Epic Games\UE_5.0\Engine\Source\Runtime\SlateCore\Public\Layout\BasicLayoutWidgetSlot.h(464): note: see reference to class template instantiation ‘TAlignmentWidgetSlotMixin’ being compiled
2> with
2> [
2> SlotType=SVerticalBox::FSlot
2> ]
2>C:\Program Files\Epic Games\UE_5.0\Engine\Source\Runtime\SlateCore\Public\Widgets\SBoxPanel.h(36): note: see reference to class template instantiation ‘TBasicLayoutWidgetSlot’ being compiled
2> with
2> [
2> SlotType=SVerticalBox::FSlot
2> ]
2>C:\Program Files\Epic Games\UE_5.0\Engine\Source\Runtime\SlateCore\Public\Widgets\SBoxPanel.h(330): note: see reference to class template instantiation ‘SBoxPanel::TSlotSVerticalBox::FSlot’ being compiled
2>C:\Program Files\Epic Games\UE_5.0\Engine\Source\Runtime\SlateCore\Public\Layout\BasicLayoutWidgetSlot.h(77): error C2040: ‘TAlignmentWidgetSlotMixin::SetHorizontalAlignment’: ‘void (EHorizontalAlignment)’ differs in levels of indirection from ‘MixedIntoType &(EHorizontalAlignment)’
2> with
2> [
2> SlotType=SVerticalBox::FSlot
2> ]
2> and
2> [
2> MixedIntoType=SVerticalBox::FSlot
2> ]
2>C:\Program Files\Epic Games\UE_5.0\Engine\Source\Runtime\SlateCore\Public\Layout\BasicLayoutWidgetSlot.h(78): error C2556: ‘void TAlignmentWidgetSlotMixinSUniformWrapPanel::FSlot::SetHorizontalAlignment(EHorizontalAlignment)’: overloaded function differs only by return type from ‘MixedIntoType &TAlignmentWidgetSlotMixin::SetHorizontalAlignment(EHorizontalAlignment)’
2> with
2> [
2> MixedIntoType=SUniformWrapPanel::FSlot
2> ]
2>C:\Program Files\Epic Games\UE_5.0\Engine\Source\Runtime\SlateCore\Public\Layout\BasicLayoutWidgetSlot.h(63): note: see declaration of ‘TAlignmentWidgetSlotMixinSUniformWrapPanel::FSlot::SetHorizontalAlignment’
2>C:\Program Files\Epic Games\UE_5.0\Engine\Source\Runtime\Slate\Public\Widgets\Layout\SUniformWrapPanel.h(25): note: see reference to class template instantiation ‘TAlignmentWidgetSlotMixinSUniformWrapPanel::FSlot’ being compiled
2>C:\Program Files\Epic Games\UE_5.0\Engine\Source\Runtime\SlateCore\Public\Layout\BasicLayoutWidgetSlot.h(77): error C2040: ‘TAlignmentWidgetSlotMixinSUniformWrapPanel::FSlot::SetHorizontalAlignment’: ‘void (EHorizontalAlignment)’ differs in levels of indirection from ‘MixedIntoType &(EHorizontalAlignment)’
2> with
2> [
2> MixedIntoType=SUniformWrapPanel::FSlot
2> ]
2>C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.MakeFile.Targets(44,5): error MSB3073: The command "“C:\Program Files\Epic Games\UE_5.0\Engine\Build\BatchFiles\Build.bat” spacetest1Editor Win64 Development -Project="C:\Users*
\Documents\Unreal Projects\spacetest1\spacetest1.uproject" -WaitMutex -FromMsBuild" exited with code 6.
2>Done building project “spacetest1.vcxproj” – FAILED.
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 1 skipped ==========

Help would be appreciated, as im new to ue5 (usually found on unity), i did try checking the include files but seem to include everything pertinant.

well solved my own issue, good thing to given no replies but incase anyone else gets this, turns out it must have been a corrupted installation despite no warning or error messages of any kind during it, I tried adding more options to Visual studio but got same error, did nothing, then I simply tried to verify the files for UE5 and that fixed it.

2 Likes

i verify too, but it won’t fix

1 Like

I did Generate Visual Studio project files and it worked

Hello There, sorry i’m new to UE5 and have no idea what does to mean to “verify” or “Generate” at all… Could you please explain them or recommend me a way to understand them (a tutorial or something like that would be appretaited!)

1 Like

HI,
I’m getting a similar error. the error:
The project could not be compiled. Would you like to open it in Visual Studio?

Running C:/Program Files/Epic Games/UE_5.2/Engine/Build/BatchFiles/Build.bat Development Win64 -Project=“C:/Users/Anbara/Documents/Unreal Projects/MyProject2/MyProject2.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/Anbara/Documents/Unreal Projects/MyProject2/MyProject2.uproject” -TargetType=Editor -Progress -NoEngineChanges -NoHotReloadFromIDE
Log file: C:\Users\Anbara\AppData\Local\UnrealBuildTool\Log.txt
Creating makefile for MyProject2Editor (no existing makefile)
Expecting to find a type to be declared in a module rules named ‘MetaHumanProjectUtilities’ in UE5Rules, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null. This type must derive from the ‘ModuleRules’ type defined by Unreal Build Tool.

It’s my first time using UE. I’m trying to create my first project following a course on Game development with Unreal and C++ on coursera. I have VS 2022 community. Help would be greatly appreciated!

How?
After compile errors when it said to open in Visual Studio? if yes then how you generated files? Please elaborate…

I also verified but that did not work.