AaronRobinsonMSFT / DNNE

Prototype native exports for a .NET Assembly.
MIT License
394 stars 41 forks source link

DNNE without Windows SDK and C++ #187

Closed ghost closed 8 months ago

ghost commented 8 months ago

DNNE uses the Windows SDK, C++ and needs more than 10 seconds for a small project.

The WixTools.Dft.CustomAction is able to generate a DLL with native exported functions without the Windows SDK, C++ and it's much faster.

But it supports .Net Framework 4.7.2 only.

Unfortunately, I can't find the source code of it, but maybe I'm too stupid for this only.

... maybe that project can inspire you for a DNNE solution without the C++ and the Windows SDK too?

AaronRobinsonMSFT commented 8 months ago

DNNE uses the Windows SDK, C++ and needs more than 10 seconds for a small project.

That seems long. I am able to build locally in under 2 seconds. Can you share an example?

But it supports .Net Framework 4.7.2 only.

True. .NET Framework uses a built-in mechanism that doesn't exist in .NET Core. The Windows OS has special handling and .NET Framework installs assets into a global directory (that is, \Windows\System32). .NET Core has neither of those affordances and is unable to avoid a dependency on a C toolchain. Similar to Native AOT.

ghost commented 8 months ago

I've uploaded my small project here.

I'm sorry to bother you with my notes about the other project.