无法运行Excel VSTO加载项 [英] Unable to run Excel VSTO Add-ins

查看:1292
本文介绍了无法运行Excel VSTO加载项的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

尝试运行Excel 2013 VSTO加载项项目,并且我继续收到一条错误:


系统.Security.SecurityException:由于尚未选择信任的发布者签名,因此无法安装此解决方案。如果您信任发布者,请将证书添加到受信任的发布者列表。


该项目具有密钥文件,带有签名算法sha256RSA,并由Windows用户颁发证书。



任何想法如何解决?

解决方案

发布的解决方案这里


$ b $对于我自己,我开发了一个Excel VSTO AddIn,它具有一个自定义的Setup.exe提供的自签名不可信证书,然后安装在属于某些最终用户的计算机上。我无法控制这些机器,因为最终用户只需从公共网站下载我的Setup.exe。在安装后,.vsto的路径是本地文件路径,所以我不需要一个Web服务器作为主机。



在我的情况下,以下代码我的Setup.exe)足以成功地信任Excel VSTO:

  UserInclusionList.Add(new AddInSecurityEntry(new Uri(vstoFilePath) ,
< RSAKeyValue><模数> ...< / Modulus>< Exponent> ...< / Exponent>< / RSAKeyValue>));

相应的< RSAKeyValue> 可以在.vsto文件中找到。


Trying to run an Excel 2013 VSTO Add-ins project, and I keep on getting an error that says that:

"System.Security.SecurityException: The solution cannot be installed because it is signed by a publisher whom you have not yet chosen to trust. If you trust the publisher, add the certificate to the Trusted Publisher list."

The project has a key file with signature algorithm sha256RSA and certificate issued to/by the Windows User.

Any idea how to get around this ?

解决方案

Try the solutions from the postings here.

As for myself, I've developed an Excel VSTO AddIn with a self-signed untrusted certificate that is delivered by a custom Setup.exe which is then installed on machines that belong to some end-users. I have no control over these machines because the end-users just download my Setup.exe from a public website. After setup the path of the .vsto is a local file path so I don't need a web server as a host.

In my case the following code (placed in my Setup.exe) is enough to successfully trust the Excel VSTO:

UserInclusionList.Add(new AddInSecurityEntry(new Uri(vstoFilePath),
    "<RSAKeyValue><Modulus>...</Modulus><Exponent>...</Exponent></RSAKeyValue>"));

The corresponding <RSAKeyValue> can be found in your .vsto file.

这篇关于无法运行Excel VSTO加载项的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆