1

I get the following error while trying to publish a wpf clickonce application.

Error 1 Publish failed with the following error: Unable to cast COM object of type 'EnvDTE.DTEClass' 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)).

The error happens if I try to publish to an FTP site and also if I try and publish to the local file systems.

Any ideas? Googling doesn't seem to produce any useful results.

Joel Coehoorn
  • 399,467
  • 113
  • 570
  • 794
Peter Stephens
  • 1,040
  • 1
  • 9
  • 23

2 Answers2

1

This EXACT error was solved in my case by just running the following command:

regsvr32  "C:\Program Files (x86)\Internet Explorer\ieproxy.dll" 

or for 32bit windows:

regsvr32 "C:\Program Files\Internet Explorer\ieproxy.dll"

More info: The issue turned out to be broken registration for IServiceProvider. The proxy-stub CLSID was wrong (it was referring to actxprxy.dll instead of ieproxy.dll on Windows 7 x64).

Extracted from: http://blogs.msdn.com/b/smondal/archive/2012/10/02/unable-to-cast-com-object-of-type-system-comobject-to-interface-type-microsoft-visualstudio-ole-interop-iserviceprovider.aspx

Hernexto
  • 11
  • 1
1

The EnvDTE.DTEClass is some functionality that should be provided by Visual Studio. I have a few suggestions:

  1. Create a new WinForms project (just an empty Form) and try to publish that.
  2. Try Repairing or Reinstalling VS
  3. Have a lookt at Building ClickOnce Applications from the Command Line
H H
  • 263,252
  • 30
  • 330
  • 514
  • Option 2 is probably the problem. I'll have to investigate that. Option 3 would be good to try too. MAGE shouldn't spit out EnvDTE errors, so it might work from the command line. I need to learn MSBuild anyway, so... – Peter Stephens Mar 15 '09 at 18:39
  • Option 1 didn't work. Option 3 worked! I'm going to retry option 2 and see if that helps. Such a pain though. – Peter Stephens Mar 15 '09 at 21:42
  • had a similar problem and just got it to work from the command line (3) on my new development machine. Hurray! Now I don't have to abandon my users and I can publish bug fixes without having to boot up my old dev machine. – Jared Updike Jul 15 '10 at 22:01