Hi Boni,
> I get following error, when I try to call dll compiled in VS2003 inside
> addin in VS2005 environment:
Which compiled dll? Your own? Do you have the code and the line that is
crashing?
> System.InvalidCastException: Unable to cast COM object of type
> 'System.__ComObject' to interface type
> 'Microsoft.VisualStudio.VCProjectEngine.VCProject'. This operation failed
You can use
Typeof obj Is Microsoft.VisualStudio.VCProjectEngine.VCProject
to test if the cast is valid.
Also, you can use Microsoft.VisualBasic.Information.TypeName(obj) to get the
underlying class behind a System.__ComObject. Maybe it is not a VCProject
after all...

Signature
Best regards,
Carlos J. Quintero
MZ-Tools: Productivity add-ins for Visual Studio
You can code, design and document much faster:
http://www.mztools.com
Boni - 03 Feb 2006 12:19 GMT
Hi Carlos,
I found the reason VCCompilertool , pchOption has changed there is no more
"Auto" option.
Thanks,
Boni
> Hi Boni,
>
[quoted text clipped - 17 lines]
> the underlying class behind a System.__ComObject. Maybe it is not a
> VCProject after all...