Parfois, il n’est pas possible d’ajouter la dll dans le GAC (global assembly cache) en utilisant gacutil.exe
Dans ce cas, il est possible d’utiliser le PowerShell :
Ajouter une DLL dans le GAC :
- Lancer la console PowerShell en tant que administrateur
- Entrer le script suivant :
Set-location "c:\Folder Path" [System.Reflection.Assembly]::Load("System.EnterpriseServices, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a") $publish = New-Object System.EnterpriseServices.Internal.Publish $publish.GacInstall("c:\Folder Path\DLL.dll") iisreset
Supprimer une DLL dans le GAC :
- Lancer la console PowerShell en tant que administrateur
- Entrer le script suivant :
Set-location "c:\Folder Path" [System.Reflection.Assembly]::Load("System.EnterpriseServices, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a") $publish = New-Object System.EnterpriseServices.Internal.Publish $publish.GacRemove("c:\Folder Path\DLL.dll") iisreset