简体   繁体   中英

How to bypass GAC for strong name assemblies?

I have a debug version of an assembly which has a strong name. I want to install the assembly in the bin folder of a web application.

However, the CLR checks if a strong named assembly exists in a GAC before continuing with the rest of the probing. For my web application, I want the CLR to bypass looking into the GAC. Rather, I want the CLR to look into my bin folder first, and if it is not available look at the GAC. How can I do this?

Hans is correct.

DON'T do this - but just for interests sake;

---EXCOMMUNICATION EXCLUSION ZONE---

I do believe from experience that if you install another copy of an assembly (ie your debug version, with same version number), that there will be 2 copies in the GAC and the latest one installed will be used.

---END EXCOMMUNICATION EXCLUSION ZONE---

As Hans says, give your debug version a new version number and point to it with a publisher policy (which you put in the gac too), or an assembly redirect.

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