Closed brettfo closed 1 year ago
Hi @brettfo, thank you for your contribution!
We have just one question about the changes in the pipeline configuration. You added the .NET 7 SDK alongside the .NET 6 SDK to the build machine setup. Would the build machine not always use the newer SDK to build the project and make the lesser version obsolete in this scenario?
Good catch! I uninstalled my .NET 6 SDK, did a full clean, and was able to build and pack the extension and both the net6.0
and net7.0
libraries were appropriately created. I'll fix the pipeline configurations to only install .NET 7.
I was also able to test win-arm64
. I've modified the original comment to reflect this.
The method
Marshal.GetHINSTANCE()
is not supported in AOT scenarios, but the methodNativeLibrary.GetMainProgramHandle()
was added in .NET 7 and allows for this to work.Since there's not a corresponding API to make this work in .NET 6, I multi-targeted the project so existing scenarios for .NET 6 users will still work.
Verified that .NET 7 AOT works on
win-x64
,win-arm64
, andlinux-x64
; I don't have the hardware to check anything else.