while opening a project, I had this error in my Visual Studio 2003 but clearly it can happen in other versions as well.
Here is the registry command:
regsvr32.exe "c:\Program Files\Common Files\Microsoft Shared\MSEnv\dte.olb"
Enjoy coding!