I want to use the Publish.GacRemove function to remove an assembly from GAC. However, I don't understand what path I should pass as an argument.
Should it be a path to the original DLL (what if I removed it after installing it in the GAC?) or the path to the assembly in the GAC?
UPDATE:
I finally used these API wrappers.
I am using the GacInstall
to publish my assemblies, however once installed into the gac, I sometimes delete my ‘temporary’ copy of the assemblies.
And then, if I ever wanted to uninstall the assemblies from the gac I do not have the files at the original path. This is causing a problem since I cannot seem to get the GacRemove
method to uninstall the assemblies unless I keep the original files.
Conclusion: Yes, you need to specify the path to the original DLL. (And try to not move/delete it later). If you delete it, try to copy the file from the GAC to your original path and you should be able to uninstall it using GacRemove
.