Phalanger C#DLL组件进口,但不能被称为 [英] Phalanger c# DLL assembly imported but cannot be called
问题描述
我有一个问题,即在使用Phalanger我不能让C#code露面,甚至可以使用。其定义,所有我需要做的就是添加
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.
这是什么可能帮助我在这里的任何想法?我已命名空间这似乎是一个要求该DLL。除此之外,我不知道我能做些什么...任何帮助是极大的AP preciated!
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!
来源:
的http://www.$c$cproject.com/Articles/17311/Phalanger-PHP-for-NET-Introduction-for-NET-develop
推荐答案
您正在做的是正确的。
您不必使装配COM可见。
You don't have to make the assembly COM-visible.
所有您需要做的是指定&LT装配; classLibrary&GT;
配置部分。有两种方式:
All you have to do is to specify the assembly in <classLibrary>
configuration section. There are two ways:
&LT;添加组件=全大会名/&GT;
当组件在GAC
&LT;添加URL =集结号相对文件名/方式&gt;
当组件在当前目录或子目录
<add url="assembly relative file name" />
when the assembly is in current dir or subdir.
但另一个问题是,Phalanger工具是否显示它应该。如果你的程序是编译的,只是你没有看到智能感知类/功能,更新Phalanger工具从不版本(从2012年7月27日的版本应该修复它)。如果你有Phalanger工具的问题,在 http://support.devsense.com举报/viewforum.php?f=10
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
这篇关于Phalanger C#DLL组件进口,但不能被称为的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!