.netregasm

regasm just doesn't work


For every example of registering .NET COM objects in the web, I see the tool "regasm" for doing the job. Everybody does so!!!
But it never worked for me! I am tired of trying to overcome it! My only solution would be regsvr32, which requires a function which I could only define in C++.
Please tell me why wouldn't it just work!!!

Considering that it doesn't work on all 4 of my computers, plus 3 virtual machines, running Windows 7 down to 2000, can anyone show me a working example of a regasm call? I think I am an idiot.


Solution

  • Registering [ComVisible] .NET assemblies with Regsvr32.exe is not possible. It doesn't have the required DllRegisterServer entrypoint that Regsvr32 needs. You will have to make it work with Regasm.exe or a Setup project. The latter is necessary when you deploy your server to another machine.

    There are few failure modes. Other than:

    Just getting the assembly grossly wrong is of course possible too. Like not making one or more interfaces and/or classes [ComVisible].