ironpython intellisense

Nov 17, 2011 at 12:28 AM

1. I create C# project based on class library and I name test.
2. Test project has Math class that contains add and substract functions.
3. When I build test project, it will produce test.dll.

I use VS2010 as IronPython IDE. In ironpython script:

clr.AddReferenceToFile("test.dll")
from MathNameSpace import *
mymath = Math()
x = mymath.add(1,2)

When I write mymath., the intellisense of Math class does not show up. How to enable test.dll intellisense?

 

Nov 17, 2011 at 5:28 AM

I would also really like to know this. So far I can't get it to work.

Adding the path to my sys.path, adding the project in question to my python project's search path and references didn't work either. I'm really unsure what to do.

Coordinator
Nov 17, 2011 at 5:54 AM

In general for this to work today (in 1.0) you'll need to have the path to test.dll in the search paths for your project when we first load the project.  The path needs to be where the actual dll exists, not just the project path. 

There's still a number of issues and I'm looking at improving the experience for 1.1.  In 1.0 even if we load your DLL and provide intellisense we'll lock the assembly on disk.  If you were to move the DLL and replaced it we still wouldn't reload it and would only provide intellisense based upon the initial version.  And we have no integration of project references to C# or VB projects.

Are you using a solution that includes both C#/VB and Python projects?  I'm currently planning on making references work between those as well for 1.1 - but you may need to build before references are resolved.  Or is there something else I should know about this scenario that you'd like to see work?

Nov 17, 2011 at 7:11 AM

sorry, I did forget to mention that both the path to the dll the project outputs and the project itself were added to the search path, and yes both projects (the python and C# ones) are in the same solution. I would eventually like people to make projects outside of this solution and still get intellisense if possible, but I'm focusing on ME getting intellisense first :)

Nov 17, 2011 at 5:16 PM

Hi dinov,

You said: In general for this to work today (in 1.0) you'll need to have the path to test.dll in the search paths for your project when we first load the project. The path needs to be where the actual dll exists, not just the project path.
Me: I create 2 projects test1 and test2 in C# VS2008. I include test2 project on ironpython solution. Then I add test1.dll and test2.dll into Search Path. Both of them fail to show the intellisense. Any work around provided?

Are you using a solution that includes both C#/VB and Python projects? My solution only have ironpython project.