Native AOT + unmanaged static lib interop: DLL required while development phase? #113291
-
In my final deployment, I want to link against an unmanaged static lib as written in the Native code interop article. As far as I understand, static lib linking is not possible while being in "development phase", as it's a feature of the "publish" self-contained executable step. I want to normally debug my application while developing it.
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
I have a sample that illustrates a way to build an application that can both work with dynamic libraries when running on CoreCLR and static libraries when publishing with NativeAOT: https://github.com/AustinWise/DotNetHostingAndNativeAot Note that the way this project is set up, every possible build configuration is supported. You can build for CoreCLR for release and debug. You can publish for NativeAOT for release and debug. The key point is when compiling for CoreCLR, the shared libraries is copied to the output directory with a |
Beta Was this translation helpful? Give feedback.
ilc.exe
itself (the NativeAOT compiler) is developed this way in this repo.I…