.NET Com Interop Assembly problem

sthsth Member Posts: 3
Hi

I have developed a COM Interop Assembly in VS2005.

My problem is, that if i change something in the VS2005 project and recompile, all my Automation variables seem to loose the reference to the Automation method.
After the registration the Subtype of each variable writes "Assembly name".Unknown

Does anyone know how to fix the ID of an assembly method, so that i can slove this problem??

Comments

  • wakestarwakestar Member Posts: 207
    it would be interesting to see how the .net code of your wrapper looks like...
  • sthsth Member Posts: 3
    Hi again

    I think i solved this one!

    I inserted a fixed Guid for all my classes & interfaces.. and then my NAV variables could hold their class references..

    My class/interface declarations look something like this.

    [assembly: CLSCompliant(true)]
    namespace MyTools
    {
    [Guid("817436F0-F2CF-4224-9A16-DA9E9E2D92EF")]
    [InterfaceType(ComInterfaceType.InterfaceIsIDispatch)]
    public interface ITools
    {

    }

    [ClassInterface(ClassInterfaceType.None)]
    [Guid("8DECAD88-3C5A-47f6-A836-98B288C0FF5B")]
    [ComVisible(true)]
    public class Tools : ITools
    {

    }
    }
  • wakestarwakestar Member Posts: 207
    sth wrote:
    I inserted a fixed Guid for all my classes & interfaces.. and then my NAV variables could hold their class references..

    makes sense, otherwise the guid is generated randomly
Sign In or Register to comment.