re. How to prevent referencing the COM object after each compile

  • Thread starter Thread starter Phil Bradbury
  • Start date Start date
P

Phil Bradbury

I'm writing a COM object in C#, and testing in Excel. However, every time
the COM object is compiled the reference needs updating in Excel.

Does anyone know how to stop this??

Thank you
 
Phil,

In order to prevent this, you will want to apply a GUID attribute to the
class that you are creating as well as the assembly. These correspond to
the CLSID and the TYPELIBID for a COM server. By defining them, you prevent
the runtime from making them up every time.

Also, you should be defining interfaces which you then implement, and
interacting with the interfaces in Excel.

Hope this helps.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top