FileNotFound Exception after Assembly.LoadFile

T

Tom

I load an assembly via

Assembly assembly=Assembly.LoadFile(assemblyName);

....

foreach(Type t in types)
{
attribs=t.GetCustomAttributes(typeof(MayaPanelAttribute),true);
}

When Get Custom Attributes is called I get a FileNotFound Exception
for one of the Assembly that this references. What am I doing wrong?

Any Help appreciated

Tom
 
A

Adrian Vinca [MSFT]

The exception should tell you which file is missing (e.g. you may use a try/catch block, and investigate the exception). Do you have that file?
If you have that file, make sure that it has the same signature as the the one which is referenced (version, public key, etc).

Hope that helps.
I load an assembly via

Assembly assembly=Assembly.LoadFile(assemblyName);

...

foreach(Type t in types)
{
attribs=t.GetCustomAttributes(typeof(MayaPanelAttribute),true);
}

When Get Custom Attributes is called I get a FileNotFound Exception
for one of the Assembly that this references. What am I doing wrong?

Any Help appreciated

Tom


--
Adrian Vinca, Developer Division

This posting is provided "AS IS" with no warranties, and confers no rights.

Note: For the benefit of the community-at-large, all responses to this message are best directed to the newsgroup/thread from which they originated.
 

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