views:

39

answers:

1

I would like to build a code library in IronPython and have another C# project reference it. Can I do this? How?

Is this just as simple as building the project and referencing the dll? Is there any conflict with the dynamic aspect of it?

+1  A: 

There is currently no way to build CLS-compliant assemblies from IronPython. The pyc tool will generate a DLL from Python code, but it's really only useful from IronPython.

If you want to use IronPython from a C# app, you'll have to use the hosting interfaces (gory details). You could also check out IronPython in Action, which describes the hosting process quite well.

Jeff Hardy
So in iron-python you can add a reference to an assembly and call a method or use a class no problem. You really can't do it the other way a around? :(
Ryan Montgomery
Unfortunately, no. That's a big reason why C# 4 is getting the dynamic keyword; it will make these scenarios much easier.
Jeff Hardy