How can I load an assembly from the GAC without specifying the version?

  • Thread starter Thread starter Bernd Sonderkötter
  • Start date Start date
B

Bernd Sonderkötter

Hi all,

I have a question regarding loading an assembly:

How can I load an assembly from the GAC without specifying the version,
culture and public key? I always have only one single version of this
assembly in the GAC at a given time.

Thanks,
Bernd
 
Bernd,
How can I load an assembly from the GAC without specifying the version,
culture and public key? I always have only one single version of this
assembly in the GAC at a given time.

I don't think you should ignore versioning even if you know only a
single version will be installed. You can't know for sure that the
installed version is compatible with the one you've tested against.

To answer your question, check out Assembly.LoadWithPartialName(). But
be sure to also read the following page to learn why this is a bad
idea.

http://blogs.gotdotnet.com/suzcook/PermaLink.aspx/87646756-a94d-4c3a-a313-56c29a59b22d



Mattias
 
Back
Top