GenerateMetadata.GenerateSigned(String, String, Boolean, String) 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
生成或定位一个程序集,该程序集包含由指定类型库表示的 COM+ 组件的公共语言运行时(CLR)元数据,使用强名称密钥对对对程序集进行签名,并将其安装在全局程序集缓存中。
此 API 支持产品基础结构,不能在代码中直接使用。
public:
virtual System::String ^ GenerateSigned(System::String ^ strSrcTypeLib, System::String ^ outPath, bool InstallGac, [Runtime::InteropServices::Out] System::String ^ % Error);
public string GenerateSigned(string strSrcTypeLib, string outPath, bool InstallGac, out string Error);
abstract member GenerateSigned : string * string * bool * string -> string
override this.GenerateSigned : string * string * bool * string -> string
Public Function GenerateSigned (strSrcTypeLib As String, outPath As String, InstallGac As Boolean, ByRef Error As String) As String
参数
- strSrcTypeLib
- String
要为其生成程序集的类型库的名称。
- outPath
- String
要在其中生成程序集或查找已存在的程序集的文件夹。
- InstallGac
- Boolean
忽视。
- Error
- String
可以向其写入错误消息的字符串。
返回
生成的程序集名称;否则,如果输入无效,则为空字符串。
实现
注解
如有必要,该方法 GenerateSigned 将生成一个程序集,其中包含指定类型库的 CLR 元数据。 它还生成一个强名称密钥对并对程序集进行签名。
为此处理,它将调用该方法 GenerateMetaData 。 无需直接从代码调用这些方法。
该 InstallGac 参数指示是否在全局程序集缓存中安装程序集。 但是,实现将忽略此值,并且始终尝试在全局程序集缓存中安装已签名程序集。