Issues debugging COM registered components

HI

I am currently looking to expose some of my c# application functionality to excel. I have set "Register for COM Interop" to true and set the start up application to excel. This allows me to run and step through the project debugging the code very nicely, however, every time I run the project I have to reset the dependency within the VBA window in excel. I am guessing that it is registering the component with different guids every time it compiles. Is there any way to stop this from happening I have tried setting the Guid attribute for the assembly and all public classes as well as setting the COMVisible attribute to false for all non public classes.

Please help out if you can

Thanks

Iain



Answer this question

Issues debugging COM registered components

  • Eric1965

    You can set an explicit version number for the AssemblyVersion attribute (in AssemblyInfo.cs if you're using C#): "1.0.0.0" rather than "1.0.*"
  • imLex

    Thanks for the reply

    I had already tried that and it still was not working. I got around it in the end by using late binding in Excel. Late binding works fine but it still looses its reference every time I compile if I use early binding....

    thx

    Iain


  • Issues debugging COM registered components