<atlbase.h> Causes packaging to fail

I don’t understand what the issue is.
I am using UE5.2.
Windows 10
VS 2022 Community Edition.
BluePrint project and C++ plugin.
One of the C++ files in project uses <atlbase.h> header file.
In project settings, All Configurations, I added the path to the <atlbase.h> file.
But there is some strange quirk. I think it is related to the auto generated file.
I think this messes up the build system in some way.
include “myfile.generated.h”

In visual studio I have to build (not re-build) a project twice.

  1. first build it complains it can’t find atlbase.h file even though the path is added to list of include directories.
  2. 2nd build it will build and finish building ok. (why, who knows)

If I click RUN, it will launch UE5.2, and the uproject gets loaded up…etc…etc…
So I can run it in UE editor. But if I try to package project, it will do the 1st build and complain about the “missing” atlbase.h file . But, I am assuming that every time I click “package project” it does a full rebuild, because if I try to package it again, it still complains about missing atlbase.h file. (again, ALL configurations have the path added to include directories)

Here is test project with the packaging issue.

TestProject.zip (10.8 MB)

Is there a way to package project without re-building the dll of the C++ plugin?
Just include the already built dll as a project dependency? (with no need to build it)

Hi. Did you find any solution? I’m having the same problem… bruh