
Steps to creating and using Shared Assembly
1.
•Tao Class Library project
•Lu projectư
•Click Menu Project – Properties
•Click Signing
•Check on Sign the Assembly
•Click
•Ch n Newọ
•Nh p tên t p tin ch a keyậ ậ ứ
•Uncheck on “Protect my key file
with password”
•OK

•Build Project
2. Đăng ký Assembly v iớ GAC và Registry
•Start - Microsoft Visual Studio 2005 - Visual Studio Tool - VS
2005 Command Prompt
•Chuy n vào folder Debug c a DLL Projectể ủ
•Nh p: GACUTIL /i <tên DLL> ví du: GACUTIL /i Myproject.dllậ
(Ba b c trên có th thay th b ng cách dùng Windows explorer drag chu t trênướ ể ế ằ ộ
file dll b vào folder C:\Windows\assembly [dùng 2 c a s windows explorer])ỏ ử ổ
•Start – Run
•Nh p Regeditậ
•Click ph i trên:ả
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework\AssemblyFolders
•Ch n New Keyọ
• Nh p kép trên muc defaut (khung bên ph i)ấ ả
•Nh p vào d ng d n ch a t p tin dll trong th m c assembly ậ ườ ẫ ứ ậ ư ụ
L u ý:ư
Mu n bi t file dll ch a trong folder nào c a GAC ta dùng VS2005 Command promtố ế ứ ủ
dùng l nh ệ

•cd \windows\assembly
•dir <tên assembly> /s
ví d :ụ