Compare Global Assembly Cache across Servers

When deploying .Net applications/.wsp code you will sometime have to deploy your assemblies (that needs to be GAC’ed) to multiple machines. Inevitability, you will run into the situation where the assemblies of the two machines will get out of sync. It can be a real headache to try to figure out the difference in the dlls deployed especially if you are not versioning your dlls. Recently I came across this situation and found a nice solution in form of Global Assembly Cache comparison tool. This is a nice tool which lets quickly check compare GAC across multiple servers and export results into a nice format for us.

It is to be noted that this tool does not make any changes to GAC and Read More »

Install a dll file in GAC using PowerShell

If you need to install a dll without using Gacutil, you can do it using PowerShell. For this, open a PowerShell prompt as administrator and run below commands:

[System.Reflection.Assembly]::Load("System.EnterpriseServices, Version=, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")
$publish = New-Object System.EnterpriseServices.Internal.Publish
$publish.GacInstall("F:\Dlls for FBA\Metavrse.SharePoint.SyncLib.dll")
view raw Deploy-Dll-GAC.ps1 hosted with ❤ by GitHub

Do note that the path in the last command should be full path for dll. Otherwise it won’t work.Read More »