"Eric B" <bo*********@invalid.com> wrote:
I have created a DLL. It builds successfully without warnings.
I created an app that refereneces the DLL and it too builds.
However, when ever I try to use an object in the DLL
I get a "TypeLoadException", something like:
"Could not load type <name> from assembly <assembly name>"
Could someone tell me some common mistakes that result in this error?
If you have an old version of the DLL which no longer exports the type,
and it is on the path (i.e. typically in the same directory) as the
program, then the program will give this error.
Is the .DLL file definitely up to date? Is the class library project
part of the same solution as the executable, so that VS does all the
required dependencies and copying? Try running .NET Reflector on the DLL
and checking that the type you're loading is in fact in from the DLL.
-- Barry
--
http://barrkel.blogspot.com/