Google Answers Logo
View Question
 
Q: how to avoid loosing reference to com object made in C# ( No Answer,   1 Comment )
Question  
Subject: how to avoid loosing reference to com object made in C#
Category: Computers > Programming
Asked by: sharon_de_salmon-ga
List Price: $2.00
Posted: 04 Oct 2004 00:44 PDT
Expires: 05 Oct 2004 07:42 PDT
Question ID: 409978
I make a com object in c# using "COM interop"
I wrote a test for it in VB6.0
every time i rebuild the c# com object i loose the reference to it in
the vb project.
is there a way i can avoid that annoying issue ?

Request for Question Clarification by mathtalk-ga on 04 Oct 2004 10:16 PDT
Hi, sharon_de_salmon-ga:

I suspect that the problem is that the GUIDs change each time the
component is built, and thus the registery entry gets overwritten.

Can you verify this (by checking the registery entries for the
component before and after C# recompilation)?

regards, mathtalk-ga

Clarification of Question by sharon_de_salmon-ga on 05 Oct 2004 07:42 PDT
yes the problem is probebly is that the guid was changing all the time.
I managed to solve it by adding attribute to the Assembly.cs file like:
[assembly: Guid("9EEC131F-53C7-4296-97C3-36B7E9984801")]

that is probably what causes the .tlb file to have static guid.
Answer  
There is no answer at this time.

Comments  
Subject: Re: how to avoid loosing reference to com object made in C#
From: frde-ga on 04 Oct 2004 02:13 PDT
 
I am not sure with C#
However I would look into 'Binary Compatibility'
Check that out in VB and I reckon you'll find a similar option in .NET

Important Disclaimer: Answers and comments provided on Google Answers are general information, and are not intended to substitute for informed professional medical, psychiatric, psychological, tax, legal, investment, accounting, or other professional advice. Google does not endorse, and expressly disclaims liability for any product, manufacturer, distributor, service or service provider mentioned or any opinion expressed in answers or comments. Please read carefully the Google Answers Terms of Service.

If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you.
Search Google Answers for
Google Answers  


Google Home - Answers FAQ - Terms of Service - Privacy Policy