Build Error after upgrading new engine version

Hey everyone! I get failed build after upgrading LyraStarterGame migrated project from 5.0.3 to 5.1.1.

I followed the instructions to do after upgrading (Remove the required folders and “Generated Visual Studio Project Files”) and now when I open the new created .sln file and try to build I get failed build with these messages:

Build started…
1>------ Build started: Project: LyraMergeVerse2V2, Configuration: Development_Editor x64 ------
1>Running UnrealBuildTool: dotnet “…..\Engine\Binaries\DotNET\UnrealBuildTool\UnrealBuildTool.dll” LyraEditor Win64 Development -Project=“K:\Projects\UglyBros\LyraMergeVerse2V2 5.1\LyraMergeVerse2V2.uproject” -WaitMutex -FromMsBuild
1>Log file: C:\Users\kmltt\AppData\Local\UnrealBuildTool\Log.txt
1>DEPRECATION: ‘IniKeyBlacklist’, which is a config key in section [/Script/UnrealEd.ProjectPackagingSettings], in ‘K:\Projects\UglyBros\LyraMergeVerse2V2 5.1\Config\DefaultGame.ini’, has been deprecated. Using ‘IniKeyDenylist’ instead. It is recommended you update your .ini files as soon as possible, and replace IniKeyBlacklist with IniKeyDenylist
1>DEPRECATION: ‘IniSectionBlacklist’, which is a config key in section [/Script/UnrealEd.ProjectPackagingSettings], in ‘K:\Projects\UglyBros\LyraMergeVerse2V2 5.1\Config\DefaultGame.ini’, has been deprecated. Using ‘IniSectionDenylist’ instead. It is recommended you update your .ini files as soon as possible, and replace IniSectionBlacklist with IniSectionDenylist
1>DEPRECATION: ‘WhitelistDirectories’, which is a config key in section [Staging], in ‘K:\Projects\UglyBros\LyraMergeVerse2V2 5.1\Config\DefaultGame.ini’, has been deprecated. Using ‘AllowedDirectories’ instead. It is recommended you update your .ini files as soon as possible, and replace WhitelistDirectories with AllowedDirectories
1>Unable to build while Live Coding is active. Exit the editor and game, or press Ctrl+Alt+F11 if iterating on code in the editor or game
1>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.1\Engine\Build\BatchFiles\Build.bat” LyraEditor Win64 Development -Project=“K:\Projects\UglyBros\LyraMergeVerse2V2 5.1\LyraMergeVerse2V2.uproject” -WaitMutex -FromMsBuild” exited with code 6.
1>Done building project “LyraMergeVerse2V2.vcxproj” – FAILED.
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
========== Build started at 2:51 PM and took 01.484 seconds ==========

Hi there,
I few code references have changed in UE5.1 c++ API, and old references are now deprecated.

Open DefaultGame.ini (either via Windows Explorer or Visual Studio), and find references (in the open document):

  1. IniKeyBlacklist and replace all references by IniKeyDenylist

  2. IniSectionBlacklist and replace all references by IniSectionDenylist

  3. WhitelistDirectories and replace all references by AllowedDirectories

You have to close all open projects, otherwise you’ll get this error.

Hope that helps.

1 Like

Thank you for the answer! I did just what you told. This time I got this messages and build failed again:

Build started…
1>------ Build started: Project: LyraMergeVerse2, Configuration: Development_Editor x64 ------
1>Running UnrealBuildTool: dotnet “…..\Engine\Binaries\DotNET\UnrealBuildTool\UnrealBuildTool.dll” LyraEditor Win64 Development -Project=“K:\Projects\UglyBros\LyraMergeVerse2 5.1\LyraMergeVerse2.uproject” -WaitMutex -FromMsBuild
1>Log file: C:\Users\kmltt\AppData\Local\UnrealBuildTool\Log.txt
1>Building LyraEditor…
1>Using Visual Studio 2022 14.29.30148 toolchain (C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.29.30133) and Windows 10.0.22621.0 SDK (C:\Program Files (x86)\Windows Kits\10).
1>[Upgrade]
1>[Upgrade] Using backward-compatible include order. The latest version of UE has changed the order of includes, which may require code changes. The current setting is:
1>[Upgrade] IncludeOrderVersion = EngineIncludeOrderVersion.Unreal5_0
1>[Upgrade] Suppress this message by setting ‘IncludeOrderVersion = EngineIncludeOrderVersion.Unreal5_1;’ in LyraEditor.Target.cs.
1>[Upgrade] Alternatively you can set this to ‘EngineIncludeOrderVersion.Latest’ to always use the latest include order. This will potentially cause compile errors when integrating new versions of the engine.
1>[Upgrade]
1>Determining max actions to execute in parallel (8 physical cores, 16 logical cores)
1> Executing up to 8 processes, one per physical core
1>Building 16 actions with 8 processes…
1>[1/16] Compile Module.AdvancedSteamSessions.cpp
1>K:\Projects\UglyBros\LyraMergeVerse2 5.1\Plugins\AdvancedSessions\AdvancedSteamSessions\Source\AdvancedSteamSessions\Classes\AdvancedSteamFriendsLibrary.h(200): error C2660: ‘FUniqueNetId::GetTypeHash’: function does not take 1 arguments
1>C:\Program Files\Epic Games\UE_5.1\Engine\Source\Runtime\CoreOnline\Public\Online\CoreOnline.h(187): note: see declaration of ‘FUniqueNetId::GetTypeHash’
1>K:\Projects\UglyBros\LyraMergeVerse2 5.1\Plugins\AdvancedSessions\AdvancedSteamSessions\Source\AdvancedSteamSessions\Classes\AdvancedSteamFriendsLibrary.h(276): warning C4996: ANY_PACKAGE has been deprecated. Either use full path name of objects (including classes) or provide a valid Outer for FindObject functions Please update your code to the new API before upgrading to the next release, otherwise your project will no longer compile.
1>[2/16] Link UnrealEditor-AdvancedSteamSessions.dll cancelled
1>[3/16] Link UnrealEditor-AdvancedSteamSessions.lib cancelled
1>[4/16] Compile LyraEditor.cpp
1>K:\Projects\UglyBros\LyraMergeVerse2 5.1\Source\LyraEditor\LyraEditor.cpp(154): error C2653: ‘FEditorStyle’: is not a class or namespace name
1>K:\Projects\UglyBros\LyraMergeVerse2 5.1\Source\LyraEditor\LyraEditor.cpp(154): error C3861: ‘GetStyleSetName’: identifier not found
1>[5/16] Link UnrealEditor-LyraEditor.lib cancelled
1>[6/16] Compile Module.LyraGame.4_of_13.cpp
1>K:\Projects\UglyBros\LyraMergeVerse2 5.1\Source\LyraGame\GameFeatures\LyraGameFeaturePolicy.h(34): error C3668: ‘ULyraGameFeaturePolicy::GetPreloadAssetListForGameFeature’: method with override specifier ‘override’ did not override any base class methods
1>K:\Projects\UglyBros\LyraMergeVerse2 5.1\Source\LyraGame\GameFeatures\LyraGameFeaturePolicy.h(34): warning C4263: ‘TArray<FPrimaryAssetId,FDefaultAllocator> ULyraGameFeaturePolicy::GetPreloadAssetListForGameFeature(const UGameFeatureData *) const’: member function does not override any base class virtual member function
1>K:\Projects\UglyBros\LyraMergeVerse2 5.1\Source\LyraGame\GameFeatures\LyraGameFeaturePolicy.h(43): warning C4264: ‘TArray<FPrimaryAssetId,FDefaultAllocator> UGameFeaturesProjectPolicies::GetPreloadAssetListForGameFeature(const UGameFeatureData *,bool) const’: no override available for virtual member function from base ‘UGameFeaturesProjectPolicies’; function is hidden
1>C:\Program Files\Epic Games\UE_5.1\Engine\Plugins\Experimental\GameFeatures\Source\GameFeatures\Public\GameFeaturesProjectPolicies.h(28): note: see declaration of ‘UGameFeaturesProjectPolicies::GetPreloadAssetListForGameFeature’
1>C:\Program Files\Epic Games\UE_5.1\Engine\Plugins\Experimental\GameFeatures\Source\GameFeatures\Public\GameFeaturesProjectPolicies.h(16): note: see declaration of ‘UGameFeaturesProjectPolicies’
1>K:\Projects\UglyBros\LyraMergeVerse2 5.1\Source\LyraGame\GameFeatures\LyraGameFeaturePolicy.h(54): error C3668: ‘ULyraGameFeature_HotfixManager::OnGameFeatureLoading’: method with override specifier ‘override’ did not override any base class methods
1>K:\Projects\UglyBros\LyraMergeVerse2 5.1\Source\LyraGame\GameFeatures\LyraGameFeaturePolicy.h(54): warning C4263: ‘void ULyraGameFeature_HotfixManager::OnGameFeatureLoading(const UGameFeatureData *)’: member function does not override any base class virtual member function
1>K:\Projects\UglyBros\LyraMergeVerse2 5.1\Source\LyraGame\GameFeatures\LyraGameFeaturePolicy.h(55): warning C4264: ‘void IGameFeatureStateChangeObserver::OnGameFeatureLoading(const UGameFeatureData *,const FString &)’: no override available for virtual member function from base ‘IGameFeatureStateChangeObserver’; function is hidden
1>C:\Program Files\Epic Games\UE_5.1\Engine\Plugins\Experimental\GameFeatures\Source\GameFeatures\Public\GameFeatureStateChangeObserver.h(43): note: see declaration of ‘IGameFeatureStateChangeObserver::OnGameFeatureLoading’
1>C:\Program Files\Epic Games\UE_5.1\Engine\Plugins\Experimental\GameFeatures\Source\GameFeatures\Public\GameFeatureStateChangeObserver.h(29): note: see declaration of ‘IGameFeatureStateChangeObserver’
1>K:\Projects\UglyBros\LyraMergeVerse2 5.1\Source\LyraGame\GameFeatures\LyraGameFeaturePolicy.h(64): error C3668: ‘ULyraGameFeature_AddGameplayCuePaths::OnGameFeatureRegistering’: method with override specifier ‘override’ did not override any base class methods
1>K:\Projects\UglyBros\LyraMergeVerse2 5.1\Source\LyraGame\GameFeatures\LyraGameFeaturePolicy.h(64): warning C4263: ‘void ULyraGameFeature_AddGameplayCuePaths::OnGameFeatureRegistering(const UGameFeatureData *,const FString &)’: member function does not override any base class virtual member function
1>K:\Projects\UglyBros\LyraMergeVerse2 5.1\Source\LyraGame\GameFeatures\LyraGameFeaturePolicy.h(66): warning C4264: ‘void IGameFeatureStateChangeObserver::OnGameFeatureRegistering(const UGameFeatureData *,const FString &,const FString &)’: no override available for virtual member function from base ‘IGameFeatureStateChangeObserver’; function is hidden
1>C:\Program Files\Epic Games\UE_5.1\Engine\Plugins\Experimental\GameFeatures\Source\GameFeatures\Public\GameFeatureStateChangeObserver.h(39): note: see declaration of ‘IGameFeatureStateChangeObserver::OnGameFeatureRegistering’
1>C:\Program Files\Epic Games\UE_5.1\Engine\Plugins\Experimental\GameFeatures\Source\GameFeatures\Public\GameFeatureStateChangeObserver.h(29): note: see declaration of ‘IGameFeatureStateChangeObserver’
1>K:\Projects\UglyBros\LyraMergeVerse2 5.1\Source\LyraGame\GameFeatures\LyraGameFeaturePolicy.h(65): error C3668: ‘ULyraGameFeature_AddGameplayCuePaths::OnGameFeatureUnregistering’: method with override specifier ‘override’ did not override any base class methods
1>K:\Projects\UglyBros\LyraMergeVerse2 5.1\Source\LyraGame\GameFeatures\LyraGameFeaturePolicy.h(65): warning C4263: ‘void ULyraGameFeature_AddGameplayCuePaths::OnGameFeatureUnregistering(const UGameFeatureData *,const FString &)’: member function does not override any base class virtual member function
1>K:\Projects\UglyBros\LyraMergeVerse2 5.1\Source\LyraGame\GameFeatures\LyraGameFeaturePolicy.h(66): warning C4264: ‘void IGameFeatureStateChangeObserver::OnGameFeatureUnregistering(const UGameFeatureData *,const FString &,const FString &)’: no override available for virtual member function from base ‘IGameFeatureStateChangeObserver’; function is hidden
1>C:\Program Files\Epic Games\UE_5.1\Engine\Plugins\Experimental\GameFeatures\Source\GameFeatures\Public\GameFeatureStateChangeObserver.h(41): note: see declaration of ‘IGameFeatureStateChangeObserver::OnGameFeatureUnregistering’
1>C:\Program Files\Epic Games\UE_5.1\Engine\Plugins\Experimental\GameFeatures\Source\GameFeatures\Public\GameFeatureStateChangeObserver.h(29): note: see declaration of ‘IGameFeatureStateChangeObserver’
1>[7/16] Compile Module.ShooterCoreRuntime.cpp
1>K:\Projects\UglyBros\LyraMergeVerse2 5.1\Plugins\GameFeatures\ShooterCore\Intermediate\Build\Win64\UnrealEditor\Inc\ShooterCoreRuntime\UHT\InputTriggerCombo.generated.h(13): fatal error C1189: #error: “InputTriggerCombo.generated.h already included, missing ‘#pragma once’ in InputTriggerCombo.h”
1>[8/16] Link UnrealEditor-ShooterCoreRuntime.lib cancelled
1>[9/16] Compile Module.LyraGame.11_of_13.cpp
1>K:\Projects\UglyBros\LyraMergeVerse2 5.1\Source\LyraGame\AbilitySystem\Abilities\LyraGameplayAbility.cpp(487): error C3867: ‘ULyraGameplayAbility::ChangeActivationGroup’: non-standard syntax; use ‘&’ to create a pointer to member
1>K:\Projects\UglyBros\LyraMergeVerse2 5.1\Source\LyraGame\AbilitySystem\Abilities\LyraGameplayAbility.cpp(487): error C3861: ‘ENSURE_ABILITY_IS_INSTANTIATED_OR_RETURN’: identifier not found
1>K:\Projects\UglyBros\LyraMergeVerse2 5.1\Source\LyraGame\AbilitySystem\Abilities\LyraGameplayAbility.cpp(510): error C3867: ‘ULyraGameplayAbility::SetCameraMode’: non-standard syntax; use ‘&’ to create a pointer to member
1>K:\Projects\UglyBros\LyraMergeVerse2 5.1\Source\LyraGame\AbilitySystem\Abilities\LyraGameplayAbility.cpp(510): error C2059: syntax error: ‘)’
1>K:\Projects\UglyBros\LyraMergeVerse2 5.1\Source\LyraGame\AbilitySystem\Abilities\LyraGameplayAbility.cpp(521): error C3867: ‘ULyraGameplayAbility::ClearCameraMode’: non-standard syntax; use ‘&’ to create a pointer to member
1>K:\Projects\UglyBros\LyraMergeVerse2 5.1\Source\LyraGame\AbilitySystem\Abilities\LyraGameplayAbility.cpp(521): error C2059: syntax error: ‘)’
1>K:\Projects\UglyBros\LyraMergeVerse2 5.1\Source\LyraGame\AbilitySystem\LyraAbilitySet.cpp(57): warning C4996: ‘UAbilitySystemComponent::GetSpawnedAttributes_Mutable’: This function will be made private. Use Add/Remove SpawnedAttributes instead Please update your code to the new API before upgrading to the next release, otherwise your project will no longer compile.
1>K:\Projects\UglyBros\LyraMergeVerse2 5.1\Source\LyraGame\AbilitySystem\LyraGameplayCueManager.cpp(400): warning C4996: ‘FAssetBundleData::AddBundleAssets’: The contents of an asset bundle now use FTopLevelAssetPath instead of FSoftObjectPath. Please update your code to the new API before upgrading to the next release, otherwise your project will no longer compile.
1>[10/16] Compile Module.LyraGame.12_of_13.cpp
1>K:\Projects\UglyBros\LyraMergeVerse2 5.1\Source\LyraGame\GameFeatures\GameFeatureAction_AddAbilities.cpp(237): warning C4996: ‘UAbilitySystemComponent::GetSpawnedAttributes_Mutable’: This function will be made private. Use Add/Remove SpawnedAttributes instead Please update your code to the new API before upgrading to the next release, otherwise your project will no longer compile.
1>K:\Projects\UglyBros\LyraMergeVerse2 5.1\Source\LyraGame\GameFeatures\GameFeatureAction_AddWidget.cpp(31): warning C4996: ‘FAssetBundleData::AddBundleAsset’: The contents of an asset bundle now use FTopLevelAssetPath instead of FSoftObjectPath. Please update your code to the new API before upgrading to the next release, otherwise your project will no longer compile.
1>K:\Projects\UglyBros\LyraMergeVerse2 5.1\Source\LyraGame\GameFeatures\LyraGameFeaturePolicy.h(34): error C3668: ‘ULyraGameFeaturePolicy::GetPreloadAssetListForGameFeature’: method with override specifier ‘override’ did not override any base class methods
1>K:\Projects\UglyBros\LyraMergeVerse2 5.1\Source\LyraGame\GameFeatures\LyraGameFeaturePolicy.h(34): warning C4263: ‘TArray<FPrimaryAssetId,FDefaultAllocator> ULyraGameFeaturePolicy::GetPreloadAssetListForGameFeature(const UGameFeatureData *) const’: member function does not override any base class virtual member function
1>K:\Projects\UglyBros\LyraMergeVerse2 5.1\Source\LyraGame\GameFeatures\LyraGameFeaturePolicy.h(43): warning C4264: ‘TArray<FPrimaryAssetId,FDefaultAllocator> UGameFeaturesProjectPolicies::GetPreloadAssetListForGameFeature(const UGameFeatureData *,bool) const’: no override available for virtual member function from base ‘UGameFeaturesProjectPolicies’; function is hidden
1>C:\Program Files\Epic Games\UE_5.1\Engine\Plugins\Experimental\GameFeatures\Source\GameFeatures\Public\GameFeaturesProjectPolicies.h(28): note: see declaration of ‘UGameFeaturesProjectPolicies::GetPreloadAssetListForGameFeature’
1>C:\Program Files\Epic Games\UE_5.1\Engine\Plugins\Experimental\GameFeatures\Source\GameFeatures\Public\GameFeaturesProjectPolicies.h(16): note: see declaration of ‘UGameFeaturesProjectPolicies’
1>K:\Projects\UglyBros\LyraMergeVerse2 5.1\Source\LyraGame\GameFeatures\LyraGameFeaturePolicy.h(54): error C3668: ‘ULyraGameFeature_HotfixManager::OnGameFeatureLoading’: method with override specifier ‘override’ did not override any base class methods
1>K:\Projects\UglyBros\LyraMergeVerse2 5.1\Source\LyraGame\GameFeatures\LyraGameFeaturePolicy.h(54): warning C4263: ‘void ULyraGameFeature_HotfixManager::OnGameFeatureLoading(const UGameFeatureData *)’: member function does not override any base class virtual member function
1>K:\Projects\UglyBros\LyraMergeVerse2 5.1\Source\LyraGame\GameFeatures\LyraGameFeaturePolicy.h(55): warning C4264: ‘void IGameFeatureStateChangeObserver::OnGameFeatureLoading(const UGameFeatureData *,const FString &)’: no override available for virtual member function from base ‘IGameFeatureStateChangeObserver’; function is hidden
1>C:\Program Files\Epic Games\UE_5.1\Engine\Plugins\Experimental\GameFeatures\Source\GameFeatures\Public\GameFeatureStateChangeObserver.h(43): note: see declaration of ‘IGameFeatureStateChangeObserver::OnGameFeatureLoading’
1>C:\Program Files\Epic Games\UE_5.1\Engine\Plugins\Experimental\GameFeatures\Source\GameFeatures\Public\GameFeatureStateChangeObserver.h(29): note: see declaration of ‘IGameFeatureStateChangeObserver’
1>K:\Projects\UglyBros\LyraMergeVerse2 5.1\Source\LyraGame\GameFeatures\LyraGameFeaturePolicy.h(64): error C3668: ‘ULyraGameFeature_AddGameplayCuePaths::OnGameFeatureRegistering’: method with override specifier ‘override’ did not override any base class methods
1>K:\Projects\UglyBros\LyraMergeVerse2 5.1\Source\LyraGame\GameFeatures\LyraGameFeaturePolicy.h(64): warning C4263: ‘void ULyraGameFeature_AddGameplayCuePaths::OnGameFeatureRegistering(const UGameFeatureData *,const FString &)’: member function does not override any base class virtual member function
1>K:\Projects\UglyBros\LyraMergeVerse2 5.1\Source\LyraGame\GameFeatures\LyraGameFeaturePolicy.h(66): warning C4264: ‘void IGameFeatureStateChangeObserver::OnGameFeatureRegistering(const UGameFeatureData *,const FString &,const FString &)’: no override available for virtual member function from base ‘IGameFeatureStateChangeObserver’; function is hidden
1>C:\Program Files\Epic Games\UE_5.1\Engine\Plugins\Experimental\GameFeatures\Source\GameFeatures\Public\GameFeatureStateChangeObserver.h(39): note: see declaration of ‘IGameFeatureStateChangeObserver::OnGameFeatureRegistering’
1>C:\Program Files\Epic Games\UE_5.1\Engine\Plugins\Experimental\GameFeatures\Source\GameFeatures\Public\GameFeatureStateChangeObserver.h(29): note: see declaration of ‘IGameFeatureStateChangeObserver’
1>K:\Projects\UglyBros\LyraMergeVerse2 5.1\Source\LyraGame\GameFeatures\LyraGameFeaturePolicy.h(65): error C3668: ‘ULyraGameFeature_AddGameplayCuePaths::OnGameFeatureUnregistering’: method with override specifier ‘override’ did not override any base class methods
1>K:\Projects\UglyBros\LyraMergeVerse2 5.1\Source\LyraGame\GameFeatures\LyraGameFeaturePolicy.h(65): warning C4263: ‘void ULyraGameFeature_AddGameplayCuePaths::OnGameFeatureUnregistering(const UGameFeatureData *,const FString &)’: member function does not override any base class virtual member function
1>K:\Projects\UglyBros\LyraMergeVerse2 5.1\Source\LyraGame\GameFeatures\LyraGameFeaturePolicy.h(66): warning C4264: ‘void IGameFeatureStateChangeObserver::OnGameFeatureUnregistering(const UGameFeatureData *,const FString &,const FString &)’: no override available for virtual member function from base ‘IGameFeatureStateChangeObserver’; function is hidden
1>C:\Program Files\Epic Games\UE_5.1\Engine\Plugins\Experimental\GameFeatures\Source\GameFeatures\Public\GameFeatureStateChangeObserver.h(41): note: see declaration of ‘IGameFeatureStateChangeObserver::OnGameFeatureUnregistering’
1>C:\Program Files\Epic Games\UE_5.1\Engine\Plugins\Experimental\GameFeatures\Source\GameFeatures\Public\GameFeatureStateChangeObserver.h(29): note: see declaration of ‘IGameFeatureStateChangeObserver’
1>K:\Projects\UglyBros\LyraMergeVerse2 5.1\Source\LyraGame\GameModes\LyraExperienceManagerComponent.cpp(221): warning C4996: ‘UGameFeaturesSubsystem::GetPluginURLForBuiltInPluginByName’: Use GetPluginURLByName instead Please update your code to the new API before upgrading to the next release, otherwise your project will no longer compile.
1>K:\Projects\UglyBros\LyraMergeVerse2 5.1\Source\LyraGame\Hotfix\LyraHotfixManager.cpp(104): warning C4996: ‘FConfigFile::CombineFromBuffer’: Use CombineFromBuffer that takes FileHint Please update your code to the new API before upgrading to the next release, otherwise your project will no longer compile.
1>K:\Projects\UglyBros\LyraMergeVerse2 5.1\Source\LyraGame\Interaction\Abilities\LyraGameplayAbility_Interact.cpp(103): error C2440: ‘const_cast’: cannot convert from ‘TObjectPtr’ to ‘AActor *’
1> with
1> [
1> T=AActor
1> ]
1>K:\Projects\UglyBros\LyraMergeVerse2 5.1\Source\LyraGame\Interaction\Abilities\LyraGameplayAbility_Interact.cpp(103): note: Conversion requires a constructor or user-defined-conversion operator, which can’t be used by const_cast or reinterpret_cast
1>K:\Projects\UglyBros\LyraMergeVerse2 5.1\Source\LyraGame\Interaction\Tasks\AbilityTask_WaitForInteractableTargets.cpp(134): error C2679: binary ‘=’: no operator found which takes a right-hand operand of type ‘TWeakObjectPtr<UAbilitySystemComponent,FWeakObjectPtr>’ (or there is no acceptable conversion)
1>C:\Program Files\Epic Games\UE_5.1\Engine\Source\Runtime\CoreUObject\Public\UObject\ObjectPtr.h(340): note: could be ‘TObjectPtr &TObjectPtr::operator =(TPrivateObjectPtr &&)’
1> with
1> [
1> T=UAbilitySystemComponent
1> ]
1>C:\Program Files\Epic Games\UE_5.1\Engine\Source\Runtime\CoreUObject\Public\UObject\ObjectPtr.h(311): note: or ‘TObjectPtr &TObjectPtr::operator =(TYPE_OF_NULLPTR)’
1>C:\Program Files\Epic Games\UE_5.1\Engine\Source\Runtime\CoreUObject\Public\UObject\ObjectPtr.h(309): note: or ‘TObjectPtr &TObjectPtr::operator =(const TObjectPtr &)’
1>C:\Program Files\Epic Games\UE_5.1\Engine\Source\Runtime\CoreUObject\Public\UObject\ObjectPtr.h(308): note: or ‘TObjectPtr &TObjectPtr::operator =(TObjectPtr &&)’
1>K:\Projects\UglyBros\LyraMergeVerse2 5.1\Source\LyraGame\Interaction\Tasks\AbilityTask_WaitForInteractableTargets.cpp(134): note: while trying to match the argument list ‘(TObjectPtr, TWeakObjectPtr<UAbilitySystemComponent,FWeakObjectPtr>)’
1>[11/16] Link UnrealEditor-LyraGame.lib cancelled
1>[12/16] Link UnrealEditor-LyraGame.dll cancelled
1>[13/16] Link UnrealEditor-LyraEditor.dll cancelled
1>[14/16] Link UnrealEditor-ShooterCoreRuntime.dll cancelled
1>[15/16] Link UnrealEditor-TopDownArenaRuntime.dll cancelled
1>[16/16] WriteMetadata LyraEditor.target cancelled
1>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.1\Engine\Build\BatchFiles\Build.bat” LyraEditor Win64 Development -Project=“K:\Projects\UglyBros\LyraMergeVerse2 5.1\LyraMergeVerse2.uproject” -WaitMutex -FromMsBuild” exited with code 6.
1>Done building project “LyraMergeVerse2.vcxproj” – FAILED.
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
========== Build started at 10:01 PM and took 50.075 seconds ==========

This is part of c++ API changes and it’s not straight forward. You have to fix one by one. Sometimes, you have to add a declaration “include …” at the top of a object, or “#pragma once”, also change the reference of pointers (FWeakObjectPtr).

There is an official release notes that how to reference properly in 5.1 (Upgrading the Lyra Starter Game to the Latest Engine Release in Unreal Engine | Unreal Engine 5.1 Documentation)

Another way to help with your fixes is creating as Lyra Project 5.1 and comparing object by object and see how the lines were changed.

Also, check the Lyra Discord Channel (Lyra Dev Net), If I’m not wrong, there’s a post with detailed instructions. Hope that helps.

1 Like

Sounds like a sensible approach! Gonna try it out. Thank you so much!

1 Like

I get a successful build now, but editor crashes when I try to open the project:

Fatal error: [File:D:\build++UE5\Sync\Engine\Source\Runtime\DeveloperSettings\Private\Engine\DeveloperSettings.cpp] [Line: 132] LyraDeveloperSettings failed to find console variable LyraPC.ShouldAlwaysPlayForceFeedback for bShouldAlwaysPlayForceFeedback

UnrealEditor_DeveloperSettings
UnrealEditor_CoreUObject
UnrealEditor_CoreUObject
UnrealEditor_CoreUObject
UnrealEditor_CoreUObject
UnrealEditor_CoreUObject
UnrealEditor_CoreUObject
UnrealEditor_Core
UnrealEditor_Core
UnrealEditor_Projects
UnrealEditor_Projects
UnrealEditor
UnrealEditor
UnrealEditor
UnrealEditor
UnrealEditor
UnrealEditor
UnrealEditor
kernel32
ntdll

This one is related to the Engine API. You’ve narrowed down to three objects:
DeveloperSettings.cpp (Engine)
LyraDeveloperSettings.h (Lyra)
LyraDeveloperSettings.cpp (Lyra)

If you compare two Lyra projects, 5 and 5.1, go to LyraDeveloperSettings.cpp and check how that console variable is now referenced in 5.1. More Likely, you’ll probably need to add:

#include UE_INLINE_GENERATED_CPP_BY_NAME(LyraDeveloperSettings)” at the top of LyraDeveloperSettings.cpp. Should be like this in 5.1:

#include “LyraDeveloperSettings.h”
#include “Misc/App.h”
#include “Widgets/Notifications/SNotificationList.h”
#include “Framework/Notifications/NotificationManager.h”

#include UE_INLINE_GENERATED_CPP_BY_NAME(LyraDeveloperSettings)

In addition, that console variable has been changed and you want to find the correct reference. Check if that var is an input in your project settings (compare 5 and 5.1).

1 Like

Well I copied all the scripts from created LyraGame project with 5.1 and I broke it. So started with a new project and I minimize the errors to this:


Thanks again!

Have you copied and pasted the line 36? It can cause problems if one of the variables have definition in the correspondent cpp file. Looks like you are missing the definition of “GetPreloadAssetListForGameFeature” because it is marked in red. Right click on it, select peek definition to see if it still exists and is incomplete:

Should look like this in the LyraGameFeaturePolicy.cpp:

If no existent, right click, select “Quick Actions and refactorings…”,


then select create definition to open a blank definition template in the cpp file. So add the following line:

return Super::GetPreloadAssetListForGameFeature(GameFeatureToLoad);

Hope that helps.

1 Like

Yes I added it from lyra 5.1 project. And seems I got the definition but it’s marked red too.

This is a correct VS procedure:
delete GetPreloadAssetListForGameFeature and type in “getpreload”, a list of existing references should appear, then select the correct one.

1 Like

No red marks now but I get a new error. I’m not sure if it’s related to the same line.

Typically, unresolved external symbol means you’re missing the link of additional library dependencies (paths). First place to check is looking at LyraGame.Build.cs and compare both versions. I’ll see if I can find something helpful.

1 Like

Verifying UE 5.1 engine files fixed the issue for me. Thanks for sparing time, much appreciated.

1 Like