Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unable to cast COM object of type 'System.__ComObject

I'm getting the following error when I attempt to publish an XNA project in Visual Studio 2010.

Error 1 Publish failed with the following error: Unable to cast COM object of type 'System.__ComObject' to interface type 'Microsoft.VisualStudio.OLE.Interop.IServiceProvider'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{6D5140C1-7436-11CE-8034-00AA006009FA}' failed due to the following error: No such interface supported (Exception from HRESULT: 0x80004002 (E_NOINTERFACE)). 1 1 Asteroids

I've tried registering actxprxy.dll and ieproxy.dll as others have suggested, but I continue to get this error.

I get this error with a blank XNA Game template, as well as a completed XNA game.

I am able to Build and Debug the same projects fine.

like image 924
Gavin Gassmann Avatar asked Jan 01 '12 18:01

Gavin Gassmann


1 Answers

there is a discussion that claims that this is due to "registry corruption". One of the comments proposes a "nuclear" solution of re-registering every single OCX and DLL in the System32 folder:

for %1 in (%windir%\system32\*.dll) do regsvr32 /s %1
for %1 in (%windir%\system32\*.ocx) do regsvr32 /s %1

Perhaps it could solve your problem.

like image 154
David Airapetyan Avatar answered Nov 04 '22 04:11

David Airapetyan