There has been no time to figure out where the CodeBase and the location attribute are. Recently participated in the Office of VSTO programming, finally studied a small study.
Assembly.codebase returns a File: /// form string, pointing to the load address of Assebmly. Store for Assembly. Assembly.location Returns the DRiver: / form string, pointing to the address executed by Assembly. This is the address of Assembly in the cache.
Since the rear code of Office load will be temporarily cached to the local cache, we can find the assebmly to the end of the temporary cache.
If you want to get the current run path in the program, you cannot use the location attribute, or you cannot use the getCurrentDirectory method, but you should use CodeBase.