注册DLL到GAC - 但它不能在装配窗口中显示出来 [英] Register a dll into the GAC - but then it doesn't show up in the assembly window

查看:302
本文介绍了注册DLL到GAC - 但它不能在装配窗口中显示出来的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有这样的code注册的dll到我的GAC

I have this code to register dlls into my gac

 Assembly asm = Assembly.LoadFrom(argument);
    RegistrationServices regAsm = new RegistrationServices();
    bool bResult = regAsm.RegisterAssembly(asm, AssemblyRegistrationFlags.SetCodeBase);

和工作正常,我得到真实的bResult,但是当我打开窗户GAC我期望看到的DLL有,但事实并非如此。任何人能解释我为什么?

and that works fine, i'm getting true to bResult, but when i open the GAC window i expected to see the dll there, but it is not. Can anyone explain me why?

当我把DLL到GAC窗口我看到它在那里。

When i drop the dll into the GAC window i see it there.

推荐答案

您code不注册在GAC大会,但作为解释<一个href=\"http://msdn.microsoft.com/en-us/library/system.runtime.interopservices.registrationservices.registerassembly\"相对=nofollow>这里,

Your code doesn't register the assembly in GAC, but, as explained here,

在注册一个托管班
  集会从COM使创建。

Registers the classes in a managed assembly to enable creation from COM.

这是不一样的。

这篇关于注册DLL到GAC - 但它不能在装配窗口中显示出来的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆