registered for COM Interop -- installing on another machine

I've written a class in c# that exposes some methods to COM clients.  I've got this working just fine on my own machine.  However, when I deploy my application, the COM goo doesn't seem to work out right.

On the target (installed) machine, I can set a reference to the .tlb (in VB).  And, that appears to make the types available in VB's object browser.  And, I can instantiate the object without seeing an error.  However, when I go to call a method on that object, it throws an error saying, "The system cannot find the specified file".  

I have verified that, when calling the same method from a .Net client on the target (installed) machine, that no such error is generated.  So, I'm thinking that this has to be the interop goo not being able to find the implementation of the type in the .tlb.

My fundamental question is, "What's wrong?  What do I need to do to get this component usable by VB6 on an install machine?"  But, I'll accept specific troubleshooting advice as well.
dannykroukAsked:
Who is Participating?
 
fridomCEO/ProgrammerCommented:
Wel I typed in the search
callign a .NET component from a  Com Component and end here:
http://search.msdn.microsoft.com/search/Default.aspx?brand=msdn&locale=en-us&query=calling+a+.net+component+from+a+COM+component

And then I just have to check the first shown entry
http://msdn2.microsoft.com/en-us/library/ms973802.aspx

So I was able to find that ....

Regards
Friedrich
0
 
fridomCEO/ProgrammerCommented:
I bet it's some registration problem. The best pages for help probably will be
some below msdn.microsoft.com. If you are near some library you should try to get
.NET and COM Complete Interoperability Guide from Adam Nathan.

Regards
Friedrich
0
 
dannykroukAuthor Commented:
Well, OK.  Perhaps my question, as posed, is not really answerable.  So, let me re-phrase it.

How can I take a class written in C#, which exposes and COM interface, and install it on another machine such that a VB6 application can use it?
0
Cloud Class® Course: CompTIA Cloud+

The CompTIA Cloud+ Basic training course will teach you about cloud concepts and models, data storage, networking, and network infrastructure.

 
fridomCEO/ProgrammerCommented:
Have you checked the mentioned URLs? Have you checked the mentioned book?

Regards
Friedrich
0
 
dannykroukAuthor Commented:
Do you mean, have I checked http://msdn.microsoft.com/ (that's the only url I see in your comments)?  I have spent a lot of time there ... and I will continue to do so.  I don't yet have my answer.  So, I guess I'm looking for more specific guidenace.  I have not yet got my hands on the book.  It is a good suggestion.  And, I will look for it.
0
 
KrishnaPGCommented:
Hello,

Use the ProcMon tool from http://download.sysinternals.com/Files/ProcessMonitor.zip to check the exact file that is missing. Then you can easily progress from there on.

All the best.

P.Gopalakrishna
http://www.geocities.com/krishnapg/
0
 
KrishnaPGCommented:
Hello,

To answer your other question:
How can I take a class written in C#, which exposes and COM interface, and install it on another machine such that a VB6 application can use it?

You need to do RegAsm for this. On the target machine, run RegAsm.exe on your C# assembly. It will register the COM classes on that machine. (This is similar to the RegSvr32.exe for the native COM dlls.)

Once you have registered with RegAsm.exe everything else is as usual. Just refer that Component in VB and let to create the object :)

All the best.

Yours,
P.Gopalakrishna
http://www.geocities.com/krishnapg/
0
 
dannykroukAuthor Commented:
Well, I see the consensus is converging on strong names and regasm.  I'm working on this now.  At the moment, I'm struggling through some issues with strong names for one assembly not being recognized by the assembly that it depends upon.  Let me work through this and report back.  I think we're on to something here.  Thanks to all for your support.
0
 
KrishnaPGCommented:

You can safely ignore the StrongName warning. (Unless this is COM+).

All the best.

Thank you,
P.Gopalakrishna.
http://www.geocities.com/krishnapg/

0
 
dannykroukAuthor Commented:
Thanks to all for your input and support.  In the end, I was able to get an installer to work for this sort of scenario.  However, that did not turn out to be the fundamental problem.  I had failed to correctly handle the differences in paths on the target install machines.  Once I identified that issue, things went much better. :-)
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.