c# - 如何使用 mage.exe 为 VSTO 重新分配 list ?

标签 c# clickonce mage

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

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

因此, list 和 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 ... 和其他一些组合,它们都会导致 broker 或当我尝试启动 VSTO 时 list 无效,例如

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

有什么知道在重新签署 VSTO 时与 mage.exe 一起使用的正确签署顺序和标志吗?

最佳答案

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

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

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

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

关于c# - 如何使用 mage.exe 为 VSTO 重新分配 list ?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37141247/

相关文章:

c# - 如何从不同类中的计时器事件处理程序更新标签文本?

.net - ClickOnce 错误 : Value does not fall within the expected range

clickonce - Mage.exe 独立使用

zend-framework - 查找Magento的主题文件

c# - 这个 C# 语法叫什么,它有什么作用?

c# - 为什么自定义控件任务 Pane 不更新其属性?

c# - 每当有 UI 交互时,如何防止 CommandManager 调用 CanExecute?

c# - 无法安装或运行应用程序 - System.Windows.Interactivity 版本 4.0.0.0

c# - 该应用程序要求首先在全局程序集缓存 (GAC) 中安装程序集 Microsoft.ReportViewer.WinForms 版本 11.0.0.0

clickonce - 使用 mage.exe 和 Sha256 时间戳服务器 url 对 ClickOnce 应用程序进行签名