Recreate gacutil
It is nice to be back at Matrix. The story begins like this -
Couple of days back we were facing some issues regarding GACing and UnGACing our primary assembly. They(install team) were using some in-house tool called ourProductReg.exe for unGACing the primary assembly , let's call it ourProductAssembly.dll. The commandline tool accepts full qualified filepath of the assembly to be uninstalled(installtion - GACing , seemed doesn't have any issue). Strange. Like below
ourProductReg.exe /u c:\....\ourProductAssembly.dll
But the intention was to uninstall all the assemblies given just the filename not the path name. Like
ourProductReg.exe /u ourProductAssembly
So this would uninstall all the assemblies named ourProductAssembly irrespective of cultures, version etc. Sounds pretty gacutil-like. So I was looking into it. Suddenly, after one hour, my assignment was revisited. This time the intention was to match more partial names including cultures or versions which were left earlier.Like
ourProductReg.exe /u ourProductAssembly, Version=1.0.0.1
This should uninstall(unGAC) all the assemblies with name ourProductAssembly and version 1.0.0.1 irrespective of the cultures. Come home to the world of gacutil. I understood that client shouldn't have entire fatty .NET SDK installed for only this management tools like gacutil.exe. But I was not aware of the reason of not distributing gacutil.exe along with our product. Later I came to know that the SDK license does not allow to distribute the tools outside of the SDK, so client will have to download the entire package. Definitely not an option.
Find the part 2 here.