❶ snk文件怎麼使用
SNK,作為程序後綴的時候,是<dot>net中的強密匙加密文件
❷ .net 涓鐨 sn.exe 宸ュ叿鎬庝箞浣跨敤鐨勶紵
VS2005 鍏閽 縐侀掗SN.EXE浣跨敤
VS2005 strong name 鐨勫師鐞:
鍏堝埄鐢⊿N.exe榪欎釜宸ュ叿鐢熸垚涓涓姣斿係ampleKey.snk鐨勬枃浠,榪欎釜鏂囦歡鐨勮嫳鏂囧師濡傚矓鍏嗘枃鍙玸tring name key file,鐒跺悗鐢ㄥ姞瀵嗙殑綆楁硶鏍規嵁SampleKey.snk鐢熸垚涓涓猄ampleKeyPublic.snk.鏈鍚庡湪鏍規嵁SampleKeyPublic.snk鎻愬彇涓涓猵ublic key token
,public key token鏄涓涓16浣嶇殑鏁板瓧鍜屽瓧姣嶆販鍚堢殑鏁(鎴戜笉鏁㈢『瀹氭槸涓嶆槸鍗佸叚榪涘埗鏁):澶ц嚧嫻佺▼濡備笅:
SampleKey.snk --鏍規嵁涓瀹氱殑綆楁硶--> SampleKeyPublic.snk---->public key token
鎵浠ユ垜浠鍙瑕丼ampleKey.snk鍜宲ublic key token灝卞彲浠ヤ簡,SampleKeyPublic.snk灝辨病浠涔堢敤浜.鍥犱負SampleKeyPublic.snk鐨勮礎鐚鍋氬畬浜,鎵浠ユ垜浠涓嶈佷負"涓轟粈涔堝湪vs2003涓嶇敤鍚奡ampleKeyPublic.snk"鑰屼笉鐖.
瀹為檯鎿嶄綔濡備笅:
1.鎵撳紑SDK Command Prompt鎴栬匳S2005涓鐨刅isual Studio 2005 Command Prompt.鑰屼笉鏄痺indows鐨刢md
2.杈撳叆sn -k SampleKey.snk,寰楀埌鐨勬枃浠跺湪鍛戒護鎻愮ず絎︾殑褰撳墠鏂囦歡澶逛笅(寰鑵婄ゥ杞鍙鏂囦歡澶瑰緢灝戝彨鐩褰,鏈姝g偣鏄痜older)
3.杈撳叆sn -p SampleKey.snk SampleKeyPublic.snk
4.杈撳叆sn -t SampleKeyPublic.snk 寰楀埌public key token
鎵撳紑VS2005錛屾壘鍒伴」鐩錛岀劧鍚庡彸鍑"欏圭洰鍚"鎵懼埌"灞炴"錛"灞炴"閲岄潰鏈変釜"Signing"鐨勯夐」鍗★紝鐒跺悗閽╀笂
"Sign the assembly"錛屽啀Choose a strong name key file.鍋氬畬浜嗘搷浣滐紝鐒跺悗璁板緱淇濆瓨錛岀紪璇
榪欐牱浣犵殑DLL鎵嶈兘鎷栧埌GAC錛孏AC灝辨槸"鍏ㄥ矓紼嬪簭闆嗙紦瀛"錛岃繖灝辨槸涓轟粈涔堜綘鐨勪綘鐨勯」鐩鐨刡in鏂囦歡澶逛笅娌℃湁System.Data錛屼綘閮借兘寮曠敤鐨勫師鍥狅紝鍥犱負紼嬪簭浼氳嚜鍔ㄥ幓鎵綠AC,GAC鐨勪綅緗鍦╳in 2003涓鏄"c:\windows\assembly".
濡傛灉浣犵殑assembly鍦℅AC涓錛岄偅涔堜綘鐨勪笢瑗誇篃鏄錏鍚婄殑銆
SQl Server 2005 Sample bug 鏄鎸囧湪鈥淐:\娓g烶rogram Files\Microsoft SQL Sever\90\Samples\Integration Service\Programming Samples\Control Flow\SqlConnection Manager Sample\SqlConnMgrCS鈥濈殑Sample鏈夐棶棰
璇峰弬鐓у備笅淇鏀:
1.SqlConnMgrCS.cs鏂囦歡涓鐨13琛
搴旀敼鎴:SqlConnMgrCSUI.SqlConnMgrUICS,SqlConnMgrUICS
2.鍦⊿qlConnMgrCSUI欏圭洰涓鐨凷qlConnMgrUIFromCS.cs涓鐨勬寜閽鍦⊿QL Server鐨凷SIS Designer涓鏍規湰鐐逛笉鍔
鎵浠ユ垜浠蹇呴』鍒癡S2005涓甯瀹冭Е鍙戜簨浠訛紝鐒跺悗Copy瀹冪殑浠g爜鍒扮浉搴旂殑浜嬩歡澶勭悊紼嬪簭涓銆
❸ petshop鐨剆nk鏂囦歡鏄鐢ㄦ潵鍋氫粈涔堢殑鍟婏紵
鍒涘緩瀵嗛掗瀵
瑕佷嬌鐢ㄥ己鍚嶇О涓虹▼搴忛泦絳懼悕錛屽繀欏誨叿鏈夊叕閽/縐侀掗瀵廣傝繖涓瀵瑰姞瀵嗗叕閽ュ拰鍔犲瘑縐侀掗鐢ㄤ簬鍦ㄧ紪璇戣繃紼嬩腑鍒涘緩寮哄悕縐扮▼搴忛泦銆傛偍鍙浠ヤ嬌鐢ㄥ己鍚嶇О宸ュ叿 (Sn.exe) 鏉ュ壋寤哄瘑閽ュ廣傚瘑閽ュ規枃浠墮氬父鍏鋒湁 .snk 鎵╁睍鍚嶃