1

How do I make a DLL (.NET) written in python code (IronPython)?

Shimmy Weitzhandler
  • 101,809
  • 122
  • 424
  • 632

3 Answers3

3

You cannot create a standard .NET .dll from IronPython code (.dll that can be used directly from C# or VB).

pyc.py produces .dll that can be used only by IronPython - check such .dll with Reflector and you will understand why.

Lukas Cenovsky
  • 5,476
  • 2
  • 31
  • 39
1

You can probably use ironpycompiler, using examples in http://pythonhosted.org//ironpycompiler/html-en/command-line.html. It requires installations of both IronPython and of CPython (the regular Python).

Helge
  • 145
  • 9
  • From the documentation: IronPyCompiler is a library for compiling IronPython scripts requiring modules from the Python standard library (or third-party pure-Python modules) into a stand-alone .NET assembly (a DLL file or an executable), using pyc.py. – Helge Mar 02 '15 at 09:54
0

You can use the script at C:\Program Files\[IronPython Program Directory]\Tools\Scripts.

jcao219
  • 2,808
  • 3
  • 21
  • 22