How to create a HelloWorld COM Interop in Visual Studio 2012

Try following these steps:

  1. Make sure both projects, unmanaged C++ and managed C# have the same bitness, either x86 or x64. Let’s say it’s x86, for clarity.
  2. Open Admin Command Prompt and register your COM DLL: C:\Windows\SysWOW64\regsvr32.exe c:\full-path\ComLib.Interop.dll
  3. Run Visual Studio as Admin. Do steps 1,2,4,5,6. Don’t do 3.

See if you get to 7. I think that should work.

Note you only need the registration on the Development machine. Isolated COM should work everywhere else.

Leave a Comment