Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / Interop / February 2008

Tip: Looking for answers? Try searching our database.

C# COM component deplyment issue

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Mike Towers - 08 Feb 2008 18:09 GMT
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

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.