Hi,
I have written a C# COM component which I am using via a VB6 application.
Everything seems to work just fine on my local machine but when I try to use
the component and VB app on another machine I can't seem to make it work.
The process I used to create the component is :
1. Create a C# class libarary.
2. Add the following attributes to the class
[ProgId("CSIRS.Imager")]
[ClassInterface(ClassInterfaceType.AutoDual)]
3. From the application setting I open the Assembly Information dialog and
set the Make Assembly COM-Visible flag.
4. On the application Build settings I set the Register for Com interop
setting.
5. Next I sign the assembly using the application settings sign assembly
setting.
6. Finally I build the component.
At the end of this I get the component dll and a type library file.
In VB6 I can then add a reference to the project and start using the
component.
Ok, so this is all fine BUT when I try to use it on another machine I run
into problems. VB appears to see the component but when I try to create it I
get an error "Automation Error. System cannot find the specified file"
Here what I am doing to deploy the component on the machine :
1. Copy the component dll and vb app onto the machine.
2. Use RegAsm to create the type libarary as below :
"C:\WINNT\Microsoft.NET\Framework\v2.0.50727\regasm" csirs.dll /tlb csirs.tlb
As I said above when I try to run the vb app I a automation error along the
lines of "Automation Error. System cannot find the specified file"
Any help in getting this to work would be very welcome.
Thanks
Mike
Brian Muth - 08 Feb 2008 23:25 GMT
Try regasm /codebase csirs.dll /tlb csirs.tlb
Brian
Mike Towers - 11 Feb 2008 12:58 GMT
> Try regasm /codebase csirs.dll /tlb csirs.tlb
>
> Brian
>
> Hi Brian,
Thanks for that it worked a treat.
Mike