Closed wangrongwei closed 4 years ago
是下面哪种安装方式?
目前我在 Office365 上基于 commit 61961bc 测试过上述两个方案,均无问题。
已经更新了 pre-release v0.2 ,如果之前是老旧的 v0.1 的话,可以试试新版程序。 @wangrongwei
hi,
我贴出报错的log信息:
名称: 公式与代码
从: file:///D:/home/code/公式与代码 v0.2/公式与代码.vsto
************** 异常文本 **************
System.Security.SecurityException: 此应用程序中的自定义功能将不起作用,原因是用于为 公式与代码 的部署清单签名的证书或其位置不受信任。请向管理员寻求进一步帮助。
在 Microsoft.VisualStudio.Tools.Applications.Deployment.ClickOnceAddInTrustEvaluator.VerifyTrustPromptKeyInternal(ClickOnceTrustPromptKeyValue promptKeyValue, DeploymentSignatureInformation signatureInformation, String productName, TrustStatus status)
在 Microsoft.VisualStudio.Tools.Applications.Deployment.ClickOnceAddInTrustEvaluator.VerifyTrustUsingPromptKey(Uri manifest, DeploymentSignatureInformation signatureInformation, String productName, TrustStatus status)
在 Microsoft.VisualStudio.Tools.Applications.Deployment.ClickOnceAddInDeploymentManager.ProcessSHA2Manifest(ActivationContext context, DeploymentSignatureInformation signatureInformation, PermissionSet permissionsRequested, Uri manifest, ManifestSignatureInformationCollection signatures, AddInInstallationStatus installState, TrustStatus sha256TrustStatus, X509Certificate2 sha256PublisherCert)
在 Microsoft.VisualStudio.Tools.Applications.Deployment.ClickOnceAddInDeploymentManager.VerifySecurity(ActivationContext context, Uri manifest, AddInInstallationStatus installState)
在 Microsoft.VisualStudio.Tools.Applications.Deployment.ClickOnceAddInDeploymentManager.InstallAddIn()
失败的程序集的区域是:
MyComputer`
第一个版本,我两种方案都试了,都出现上面的情况;
第二个版本刚才试了一下,第一个安装方式也是出现上面的问题
补充: 我用的是 Office 2016
@LittleNewton
@wangrongwei
果不其然,是证书的问题。非常抱歉。
因为我不是微软的开发者,没有属于自己的 X509 证书,所以这个插件只能在安装了我自己签名的根证书之后才能运行,当然,这会带来很多安全问题。
这里我给出的建议是:下载该仓库,然后自己安装 Visual Studio 2019 以及 VSTO 开发者套件,自行编译,并安装属于你自己的根证书,这样的话就可以使用了。毕竟我不能要求大家都安装我发行的根证书,那样是不合要求的。
如果不过多考虑安全问题的话,可以这样做:
Equation_and_Codebox/src/Equation and Codebox_TemporaryKey.pfx
这个根证书。完成了上述步骤,或许就可以正常安装该 VSTO 插件了。
我争取考完试之后,完善一下安装难题。
Hi, 非常感谢,我按照你的步骤已经解决安装问题,现在可以正常使用 nice!
感谢,我也开发了一个小的工具,也是这样的问题,在你这儿找到解决办法了。
Hi, 我在使用过程中出现:Equation and Codebox.dll不是有效的Office加载项 以上是我在office2016选项中进入COM加载项,选择上面的.dll文件说出现的
不知是否是我的使用方法错误,还是这个插件有office位数要求
thx