5

I've written a batch execution framework and in it I want (in some scenarios) to load an assembly from the GAC where there may be multiple versions but I just want to load the latest version.
Is this even possible?

TIA

Ben
  • 101
  • 1
  • 3
  • 8

3 Answers3

3

Assembly.LoadWithPartialName(string) will do exactly what you want.

csgero
  • 2,753
  • 17
  • 15
2

You should be able to use a publisher policy with a BindingRedirect. See this SO answer.

Community
  • 1
  • 1
Mitch Wheat
  • 295,962
  • 43
  • 465
  • 541
-2

Linq to Gac can query the GAC. You can load assembly at runtime once you know what you want.

Eugene Yokota
  • 94,654
  • 45
  • 215
  • 319