简体   繁体   中英

How to override assemblies in GAC

In my application, I install third party assemblies into GAC. These third party assemblies are very large dll files so I don't want to deploy them in the application bin folder, in order to save disk space.

Now I receive a patch on one of these assemblies, with exactly the same assembly version as before. I would then have to override the assemblies in GAC. How can I do that?

Some users might have installed many different versions of my application, I can't just release a new version with the patched assembly to them and ask them to uninstall all of those old versions, because that would be very tedious.

I also cannot use GacUtil because as mentioned above, I would have to deploy those assemblies on client machine, without standard debugging tools like VS 2015.

What I am thinking is that I want to override the exact faulty assemblies in GAC via a command line or an installer. How can I do that?

The simplest way, as I have found out, is to just drag and drop the DLLs at the corresponding GAC folder. I've tested on Windows 7 and Windows 10, and it works!

Also, one can also write a wrapper class as in this answer .

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