.net assembly question...

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a windows c# application trying to load in an assembly (windows
control assembly that I built). I first do :

Assembly subAssembly =
Assembly.LoadFrom("c:\\bookmanager\\customereditor\\bin\\debug\\CustomerEditor.dll");
Object newSubApp = subAssembly.CreateInstance("CustomerEditor");

newSubApp always returns NULL. I checked and subAssembly.entrypoint is not
defined, which has to be the problem. I'm not sure how to fix.

I did verify my controls do work in a windows app that have direct
references to.
 
You're probably missing the namespace.

Try subAssembly.CreateInstance("YourNamespace.CustomEditor");

-vJ
 
Your problem is probably that you left out the namespace. You need to
provide the full name. Change the line as follows:

Object newSubApp = subAssembly.CreateInstance("<namespace>.CustomerEditor");

Substitute the name of your namespace appropriately.
 
thanks! I'm learning from a book. That very basic item stumped me for a
while. Stupid book.
-JT
 
Back
Top