Possible Duplicate:
How do I register a COM DLL written in C# with Regsvr32?
I have written a DLL in C# (.Net 4 using VS2010). I have ticked the boxes to make it COM visible and register for COM interop. I then saved the DLL and associated files to the c:\Program Files\MyCode directory.
When I run regsvr32 for the DLL (I want to use it in an Excel VBA project), I get the above error message. I am running Windows XP with SP3. I have searched on the other threads with the same problem but have not found anything useful.
Any thoughts would be appreciated.
John.
I believe what you want is regasm, not regsvr32: http://msdn.microsoft.com/en-us/library/tzat5yw6(v=vs.71).aspx
If you're building a 32-bit assembly, be sure to run this regasm:
C:\Windows\Microsoft.NET\Framework\v4.0.30319\RegAsm.exe
If you're building a 64-bit assembly, run this regasm:
C:\Windows\Microsoft.NET\Framework64\v4.0.30319\RegAsm.exe