Description

The extension methods seem to be getting compiled into multiple rules dlls

 

Example .Build.cs

 

// In TestPlugin.Build.cs

using System;
using UnrealBuildTool;

public class TestPlugin : ModuleRules
{
    public TestPlugin(ReadOnlyTargetRules Target) : base(Target)
    {
        PCHUsage = ModuleRules.PCHUsageMode.UseExplicitOrSharedPCHs;
         
        this.PrintExternal();
    }
}

public static class TestExternalClass
{
    public static void PrintExternal(this ModuleRules Rule)
    {
        Console.WriteLine($"Called from TestExternalClass: {Rule.EngineDirectory}");
    }
} 

 

 

Have Comments or More Details?

There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-188980 in the post.

0
Login to Vote

Won't Fix
ComponentUE - Foundation - Cpp Tools - UnrealBuildTool
Affects Versions5.2
Target Fix5.4
CreatedJun 16, 2023
ResolvedJan 25, 2024
UpdatedFeb 25, 2024