Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Visual Studio.NET / Extensibility / February 2006

Tip: Looking for answers? Try searching our database.

Migrating VS2003 to VS2005

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Boni - 01 Feb 2006 15:04 GMT
Dear all,
I get following error, when I try to call dll compiled in VS2003 inside
addin in VS2005 environment:
System.InvalidCastException: Unable to cast COM object of type
'System.__ComObject' to interface type
'Microsoft.VisualStudio.VCProjectEngine.VCProject'. This operation failed
because the QueryInterface call on the COM component for the interface with
IID '{70B6C8E7-5B3E-49C7-9937-C5F0B3168AF3}' failed due to the following
error:
(Exception from HRESULT: 0x80004002 (E_NOINTERFACE)).
May be somebody already had this?
Thanks a lot,
Boni
Carlos J. Quintero [VB MVP] - 01 Feb 2006 17:07 GMT
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...

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.