惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Microsoft Azure Blog
Microsoft Azure Blog
博客园 - 司徒正美
大猫的无限游戏
大猫的无限游戏
T
Tailwind CSS Blog
Apple Machine Learning Research
Apple Machine Learning Research
Last Week in AI
Last Week in AI
爱范儿
爱范儿
WordPress大学
WordPress大学
V
V2EX
宝玉的分享
宝玉的分享
小众软件
小众软件
B
Blog
博客园 - 叶小钗
U
Unit 42
酷 壳 – CoolShell
酷 壳 – CoolShell
人人都是产品经理
人人都是产品经理
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
腾讯CDC
H
Help Net Security
P
Proofpoint News Feed
D
Docker
Microsoft Security Blog
Microsoft Security Blog
罗磊的独立博客
月光博客
月光博客

博客园 - 半克拉鹅卵石

sql积累 一些有用的bat命令 js获取某年某月天数 计算经纬度距离 正则表达式分割数组 修改系统时间 转贴:Lucene的评分(score)机制 搜索引擎CACHE策略研究 DllImport lucene.net 2.0在多线程同步下似乎有问题 Lucene Hack之通过缩小搜索结果集来提升性能 lucene2.0与2.3区别 asp.net常用函数 不走寻常路,设计asp.net应用程序的七大绝招 数据库备份 获取sql server服务器名称 如何用SQLDMO在ASP.NET页面下实现数据库的备份与恢复 C#中下载Excel文件(其实就是将Excel文件从一个路径Copy到另一个路径) Asp.net中操作Excel的权限解决方法
strong name in gac
半克拉鹅卵石 · 2010-04-02 · via 博客园 - 半克拉鹅卵石

After creating an assembly and before registering it to the Global Assembly Cache the first thing that is required is to assign a strong name to the assembly. What is a strong name? Well! a strong name is basically assigned to an assembly or a component to distinguish it from other assemblies and components existing in the GAC. A strong name consists of an assembly identity (name, version, etc.), public key and a digital signature. The Global Assembly Cache is used to share assemblies throughout applications. For example, to create a strong name for an assembly named as sample.dll, you would write on the command prompt. sn -k sample.snk This would generate a strong name key pair and store it in a file named as sample.snk. The extension of the file can be anything, but mostly .snk is used as a convention. The -k option here is for creating a strong name key pair. There are other options also available which you could search for in MSDN. After generating the strong name key pair file, it is required to associate this file with our assembly, for doing that you have to add the following lines in the code of your assembly. Imports System.Reflection

Note here that the information regarding the file containing the strong name key pair is placed in the code file before the namespace declaration. Also you are required to import the System.Reflection namespace in order for the statement to work, otherwise the compiler would be showing you an error stating that it does not recognize the statement. After compiling the assembly with the statements, containing the strong name information being added to it, you now have to place the assembly into the GAC. You can either do it manually by simply copying and pasting the assembly into the GAC, which is located at c:\winnt\assembly; or use gacutil , gacutil /i sample.dll please refer to below link for more info, http://aspalliance.com/394_Installing_an_Assembly_in_GAC