System.Security.SecurityException: Cannot instal the software

Published on Tuesday, August 23, 2022 by Milos Gregor


Read this post if you get at the installation this error message: "System.Security.SecurityException: Customized functionality in this application will not work because the certificate used to sign the deployment manifest for GISXL or its location is not trusted. Contact your administrator for further assistance."

Sometimes you can have a problem to install the add-in. You can get this error message:

************** Exception Text **************
System.Security.SecurityException: Customized functionality in this application will not work because the certificate used to sign the deployment manifest for GISXL or its location is not trusted. Contact your administrator for further assistance.
at

Microsoft.VisualStudio.Tools.Applications.Deployment.ClickOnceAddInTrustEvaluator.VerifyTrustPromptKeyInternal(ClickOnceTrustPromptKeyValue promptKeyValue, DeploymentSignatureInformation signatureInformation, String productName, TrustStatus status)
at

Microsoft.VisualStudio.Tools.Applications.Deployment.ClickOnceAddInTrustEvaluator.VerifyTrustUsingPromptKey(Uri manifest, DeploymentSignatureInformation signatureInformation, String productName, TrustStatus status)
at

Microsoft.VisualStudio.Tools.Applications.Deployment.ClickOnceAddInDeploymentManager.ProcessSHA2Manifest(ActivationContext context, DeploymentSignatureInformation signatureInformation, PermissionSet permissionsRequested, Uri manifest, ManifestSignatureInformationCollection signatures, AddInInstallationStatus installState, TrustStatus sha256TrustStatus, X509Certificate2 sha256PublisherCert)
at

Microsoft.VisualStudio.Tools.Applications.Deployment.ClickOnceAddInDeploymentManager.VerifySecurity(ActivationContext context, Uri manifest, AddInInstallationStatus installState)
at

Microsoft.VisualStudio.Tools.Applications.Deployment.ClickOnceAddInDeploymentManager.InstallAddIn()
The Zone of the assembly that failed was:
MyComputer

In this case follow these steps:

  • download installation ZIP file
  • right-click on the file and from the context menu click on the "Properties" menu item
  • check the "Unblock" check-box and press the OK button
  • unzip the file and install the software

In the case this does not help, you can also try the second option:

  • right-click on setup.exe
  • select properties then the Digital Signatures tab
  • select "Miloš Gregor" then click Details
  • Click View Certificate and Click Install Certificate. Do not let it automatically choose where to store the cert, install the certificate in the Trusted Root Certification Authorities Store.