I am trying to reference an IronPython project in a C# Project. They are both in the same solution. I am new to IronPython, so I was just wondering how the referencing works. Does an IronPython generate an assembly at all? All Im trying to do is a pull a simple class into the C# project.
any ideas?
Thanks.
Edit: I'm not getting any error, I just cannot figure out how to reference the Ironpython project.
If you are using IronPython Tools for Visual Studio then an IronPython project will not be compiled. To compile IronPython code to a .NET assembly you can use the IronPython command line compiler pyc or SharpDevelop.
A compiled IronPython assembly cannot be used from a C# application directly without the application hosting the IronPython runtime. When the C# application hosts the IronPython runtime you can then either use the IronPython script files (.py) or the compiled IronPython assembly, as explained in the two articles below, both of which use IronPython 2.6.
The first article shows an example where the IronPython code mixed in with the C# code. You can alternatively load the IronPython code from files by replacing the call to CreateScriptSourceFromString with CreateScriptSourceFromFile or by using the .NET Framework.