Error code 39 on install of the driver build with VS2022 + WDK targeting Windows 10 and higher

Anyone has any idea how to approach the following error Windows cannot load the device driver for this hardware. The driver may be corrupted or missing. (Code 39)

{Driver Entry Point Not Found}
The %hs device driver could not locate the entry point %hs in driver %hs.

Does that happen when you load the driver you have built? Try to see if the entrypoint is set in executable file via Detect It Easy or IDA Pro

Error 39 is often a signature failure. Is your driver signed? Is this a driver you built, or one you downloaded?

The image is linked to functions that are not exported by the kernel. Use dumpbin.exe /imports <PathToDriver.sys> and triage the APIs.

If you can find depends.exe somewhere, that will give the answer rather quickly.

I would double check what your target KMDF version is set to. I had it set too new once and my driver loaded fine on Windows 11 but then when I tried to use it on Windows 10 I got the error about a missing entry point.