0

We have ClickOnce app. It is generated through Azure Pipelines with /p:target=publish. Because of different environments (even closed networks) there is an web app which you can download setup.exe file.

Using mage.exe before the download, the InstallUrl and DeploymentUrl are changed based on the current instance Base Uri. This is done with ASP.NET Core WebAPI.

Changing deployment url and install URL is done as follows:

mage.exe -update {manifestFullPath} -ProviderUrl {finalUri}

And changing the URL of setup.exe

[PATH]\setup.exe /url="BaseUri"

where BaseUri is pointing to the controller.

Here, I know I have to resign the application manifest of the current version and the base .application which I'm doing with mageui.exe at the moment.

The Controller is invoked, but the moment it has to start downloading the binaries I get

Reference in the deployment does not match the identity defined in the application manifest

Why is that and how to fix it?

Expressingx
  • 1,480
  • 1
  • 14
  • 39
  • Check [this doc](https://learn.microsoft.com/en-us/visualstudio/deployment/troubleshooting-specific-errors-in-clickonce-deployments?view=vs-2019#during-update-you-receive-an-error-that-has-the-following-log-entry-the-reference-in-the-deployment-does-not-match-the-identity-defined-in-the-application-manifest).After using `mage.exe` to update the URL, the manifests could have some changes. You could check the `assemblyIdentity ` in deployment and application manifests . You need to make sure that the parameters are in sync. – Kevin Lu-MSFT Jun 17 '20 at 08:54
  • Thats the weird part, they are identical. – Expressingx Jun 17 '20 at 10:14
  • It's indeed weird. Check this [ticket](https://stackoverflow.com/a/30338369/13464420). You may try to add `/P:UseManifestForTrust="true"` to the Msbuild arguments. Then you could check if it could help. – Kevin Lu-MSFT Jun 19 '20 at 09:52

0 Answers0