I had this problem in the past, and this was due to the fact that both processes were not 32 or 64 bits. If you are using a 32-bit OS, you can stop reading now because what I am saying does not apply.
Use regedit to try to find your ProgIds and CLSID in the registry. If your C ++ project is 32-bit, make sure your C # classes have been registered in the 32-bit hive - HKEY_CLASSES_ROOT \ Wow6432Node. If your C ++ project is 64-bit, make sure your C # classes have been registered in the 64-bit hive - HKEY_CLASSES_ROOT.
If you need to register with a 64-bit hive, you may need to call the version of RegAsm.exe in the c: \ windows \ microsoft.net \ framework64 directory ...
Another possibility to make a mistake is that you may need to run regasm.exe.NET 4.0. If you simply type "regasm" at the command line, this will give you the version of regasm that you are using. You may need to enter the full path of regasm version 4.0 4.0 - find it in the c: \ windows \ microsoft.net \ framework \ v4.0.3019 \ regasm.exe directory.
Joseph Willcoxson
source share