I was running into a number of problems compiling UE 5.4.4 Lyra project to Client and Server builds, both in Visual Studio 2022 and in UE 5.4 Editor. I tried the various recommendations (see title for other title phrases), but without any real progress.
I finally ended up solving the problem. But first a bit about what may have been the problem.
I had a fresh install of Windows 10 22H2. I then added ReviOS/AtlasOS to clean things up. I added Visual Studio 2022 and the latest UE 5.6 source code from github. I was able to successfully compile UE 5.6. This went to something like: C:\UnrealEngine.
When I started adding plugins from MarketPlace/Fab, all of them were for different versions of Unreal Engine (5.4, 5.3, 5.1, 4.27, etc). And so, I then installed the other binary versions of each of these UE builds from Epic Games Launcher. I believe these went to folders like: C:\UnrealEngine\UE_5.4. And whereas UE 5.6 was in the parent folder.
I then added projects from MarketPlace/Fab which also were for a number of different versions of the UE engines. These went to a top level folder like: C:\UE_Games.
A week prior, I was able to successfully use VS 2022 to compile Lyra and City Sample to one of the stand alone builds. The resulting .exe’s worked as expected.
When all of this was done, I then wanted to compile the Client and Server versions of Lyra and City Sample. This is where the problems started showing up. Unfortunately, I don’t have all of the error messages. But there were a number of them. The error messages eventually whittled down to things like: SDK not installed properly, Can’t package, Unable to Generate, exit code 6.
The advice from other Forum threads did not really solve the problem. But a few helped make some progress.
What finally ended up solving the problem was the following:
Starting with a clean O/S build of Windows 10 22H2 and with AtlasOS/ReviOS installed with pretty much maximum reduction applied to Windows. And a clean full install of Visual Studio 2022. And a clean install of Lyra under the C:\UnrealEngine\UE_5.4\Lyra folder. With UE 5.4 installed and built from source in: C:\UnrealEngine\UE_5.4.
Also after having run C:\UnrealEngine\UE_5.4 Setup.bat and GenerateProjectFiles.bat. And after having right clicked on Lyra.uproject and clicking on menu item Generate Visual Studio project files. Also, the option to select which version of the engine was offered, UE 5.4 in this case.
I then opened Lyra.sln in Visual Studio 2022. And ignored/closed the error message about NuGet vulnerabilities.
Then right clicked on the Solution ‘Lyra’ (53 of 53 projects) item in the Solution Explorer tree in Visual Studio. And then selected Build Solution.
This sequence avoided all of the prior error messages that I was running into when multiple copies of the Unreal Engine were installed on the same machine. And where numerous plugins and projects targeted at different versions of the Engine where also installed. And where at least one of the two or more source builds was at a folder level above the other binary and source build folders. Etc.
Lyra is presently building, past the point of the earlier errors and appears likely that it will complete; appearing similar to the UE 5.4, 5.5 and 5.6 source code builds from github that successfully built.
The error messages, may have had to do with the directory storage locations. Or may have been due to having multiple copies of the Engine installed, and one improperly referencing another. And/or possibly also related to plugins and projects.
Not exactly sure what the specific problem(s) were. But following the above process seems to have solved the earlier error build messages.