如何将privateassembly转换为Shared Assembly(Dot Net) [英] How to convert privateassembly to Shared Assembly (Dot Net)

查看:67
本文介绍了如何将privateassembly转换为Shared Assembly(Dot Net)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

尊敬的所有专家,

如何将私有程序集转换为共享程序集,请在Dot Net Frame工作中给我一个例子

感谢您的宝贵重播.

Dear All Experts,

How to convert private assembly to shared Assembly please give me an example in Dot Net Frame work

Thank you for your valuable replay.

推荐答案

请仔细阅读该内容.
http://support.microsoft.com/kb/815808 [
Go through this one.
http://support.microsoft.com/kb/815808[]


这个著名的概念被称为-" Global Assembly Cache ".

请查看以下链接,以获取有关此内容的更多信息.
http://msdn.microsoft.com/en-us/library/yf1d93sz%28v = VS.100%29.aspx

http://msdn.microsoft.com/en-us/library/6axd4fx6.aspx
This famous concept is known as - "Global Assembly Cache".

Have a look at below links for more information on this.
http://msdn.microsoft.com/en-us/library/yf1d93sz%28v=VS.100%29.aspx

http://msdn.microsoft.com/en-us/library/6axd4fx6.aspx


要共享程序集,需要对其进行严格签名并将其添加到GAC.

选中
中的复选框 项目属性>>签名标签>>签名程序集

创建一个强键
选择一个强名称密钥文件:>>新
输入密钥文件名:
输入密码
重新输入密码
强名称密钥将被创建.

创建强名的替代方法
To make assembly shared you need to strongly sign it and add it to GAC.

Select the check box from
project properties>>Signing tab>>Sign the assembly

Create a strong key
Choose a strong name key file: >> new
enter the Key file name:
enter password
reenter password
Strong name key will be created.

Alternate way to create strong name
sn -k "C:\[DirectoryToPlaceKey]\[KeyName].key" 



将签名的程序集托管在Global Assembly Cache中



Host the signed assembly in Global Assembly Cache

gacutil -I "C:\[PathToBinDirectoryInVSProject]\myGAC.dll" 


这篇关于如何将privateassembly转换为Shared Assembly(Dot Net)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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