.net – Failed while publishing clickonce application

clickoncenetwpf

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.

Best Answer

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
Related Topic