Phalanger c# DLL assembly imported but cannot be called

701 views Asked by At

I am having a problem where I cannot get the c# code to show up or even be usable while using Phalanger. By their definition, all I have to do is add

    <add assembly="Utility">

which happens succesfully because if I change the name slightly, the page crashes, so I know its actually picked up on the library. However when I try

    <?php
        use Utility\...; //new version of phalanger uses "use" not import
     ?>

I get nothing. Not only does it not show up in the intellisense but when I actually try to call a function which belongs to it, it does not show up either.

Any idea on what might help me here? I have namespaced the DLL which seems to be a requirement. Other than that, I am not sure what else I could do... Any help is greatly appreciated!

source:

http://www.codeproject.com/Articles/17311/Phalanger-PHP-for-NET-Introduction-for-NET-develop

1

There are 1 answers

1
Jakub Míšek On BEST ANSWER

You are doing it right.

You don't have to make the assembly COM-visible.

All you have to do is to specify the assembly in <classLibrary> configuration section. There are two ways:

<add assembly="Full Assembly Name" /> when the assembly is in GAC

<add url="assembly relative file name" /> when the assembly is in current dir or subdir.

But another question is, whether Phalanger Tools displays what it should. If your program is compilable, but you just don't see the classes/functions in IntelliSense, update Phalanger Tools to never version (version from 27th July 2012 should fix it). If you have an issue with Phalanger Tools, report it at http://support.devsense.com/viewforum.php?f=10