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 Assembly v i GAC 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 foldero c a GAC ta dùng VS2005 Command promt ế
dùng l nh
cd \windows\assembly
dir <tên assembly> /s
ví d :