Hi Andy,

Thanks so much for your response.

The issue turned out to be something fundamental... my DLL was built as
"x64" and not as "Any CPU" (even though I was explicitly using 64-bit
ironpython).  As soon as I switch to "Any CPU" the intellisense started
working in the base cases!

I've now been struggling with another Intellisense related issue that I
think might be driven by IronPython using old-style Python classes?

In my C# code, assume I have a class "CSharpTest(string first, string
second)" that I want to inherit from my Python class AND I want the Python
class to not require parameters (i.e., it will explicitly call the
CSharpTest constructor)... I believe I have to do the following:

########################################
class Child (CSharpTest):
    def __new__(cls):
        instance = CSharpTest.__new__(cls, "one", "two")
        return instance
#########################################

The issue seems to be that "instance" is of unknown type, which I think is
driven by old-style classes.  Am I doing inheritance the proper way here?

So when I go to do:
    c = Child()

"c" does not seem to have any Intellisensable class members, and I believe
this is because its type is unknown.

Is my understanding correct that this is due to old-style classes?  Or
might I be missing something else?


On Thu, Jul 9, 2015 at 2:01 PM Andrew Graham <a...@agraham.demon.co.uk>
wrote:

>   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 <gnyc...@gmail.com>
> *Sent:* Wednesday, July 08, 2015 4:33 PM
> *To:* ironpython-users@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=1.0.0.0, 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@python.org
> https://mail.python.org/mailman/listinfo/ironpython-users
>
_______________________________________________
Ironpython-users mailing list
Ironpython-users@python.org
https://mail.python.org/mailman/listinfo/ironpython-users

Reply via email to