0

Using an Apache Ant task we generate and sign the manifests for a Microsoft ClickOnce VSTO deployment. For one specific ClickOnce install, we are getting the error:

The application could not be downloaded because a connection to the network could not be established.
Ensure that you can connect to the network, and try again.
at Microsoft.VisualStudio.Tools.Applications.Deployment.ClickOnceAddInDeploymentManager.DownloadAddIn(TimeSpan timeout)
at Microsoft.VisualStudio.Tools.Applications.Deployment.ClickOnceAddInDeploymentManager.InstallAddIn()
Guido Leenders
  • 4,232
  • 1
  • 23
  • 43

1 Answers1

1

The signtool.exe started from Apache Ant re-evaluates the contents of the directories. When you by accident include an executable (*.exe) in the directories, the error "The application could not be downloaded because a connection to the network could not be established." is raised by clickonce during installation of your product.

Background

During the signing and with an executable present, the header of the manifest in the folder with the DLL-s changes from

<entryPoint>
  <co.v1:customHostSpecified />
</entryPoint>

to:

<entryPoint>
  <assemblyIdentity name="Invantive.Estate.App" version="20141.0.14188.24543" language="neutral" processorArchitecture="msil" />
  <commandLine file="Invantive.Estate.App.exe" parameters="" />
</entryPoint>

That there is an error is correct because the manifest is not what I intended, but the message text is a little confusing.

Guido Leenders
  • 4,232
  • 1
  • 23
  • 43