【问题标题】:How to use mage.exe to resign manifests for VSTO?如何使用 mage.exe 为 VSTO 辞职清单?
【发布时间】:2016-05-10 14:20:28
【问题描述】:

我们有一个 Excel 插件作为我们的 Visual Studio 解决方案的一部分。该插件构建一次,然后作为我们 CI/CD 流程的一部分部署到不同的环境(dev、uat、prod)。

在部署期间,我们应用应用配置转换以使用正确的环境配置更新 Excel 插件配置。

因此,清单和 VSTO 需要辞职。我浏览过许多 SO 帖子(Use mage.exe to create a ClickOnce deployment manifest for *.deploy filesResign manifest of click-once application change from 4.0 to 4.5Resign Clickonce manifest using mage.exe 等)和 MSDN 帖子,但无法找到正确的方法来调用 mage.exe 以使其正常工作。

我尝试了mage.exe -update ...mage.exe -sign ... 和其他一些组合,这些组合在我尝试启动 VSTO 时都会导致代理或无效清单,例如

C:\Tools\mage.exe -update "$CodeBasePath\MyCompany.vsto" -certFile "$CertFile" -password "$CertPassword" -appManifest "$AppManifestPath"

在重新签署 VSTO 时,是否知道正确的签名顺序和与mage.exe 一起使用的标志?

【问题讨论】:

    标签: c# clickonce mage


    【解决方案1】:

    在更新 VSTO 文件之前,您需要先更新应用程序清单。

    mage -update yourFile.dll.manifest -CertFile certificate.pfx -Password 密码

    然后您需要使用您已更新的应用程序清单更新 VSTO。

    mage -update yourFile.vsto -appmanifest yourFile.dll.manifest -CertFile certificate.pfx -Password password

    【讨论】:

      猜你喜欢
      • 2017-03-27
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-06-24
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多