I'm trying to register a .DLL in the GAC.
Currently I'm having trouble to prove it has been added to the assembly.
Using the command
C:\Windows\System32>%programfiles(x86)%\Microsoft SDKs\Windows\v7.0A\Bin\gacutil.exe -i "path\to\my\file.dll"
The prompt tells me that the assembly has been added to the cache.
When checking with
C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bin>gacutil.exe -l file.dll
It says that there are 0 elements in the assembly.
Via Powershell commands, I'm trying to add the DLL like this:
PS C:\WINDOWS\system32> Add-Type -AssemblyName "System.EnterpriseServices"
PS C:\WINDOWS\system32> $publish = New-Object System.EnterpriseServices.Internal.Publish
PS C:\WINDOWS\system32> $publish.GacInstall("file.dll")
What did I do wrong? How can I add the .DLL to the GAC? The best way (for me) would be doing that with Powershell.
