简体   繁体   中英

Can An Assembly Be Installed In The GAC but not Show Up In Gacutil.exe?

I've got an application where some assemblies are copied to C:\\Windows\\assembly upon deployment under the assumption that this installs them in the GAC. The application seems to work but when I run gacutil.exe on the copied assemblies, it says the Global Assembly Cache contains 0 assemblies.

Should all assemblies in c:\\Windows\\assembly show up in gacutil? If not, why not? How can I verify that the assembly is in fact installed in the GAC?

I have always used gacutil.exe in the past to register assemblies so doing a file copy is new to me and I'm trying to understand the ramifications.

令人惊讶的是,但是这将滥用GAC的内部原理,因此请勿这样做。

Yes. The assembly can be registered in the system by adding respective REGISTRY KEYS.

Also at the same time, the assemblies need not be necessarily in the GAC folder. And gacutil reveals the assembly files placed in the GAC folder.

That is why it is recommended to deploy to GAC only if the assembly is registered in the system.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM