Trying to create COM object in executable and use it in C# project:
Creating COM in executable.
Adding class:
Compiles and runs without problem.
Trying to use in C# project and got failure. Self-registration for project... failed. What might be wrong? VS started as admin.
You should add a reference to the type library of the server in your C# project to be able to use it :
References
in the solution explorer and click Add a reference
ComTstLib
in your example )At deployment time, you just need to ensure that your com server is already installed on the client machine.
See also msdn