See the question and my original answer on StackOverflow

Regasm doesn't come with Visual Studio, but with the .NET Framework itself. So you can find it in paths like

C:\Windows\Microsoft.NET\Framework\v4.0.30319

to register your dll in the 32-bit part of the registry and

C:\Windows\Microsoft.NET\Framework64\v4.0.30319

to register your dll in the 64-bit part of the registry.

If you build your dll as "Any Cpu", you can register it for both 32 and 64 bit part of the registry.