views:

395

answers:

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.

+1  A: 

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
Henk Holterman
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
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
@Henk: 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