Compile errors with VS 2022

Setting up a new work PC with a clean install of everything and trying to get things working with only VS2022. It looks like its having trouble with some engine includes.

I’m pretty certain I have all of the necessary and recommended packages installed with VS. Generated project files with -2022 in the command line.

Anyone seen similar errors or have any ideas what I can try? Really want to avoid installing 2019 if possible.

Thanks

1>Using Visual Studio 2022 14.32.31332 toolchain (C:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Tools\MSVC\14.32.31326) and Windows 10.0.19041.0 SDK (C:\Program Files (x86)\Windows Kits\10).
1>Building 245 actions with 20 processes...
1>  [1/245] Module.LocalizationDashboard.cpp
1>C:/Projects/UE4/Engine/Source/Editor/LocalizationDashboard/Private/LocalizationDashboard.cpp(74): error C2039: 'FModuleManager': is not a member of 'SLocalizationDashboard'
1>  C:/Projects/UE4/Engine/Source/Editor/LocalizationDashboard/Private/LocalizationDashboard.cpp(29): note: see declaration of 'SLocalizationDashboard'
1>C:/Projects/UE4/Engine/Source/Editor/LocalizationDashboard/Private/LocalizationDashboard.cpp(74): error C2530: 'PropertyModule': references must be initialized
1>  [2/245] Module.AutomationWindow.cpp
1>C:/Projects/UE4/Engine/Source/Developer/AutomationWindow/Private/SAutomationTestItem.cpp(70): error C2039: 'FModuleManager': is not a member of 'SAutomationTestItem'
1>  C:\Projects\UE4\Engine\Source\Developer\AutomationWindow\Private\SAutomationTestItem.h(22): note: see declaration of 'SAutomationTestItem'
1>C:/Projects/UE4/Engine/Source/Developer/AutomationWindow/Private/SAutomationTestItem.cpp(70): error C2530: 'AssetRegistryModule': references must be initialized
1>  [3/245] Module.SkeletalMeshEditor.cpp
1>C:/Projects/UE4/Engine/Source/Editor/SkeletalMeshEditor/Private/SkeletalMeshEditor.cpp(542): error C2039: 'FModuleManager': is not a member of 'FSkeletalMeshEditor'
1>  C:\Projects\UE4\Engine\Source\Editor\SkeletalMeshEditor\Private\SkeletalMeshEditor.h(46): note: see declaration of 'FSkeletalMeshEditor'
1>C:/Projects/UE4/Engine/Source/Editor/SkeletalMeshEditor/Private/SkeletalMeshEditor.cpp(542): error C2530: 'PersonaModule': references must be initialized

Hey @Craig_Downs, are you trying to compile the engine’s source code only? Did you run the Setup.bat and GenerateProjectFiles.bat files (in that order)?

Trying to compile the game project. We have engine source with modifications + game code.

I don’t see a setup.bat and don’t recall ever running one before, but I did run GenerateProjectFiles.

Everything works fine on my old machine with VS2019, and another engineer on the team who installed VS2022 on a new machine was able to get things to work by installing VS2019.

My goal is to get it working with just VS2022, so I’m trying to figure out what is in the VS2019 install that I’m missing which would cause the above errors.

Thanks,
Craig