我们的 Visual Studio 解决方案中有一个 Excel 插件。该插件构建一次,然后作为我们 CI/CD 流程的一部分部署到不同的环境(dev、uat、prod)。
在部署期间,我们应用应用配置转换以使用正确的环境配置更新 Excel 插件配置。
因此, list 和 VSTO 需要辞职。我浏览了许多 SO 帖子(Use mage.exe to create a ClickOnce deployment manifest for *.deploy files、Resign manifest of click-once application change from 4.0 to 4.5、Resign 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/