vijayst
vijayst

Reputation: 21894

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?

Upvotes: 1

Views: 977

Answers (1)

Jim W
Jim W

Reputation: 5026

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.

Upvotes: 1

Related Questions