Loading Assemblies

G

Guest

The following code when run generates a file not found exception:
AssemblyName aName = new AssemblyName();
aName.Name = "Martee.Entity";
Assembly assembly = Assembly.Load(aName);

on the other hand, this runs OK:
Assembly assembly = Assembly.LoadWithPartialName("Martee.Entity");

Martee.Entity is in the GAC, but Load doesn't seem to be able to find it.
I'd rather not use LoadWithPartialName because it's obsolete, but I'm not
sure what to replace it with. Can anyone suggest something?
 
G

Guest

Not really familiar with loading assemblies at runtime, but can't you just
copy the Martee.Entity to your local bin/executable folder?
 

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

Top