Moving object creation from COM to .NET

S

Steve Long

Hello,
I'm trying to create an object at runtime. The way I used to do this in the
COM (vb6) world was to use the ProgID such as:
PublicWorksPlugin.PWPlug

I kind of know how to do this in .NET but the missing piece is the location
of the assembly. So, in the COM world the following would work because the
registry would also contain the location of the Object for creation.
a = [Assembly].Load("PublicWorksPlugin.PWPlug")

I didn't really want to install the PublicWorksPlugin assembly into the GAC
as that would force all the assemblies in my project to be strong named (I
believe). How do I tell Load where the assemblies resides?

This is probably elementry so please excuse my numb skull...

Thanks
Steve
 
T

Tom Shelton

Hello,
I'm trying to create an object at runtime. The way I used to do this in the
COM (vb6) world was to use the ProgID such as:
PublicWorksPlugin.PWPlug

I kind of know how to do this in .NET but the missing piece is the location
of the assembly. So, in the COM world the following would work because the
registry would also contain the location of the Object for creation.
a = [Assembly].Load("PublicWorksPlugin.PWPlug")

I didn't really want to install the PublicWorksPlugin assembly into the GAC
as that would force all the assemblies in my project to be strong named (I
believe). How do I tell Load where the assemblies resides?

This is probably elementry so please excuse my numb skull...

Thanks
Steve

Look at the documentation for System.Activator.CreateInstanceFrom...
 
M

M. Posseth

As far as i know the assembly should be in the bin directory ( or other
location specified in the app.config file )
or installed in the GAC



Tom Shelton said:
Hello,
I'm trying to create an object at runtime. The way I used to do this in the
COM (vb6) world was to use the ProgID such as:
PublicWorksPlugin.PWPlug

I kind of know how to do this in .NET but the missing piece is the location
of the assembly. So, in the COM world the following would work because the
registry would also contain the location of the Object for creation.
a = [Assembly].Load("PublicWorksPlugin.PWPlug")

I didn't really want to install the PublicWorksPlugin assembly into the GAC
as that would force all the assemblies in my project to be strong named (I
believe). How do I tell Load where the assemblies resides?

This is probably elementry so please excuse my numb skull...

Thanks
Steve

Look at the documentation for System.Activator.CreateInstanceFrom...
 

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

Similar Threads


Top