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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top