By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,568 Members | 1,713 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,568 IT Pros & Developers. It's quick & easy.

Dynamically load a class

P: n/a
Hi all,

I am trying to dynamically load a class, and I'm having trouble
getting past the Assembly.LoadFrom part (or at least I think so)

Error: The located assembly's manifest definition with name
'MyAssemblyName' does not match the assembly reference.

Assembly code:
<Assembly: AssemblyKeyFileAttribute("assemblykeys.snk")>
<Assembly: AssemblyKeyName("MyAssembly")>
<Assembly: AssemblyVersion("1.0.0.1")>

Calling code:
Dim ao As [Assembly] =
[Assembly].Load("MyAssemblyName,Version=1.0.0.1,Culture=neut ral,PublicKeyToken=de602f135d6a367f")
Dim ty As Type = ao.getType(ClassName, True, True)

I have recompiled a few times, so I'm wondering if I have to generate
a new set of keys...or what?

I have had some success getting past this point before, but always got
'Object reference not set to an instance of an object' when I tried to
use the GetType() method.

Any help would be a step in the right direction.

Thanks..
Robin..
Nov 20 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.