MissingMethodException on System.Activator.CreateInstance

  • Thread starter Thread starter Harry F. Harrison
  • Start date Start date
H

Harry F. Harrison

Hi folks,

I'm getting the following error message using the
System.Activator.CreateInstance shared method:

A first chance exception of type 'System.MissingMethodException' occurred in
mscorlib.dll

Additional information: Member not found.

I'm using the following overload:

CreateInstance(type as System.Type, Args() as Object) as Object

1) The type that I'm trying to load was compiled in VB.NET .dll, and the
code that I'm trying to instantiate the type is also VB.NET.

2) This fails as a Windows executable, and as a Windows Service, but it
works when run in an ASP.NET app. The VB.NET Winform test app has no
controls, simply the same code as the ASP.NET test app.

3) I believe that all dependent objects are being referenced and are being
copied into the bin folder. Not that it would matter, as I would get an
exception when loading the assembly, if dependencies aren't found.

Any ideas on how to track this down?
 

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

Back
Top