Horde does not compile on ue5-main

The ue5-main source tree is broken for Horde.

[Attachment Removed]

Steps to Reproduce

The Horde does not compile anymore without modifications.

Are you planning on releasing the related improved build health monitoring source code?

See post at [Horde] Could you revert partially CL 46294798, it added Epic internals to project files

Related pull request at https://github.com/EpicGames/UnrealEngine/pull/13946

Running: XXXepic_ue5_main\Sync\Engine\Binaries\ThirdParty\DotNet\8.0.412\win-x64\dotnet.exe restore -p:UE_DOTNET_VERSION=net8.0 /p:Version=5.8.0.0 /p:InformationalVersion=5.8.0-1144853
XXX\epic_ue5_main\Sync\Engine\Binaries\ThirdParty\DotNet\8.0.412\win-x64\sdk\8.0.412\NuGet.targets(465,5): error MSB3202: The project file "XXX\epic_ue5_main\Sync\Engine\Restricted\NotForLicensees\Source\Programs\Horde\EpicPlugins\BuildHealth\HordeServer.Epic.BuildHealth\HordeServer.Epic.BuildHealth.csproj" was not found. [XXX\epic_ue5_main\Sync\Engine\Source\Programs\Horde\Horde.sln]
XXX\epic_ue5_main\Sync\Engine\Binaries\ThirdParty\DotNet\8.0.412\win-x64\sdk\8.0.412\NuGet.targets(465,5): error MSB3202: The project file "XXX\epic_ue5_main\Sync\Engine\Restricted\NotForLicensees\Source\Programs\Horde\EpicPlugins\BuildHealth\HordeServer.Epic.BuildHealth.Tests\HordeServer.Epic.BuildHealth.Tests.csproj" was not found. [XXX\epic_ue5_main\Sync\Engine\Source\Programs\Horde\Horde.sln]
Took 1.36s to run dotnet.exe, ExitCode=1



[Attachment Removed]

Hi there,

We will fix this internally. Thanks for bringing this to our attention.

Edit: I think this may be more problematic than I first understood. Prioritizing this fix now.

Julian

[Attachment Removed]

Hey there.

Would it be possible to get some more details on exactly how you’re hitting this issue (exactly what you’re building (Solution, specific project) & Visual Studio version). I just want to make sure we are regressing all of these for our solution.

Kind regards,

Julian

[Attachment Removed]

Hey Julian,

If I open Engine/Source/Programs/Horde/Horde.sln it has the lines which are including those other projects which are placed under Engine\Restricted\NotForLicensees which are not available for the public.

The information from the used compiler

Found VisualStudio2022 installation: C:\Program Files\Microsoft Visual Studio\2022\Professional (Product=Microsoft.VisualStudio.Product.Professional, Version=17.14.36623.8)
Found VisualStudioUnsupported installation: C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional (Product=Microsoft.VisualStudio.Product.Professional, Version=16.11.36602.28)
Found VisualStudio2022 installation: C:\VS\2022\BuildTools (Product=Microsoft.VisualStudio.Product.BuildTools, Version=17.14.36623.8)
Found VisualStudio2022 installation: C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools (Product=Microsoft.VisualStudio.Product.BuildTools, Version=17.14.36623.8)
Using C:\Program Files\Microsoft Visual Studio\2022\Professional\MSBuild\Current\Bin\MSBuild.exe
CompilationEvironment.HasCapabilityToCompile=True
CompilationEvironment.FrameworkMsbuildExe=C:\Program Files\Microsoft Visual Studio\2022\Professional\MSBuild\Current\Bin\MSBuild.exe
CompilationEvironment.DotnetMsbuildExe=XXX\epic_ue5_main\Sync\Engine\Binaries\ThirdParty\DotNet\8.0.412\win-x64\dotnet.exe

Prior to the change which was introduced on your change, everything was working:

Horde: Adding symbolic link support to vite configuration
 
[CL 46294798 by josh engebretson in ue5-main branch]

It really looks to my eyes that this change to the sln file was an accident, as those changes which were done in that file, does not seem to be part of the vite configuration at all.

Kind regards,

Juhapekka

[Attachment Removed]

Hey there,

Can you try this locally?

Horde.Server.csproj:

<Choose>
      <When Condition="Exists('..\..\..\..\Restricted\NotForLicensees\Source\Programs\Horde\EpicPlugins\BuildHealth\HordeServer.Epic.BuildHealth\HordeServer.Epic.BuildHealth.csproj')">
         <ItemGroup>
            <ProjectReference Include="..\..\..\..\Restricted\NotForLicensees\Source\Programs\Horde\EpicPlugins\BuildHealth\HordeServer.Epic.BuildHealth\HordeServer.Epic.BuildHealth.csproj" />
         </ItemGroup>
      </When>
   </Choose>

to

<ItemGroup Condition="Exists('$(MSBuildThisFileDirectory)..\..\..\..\Restricted\NotForLicensees\Source\Programs\Horde\EpicPlugins\BuildHealth\HordeServer.Epic.BuildHealth\HordeServer.Epic.BuildHealth.csproj')">I have sync’d a local workspace internally without the included NotForLicense (and without the suggested fix) - and it still compiles just fine. So there may be something we are missing re: other setups…

Can you confirm your visual studio version as well?

Kind regards,

Julian

[Attachment Removed]

Just commenting that this change was indeed intended, though could not submit these changes with the internal CL, sorry for the confusion there. We don’t generate the Horde solution, so need to put these project conditionals in which are consistent with similar checks in UBT csproj for example.

I would be curious if Julian’s suggestion helps matters, as that would be a more concrete relative path, also the version of Visual Studio could be interesting, thanks

[Attachment Removed]

Thank you for your help and your answers.

The solution for this was to ignore Horde.sln file totally from dotnet restore and use csproj files as arguments to dotnet restore.

Example:

<DotNet DotNetPath="$(DotNetPath)" BaseDir="$(RootDir)/Engine/Source/Programs/Horde" Arguments="restore $(DotNetArgs) HordeServer/HordeServer.csproj" />
 
<DotNet DotNetPath="$(DotNetPath)" BaseDir="$(RootDir)/Engine/Source/Programs/Horde" Arguments="restore $(DotNetArgs) HordeAgent/HordeAgent.csproj" />
 
<DotNet DotNetPath="$(DotNetPath)" BaseDir="$(RootDir)/Engine/Source/Programs/Horde" Arguments="restore $(DotNetArgs) Drivers/JobDriver/JobDriver.csproj" />

[Attachment Removed]

Thanks, this is pretty strange as the improved solution guards should be working, and unfortunately have been unable to reproduce this locally. I’ll mark the workaround as best for anyone else having a similar issue, cheers.

[Attachment Removed]

The problem is that “dotnet restore” does not work because of the changes on the Horde.sln file itself.

Tried these above, but it does not fix the issue with Horde.sln file.

[Attachment Removed]

Used this one:

Engine\Binaries\ThirdParty\DotNet\8.0.412\win-x64\dotnet.exe restore

Executed in path:

Engine/Source/Programs/Horde/

Visual Studio 2022 v17.14.19

Using C:\Program Files\Microsoft Visual Studio\2022\Professional\MSBuild\Current\Bin\MSBuild.exe

[Attachment Removed]