IComSoapPublisher.RegisterAssembly(String) 方法

定义

为 COM 互操作注册程序集。

public:
 void RegisterAssembly(System::String ^ AssemblyPath);
public void RegisterAssembly (string AssemblyPath);
abstract member RegisterAssembly : string -> unit
Public Sub RegisterAssembly (AssemblyPath As String)

参数

AssemblyPath
String

程序集的文件系统路径。

例外

输入程序集没有强名称。

调用链中的调用方无权访问非托管代码。

  • 或 - 指定了不以“file://”开头的基本代码,且没有所需的 WebPermission

AssemblyPathnull

找不到 AssemblyPath 或者未指定文件扩展名。

AssemblyPath 不是有效的程序集。

用两个不同的证据将一个程序集或模块加载了两次,或程序集名称超过系统指定的最大长度。

使用 ComUnregisterFunctionAttribute 标记的方法不是 static 方法。

注解

的实现 RegisterAssembly 使用程序集注册工具 (Regasm.exe) 程序集中注册可创建类。 有关详细信息,请参阅Regasm.exe (程序集注册工具) 。

适用于