We have a C# class library (with interfaces and classes dervied from them).
This is refernced in a VB6 application and everything is fine.
Currently if the library is modified, then VB6 reference to that library
needs to be changed and VB6 app needs to be rebuilt for changes to be seen.
Is there anyway that we could decouple them? I mean modify the c# library
independent of VB6 app. After modifying the c# library, it just needs to be
copied to a directory where VB6 looks for that without changing the reference
or rebuilding it. Please give some pointers.
shesh - 22 Sep 2005 19:49 GMT
There is no issue when interop is between VB6 and VB.Net. Is it something
that is not supported in C#?
Mattias Sjögren - 22 Sep 2005 19:54 GMT
>Currently if the library is modified,
What kind of modifications are you doing? If you make breaking changes
to any interface the GUIDs will change, and that's a good thing. They
should remain the same as long as you only change implementation
details. You can always manually assign fixed GUIDs with the Guid
attribute on a type or the assembly.
Mattias

Signature
Mattias Sjögren [MVP] mattias @ mvps.org
http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
Please reply only to the newsgroup.
shesh - 22 Sep 2005 20:20 GMT
Thanks Mattias. I assigned fixed GUIDs to the interfaces and classes. How do
I assign fixed GUID to the C# assembly?
Mattias Sjögren - 22 Sep 2005 20:54 GMT
>Thanks Mattias. I assigned fixed GUIDs to the interfaces and classes. How do
>I assign fixed GUID to the C# assembly?
[assembly: Guid("...")]
it becomes the LIBID for the typelib.
Mattias

Signature
Mattias Sjögren [MVP] mattias @ mvps.org
http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
Please reply only to the newsgroup.
shesh - 22 Sep 2005 21:22 GMT
Thanks Mattias. I did this and everything worked fine. I even added a new
class, new mthod to the existing class in the .net dll but there was no need
to rebuild VB6 app. That's really great. Thanks again.
> >Thanks Mattias. I assigned fixed GUIDs to the interfaces and classes. How do
> >I assign fixed GUID to the C# assembly?
[quoted text clipped - 4 lines]
>
> Mattias