How can I force .NET to use a local copy of an assembly that's in the GAC

前端 未结 6 732
情话喂你
情话喂你 2020-11-29 19:42

I have a .NET assembly that (for reasons outside my control) must be in the GAC. However, the same assembly is used by another program, which has a its own copy of

6条回答
  •  感动是毒
    2020-11-29 20:22

    If they have the same version number the answer is you can't. If you attempt to load an assembly that has the same full assembly name (name, version, key) as a GAC'd assembly the CLR will pick the GAC'd assembly every single time.

提交回复
热议问题