We have got many questions on GAC assemblies on install and uninstall.
This article attempts to discuss how GAC assemblies install and uninstall are implemented, and the common mistakes/errors people seen in those area.
(Disclaimer: Information discussed here is implementation detail. It only applies to the current product as the article is written, and is subject to change without notice.)
GAC assemblies install takes a file path and an optional (but recommended) trace reference as input. Roughly it does the following:
The typical mistakes we have seen people making on assemblies install are:
The following failure is not caused by user errors. Instead, it is caused by other applications interfering with assemblies install.
As discussed above, we call MoveFile on the temporary directory to move it to the final location. MoveFile will fail if a file in the directory is opened. Unfortunately when index services, anti-virus software, or other file monitoring application is running, they may open a file in the temporary directory while we call MoveFile, causing MoveFile to fail.
This does not happen very often. But we definite have seen reports of them.
GAC assembly install takes an assembly display name, and an optional trace reference as input. It has to take a display name as input, as it is the only way to uniquely identity an assembly.
The following is what it does:
Here are the answers to some of the uninstall questions: