There are a lot of manual steps involved so it easy to miss one. It rather depends on how you imported the type library, there's more than one way to do it. If you picked the reference from the Add Reference + COM tab then the likely mistake is that you forgot to re-register the new COM server. Or you accidentally picked the old one instead of the new one, which can happen when you change the guids, like you should, and forgot to cleanup the old one. Cleaning up is pretty important and easily missed since it needs to be done before you rebuild the COM server. You can end up with a lot of garbage in the registry.
And yes, using Tlbimp.exe directly is the most reliable way to avoid accidents. Since you run it directly on the type library and don't use the registry at all.
A recipe for having the least possible amount of trouble could look like this:
- Unregister the old COM server first by running regsvr.exe -u
- Delete the old DLL and TLB files
- Change the IDL to add your new method
- Assign a new IID for the interface you changed
- Assign a new CLSID for the coclass that uses the interface
- Increment the library version
- Change the name of the output DLL, favor including the major+minor version in the name
- Build the new COM server
- Register the server with regsvr32.exe
- Run Tlbimp.exe to generate the interop library
- Remove the reference to the old interop library in your .NET project
- Use Add Reference + Browse to add the new interop library
Skipping any of these steps can invoke build trouble, registry pollution, DLL Hell and having an all-around lousy wrecked day without getting anything done.