Hello. I have created a dll in C# and set it up for interop use. It works well and I can access the dll from Visual Basic 6 via COM as expected. However, I seem to be getting hung up on one issue. This issue doesn't keep the project from working, however it is a major inconvenience.
In VB6, I could enable "binary compatibility" in the project build options. This means that unless I changed functions and parameters for the dll, a simple code edit and re-compile of the dll wouldn't mean a new class ID would be generated. However, in C#, I am not finding a way to achieve the same thing.
If I make NO changes in my C# dll, but re-compile it, the compatibility is broken and all other applications that have a reference to the dll will be broken. So each time I re-compile the C# dll, I have to open all existing programs that reference the dll, remove the reference, then re-add it.
Is there a way I can preserve the compatibility when I re-compile I have searched on this for hours with no success.
Thanks in advance.
Jeff

Preserving compatibility with C# interop dll
Kindred2k6
Several more hours of searching the web and many cups of coffee have revealed the solution. I will post it here in hopes that it will help someone else in the future having the same problem.
Inside of the namespace in your class, paste the following code:
[GuidAttribute("xxxxxxxxxxxxxxxxxxxxxxxxxxx")]
Next, in the C# project in Visual Studio, click "Tools", then "Create GUID". Select option number 4: "Registry Format", then click the "Copy" Button. Click "Exit". This copies the GUID of the project into the clipboard.
Replace the "xxxxxxx" with your GUID from the clipboard. When you compile the project or use REGASM to register it, .net will use that same GUID ID every time which will preserve compatibility.
I would like to thank and credit Robert Gelb and vbrad.com for the great write-up on this available here: http://www.vbrad.com/article.aspx id=46
Bala Sekhar
Jeff,
Could you mark your own reply as 'answer'. This makes it easier for other people to find solution for their problems (and it stops the post from showing up in the 'unanswered' posts list).
Thx