You must import a DLL library written for the .Net Core platform to use its classes and methods in Python code. How can this be done and is it possible at all? Only interested in CPython

  • I did this only for c ++ code: github.com/gil9red/SimplePyScripts/tree/master/using_custom_dll Just the simplest example - a few methods in the dll - gil9red
  • one
    Hardly anything will come out without IronPython. For native C ++ everything is much simpler: for C compatible functions there are ctypes, and for C ++ 11 there is pybind11. About .NET if only the CLR hands up ... - Vasily Ryabov

1 answer 1

Unfortunately this is not possible. dll .Net Core files are assemblies (Assembly), and not dynamic link libraries. Since the build contains an IL for the CLR virtual machine and not native code, it cannot be connected to a Python program.