I would like to append to Strillo's answer, but I don't have the reputation required to add a comment.
I was getting the same behavior as shtpavel, until I manually registered the COM dll. Once I registered the COM dll, Strillo's answer worked for me.
regasm /tlb /codebase project.dll
Regasm can be found at:
C:/WINDOWS/Microsoft.NET/Framework/v4.0.30319/RegAsm.exe
The Build tab of the project settings view, under the Output title there is a "Register for COM interop" checkbox. I have proved to myself this does register the COM dll, but again Strillo's answer did not work for me until I manually registered the dll using the above command.
RegAsm - When is the /codebase option applicable? states that Visual Studio's "Register for COM interop" checkbox is the same thing as my command line solution. But my experience is, initially the "Register for COM interop" was not enough. Don't know why.