AnsweredAssumed Answered

How to Add COM Type Library Reference Dynamically

Question asked by on Feb 8, 2017
Latest reply on May 24, 2018 by wojciech_sieczkowski

Dear All ,

We have the Mentor Xpedition VX1.1 installed in our workstation ,and wrote some programs with VS2012 C# ,

Fisrtly, we add the COM Type Library Reference under "Solution -->Add Reference" ,we can find that COM version is;

Secondly, we wrote the following code which can be compiled and run successfuly on the host machine ;

But if we release the program and try to run it on another machine which has  another VX Version (VX2.1) installed ,it will throw a COM reference exception error (CLSID / ProgID unregistered)

It Means that ,we must re-compile the solution for each VX version (VX 1.1, VX 1.2,  VX 2.0 ,VX2.1 ,etc.) due to the COM Type Library updating.

Does any one know how to add the COM reference dynamically ?

Thanks in advance~