Tuesday, December 4, 2007

Easy add .dll to GAC

Often in Sharepoint you’ll need to add assemblies to the Global Assembly Cache. An easy way is creating a registry key which allows you to right click the DLL and add to the GAC in one click.

Simply copy and paste the script below into notepad and save it as a registry file (.reg extension). Then double click the file to exceute and it will then be added it to the registry.

.Net 1.1
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\dllfile\shell\gacutil\command]
@="c:\\windows\\Microsoft.NET\\Framework\\v1.1.4322\\gacutil.exe /i \"%1\""

.Net 2.0
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\dllfile\shell\gacutil\command]
@="C:\\Program Files\\Microsoft Visual Studio 8\\SDK\\V2.0\\Bin\\gacutil.exe /i \"%1\""



See: http://amit-rohilla.spaces.live.com/blog/cns!2CEC2165026E6288!158.entry

Monday, December 3, 2007