Build error that occurs only when submitting to the Marketplace in UE5.2

With the release of UE5.2, I am working on UE5.2 compatibility for plugins that I have listed on the marketplace, but some plugins are causing errors when building on the marketplace side for UE5.2 only. In my environment it builds fine.

I submitted this plugin to the marketplace and the following error seems to be occurring during the build process on the marketplace side.

d:\build\U5M-Marketplace\Sync\LocalBuilds\PluginTemp\HostProject\Plugins\GraphPrinter\Intermediate\Build\Win64\UnrealEditor\Inc\GenericGraphPrinter\UHT\GenericGraphPrinterSettings.gen.cpp(8): fatal error C1083: Cannot open include file: '../../../../../../../../build/U5M-Marketplace/Sync/LocalBuilds/PluginTemp/HostProject/Plugins/GraphPrinter/Source/GenericGraphPrinter/Public/GenericGraphPrinter/Utilities/GenericGraphPrinterSettings.h': No such file or directory

d:\build\U5M-Marketplace\Sync\LocalBuilds\PluginTemp\HostProject\Plugins\GraphPrinter\Intermediate\Build\Win64\UnrealEditor\Inc\DetailsPanelPrinter\UHT\RestoreDetailsPanelOptions.gen.cpp(8): fatal error C1083: Cannot open include file: '../../../../../../../../build/U5M-Marketplace/Sync/LocalBuilds/PluginTemp/HostProject/Plugins/GraphPrinter/Source/DetailsPanelPrinter/Public/DetailsPanelPrinter/Types/RestoreDetailsPanelOptions.h': No such file or directory

I thought it might be due to the length of the directory path, as the include path in the generated source file is incorrect, but it built correctly in UE 5.1 and earlier.
I contacted the marketplace and they was told that there is a deficiency in the PublicDependencyModuleNames in build.cs.

I have tried changing all the PrivateDependencyModuleNames to PublicDependencyModuleNames, but I can’t figure out the cause and the error only occurs on the marketplace side of the build, so I am having trouble solving it.

If anyone has run into the same case or knows of a solution, I would appreciate your help in resolving this issue.

Similar to what happened to me.

I did the same as before 5.1, but then I got an error message that the header file is No such file or directory.
Probably the problem was that the path was long, and it was solved by specifying the folder one level above as the package destination.

Here’s a note on my site for reference.

I also suspected a problem with the length of the file path, so I moved all the files to the top level and submitted it, and the review passed, so I believe the above error is caused by the length of the file path.
However, I was curious about the fact that the error did not occur for paths of the same length prior to UE5.1 and that the length of the path did not exceed 260 characters, which would cause an error with UHT, so I examined the UHT internals.
First, the UHT was built in C++ until UE5.1, and has been replaced by a reworked C# version since UE5.2. (UE5.2 Release Note - Developer Tools)
I checked by logging header information using InitHeaderInfo defined in UhtCodeGenerator.cs of UHT, and found that in the problematic module, the include base file path (usually the plugin source folder) was changed to a different path.
From the contents of the replaced path, I found that it was the first value added to PublicIncludePaths in Build.cs.
The real cause of this problem was that when we used PublicIncludePaths in Build.cs, the base file path of the include inside UHT was replaced.
By the way, there was no problem using PrivateIncludePaths.
The solution was to either avoid using PublicIncludePaths in Build.cs or add Path.Combine(ModuleDirecotory, "..") to the beginning of PublicIncludePaths.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.