D
Dan
I have a strongly-named assembly in a DLL installed into the GAC. Let's say
that the DLL is named Test.Some.dll according to its project default
namespace, Test.Some. Of course the assembly has a public key and a version
number. I'd like to programmatically load this assembly or one of its types,
but the code cannot know in advance the version number for the assembly.
This is a problem because e.g.
Assembly.Load("Test.Some, Version=1.0.1548.27308, Culture=neutral,
PublicKeyToken=14954757e9893caf")
works fine but if I remove the Version it cannot work. I need not to bind my
code to a specific version of the required assembly, it should simply use
the latest available version in the GAC. Thus I should be able to find out
the (latest) version of the (GAC) assembly I need to load at runtime to load
that assembly. How can I do this?
Thx!
that the DLL is named Test.Some.dll according to its project default
namespace, Test.Some. Of course the assembly has a public key and a version
number. I'd like to programmatically load this assembly or one of its types,
but the code cannot know in advance the version number for the assembly.
This is a problem because e.g.
Assembly.Load("Test.Some, Version=1.0.1548.27308, Culture=neutral,
PublicKeyToken=14954757e9893caf")
works fine but if I remove the Version it cannot work. I need not to bind my
code to a specific version of the required assembly, it should simply use
the latest available version in the GAC. Thus I should be able to find out
the (latest) version of the (GAC) assembly I need to load at runtime to load
that assembly. How can I do this?
Thx!