i have created a com class library with vb.net. i have registered the dll with regasm. Then i imported and used it to a vb6 project. I have noticed that if i unregister the library and register it again then i get the following error:
Run-time error ‘-2147024894 (80070002)’: Automation error.
In order to make the library usable again, i have to rebuilt the library with different ClassId, InterfaceId, EventsId at the classes and then register the new dll.
is this happening on purpose and this should be the functionality or am i doing something wrong?
Thanks in advance.
PS: it also does the same thing if i overwrite the registered file with the same file or if i rename its folder and then rename it back to its previous name. Rebuid and re-registered is needed.
You need to use the
/codebasecommand line when registering if you are not installing your assembly into the GAC (it must be strong-named to be able to do this)Check out the Regasm reference for more info