[Ironpython-users] struggling with Intellisense and GAC

Andrew Graham andy at agraham.demon.co.uk
Thu Jul 9 20:01:34 CEST 2015

Is it Intellisense in  Python Tools for Visual Studio you are referring to?

If so my experience is that to obtain Intellisense you don’t need your DLLs in the GAC.

To see my custom DLL in my project I do four things.

1) Add the DLL or EXE Assemblies to References in your IronPython project (I’m not sure if this is essential)

2) Add the folder where the Assemblies are located to Search Paths in your IronPython project. This does seem to be essential.

3) Add “clr.AddReference(MyDllName”) to your code where the DLL path is in sys.path

4)Add “import ANamespaceInMyDll” or “from ANamespaceInMyDll import *” or similar.

Note that the C# namespace containing the Class definitions maps to an IronPython module.
You should now get Intellisense for each class in the imported Namespaces

Andy Graham

From: George Nychis 
Sent: Wednesday, July 08, 2015 4:33 PM
To: ironpython-users at python.org 
Subject: [Ironpython-users] struggling with Intellisense and GAC

I am struggling to get Intellisense working with some DLLs that I have built.  I do not want the C# code to be included directly in the project, I only want the functionality to be accessible through a pre-built DLL. 

First, I am able to run my IronPython code successfully linking to the DLLs by adding where they exist to my search path and then using clr.AddReference()

However, using that method I cannot get Intellisense to work.  So then I did some searching and found multiple discussions around the DLLs needing to be in the GAC for them to be accessible by Intellisense.

Therefore I signed my DLLs (making them strong typed) and added them to the GAC using gacutil.exe.  I can verify this by listing the installed modules:

$ gacutil.exe -l | grep Utils
  Utils, Version=, Culture=neutral, PublicKeyToken=6c2b3719154e5544, processorArchitecture=AMD64

Despite doing that, it is not accessible by the GAC.  Additionally, I assumed that I could now drop my search path and the modules would be found using clr.AddReference() in the GAC instead.  However, once I drop the search path it does not work again.

Could somebody point me in the right direction, here?  I'm feeling lost.

Thanks much!

- George

Ironpython-users mailing list
Ironpython-users at python.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ironpython-users/attachments/20150709/2abb9ed4/attachment.html>

More information about the Ironpython-users mailing list