未知发布者仍然出现在使用VS2010构建的正确代码签名的VSTO加载项上 [英] Unknown Publisher still appears on correctly code-signed VSTO addin built with VS2010

查看:339
本文介绍了未知发布者仍然出现在使用VS2010构建的正确代码签名的VSTO加载项上的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个用最新的Verisign代码签名证书(PFX)签名的OneClick部署VSTO加载项。我已经验证我可以通过电话上的Verisign支持正确签名-他们同意。我正在用VS2010构建。但是,当我尝试安装时,Addin显示未知发行者。

I have a OneClick Deployed VSTO Addin that I have signed with a up-to-date Verisign code-signing certificate (PFX). I have verified that I am signing correctly with Verisign support on the phone – they concur. I am building with VS2010. Nonetheless, the Addin shows "unknown publisher" when I try to install.

为什么?

如何用PFX证书上的发布者名称替换 Unknown Publisher ?

How can I replace "Unknown Publisher" with the name of the Publisher on the PFX certificate?

这是我为解决迄今为止的问题所做的工作:

This is what I have done to try to solve the problem to date:


  1. 找到了有关未知的问题 Addins上的Publisher问题。 对该问题的可接受答案讨论了使用 mage.exe 签署部署和应用程序清单。

  1. Found this question about "Unknown Publisher" issue on Addins. The accepted answer to that question discusses using mage.exe to sign the deployment and application manifests.

我使用了 mage.exe 将PFX签名应用于应用程序和部署无济于事;当我安装外接程序时,仍然显示 Unknown Publisher。直到那时,我才在VSTO Addin在2008年或更早版本基础上构建的最后一个链接的页面上看到MS程序经理的评论,该链接没有读取应用程序或部署清单。

I used mage.exe to apply the PFX signature to both the application and deployment manifests to no avail; "Unknown Publisher" still shows when I install the Addin. Only then did I see a comment by a MS program manager on the page of the last link that VSTO Addin's built under 2008 or earlier do not read either the application or deployment manifests.

然后,我在底部链接对此页面,并断言从VS2010开始,链接页面中指定的带有Publisher的VSTO Addin's现在将读取其清单,并在Addin安装时显示正确的Publisher名称。

Then I saw the same MS program manager's comment at bottom linking to this page and asserting that starting in VS2010 that VSTO Addin's with Publisher specified as given in the linked page will now have their manifests read and the correct Publisher name displayed upon Addin installation.

我已经完成了所有这些操作,并且在经过正确代码签名的OneClick部署中,发布者仍然显示未知发布者-为什么?

I have done all this and the publisher on my correctly code-signed OneClick Deployment still shows "Unknown Publisher" - why?

推荐答案

请按照以下步骤操作:


  1. 在本地计算机上安装证书。在Windows资源管理器中,右键单击证书文件,选择 Install PFX ,然后按照说明进行操作。

  1. Install the certificate on your local machine. In Windows Explorer right-click the certificate file, select Install PFX, and follow the instructions.

确保已对VSTO项目清单和程序集进行签名。在VSTO项目的签名选项卡上的属性中,应为签署ClickOnce清单选中(如果没有,请选择您的PFX文件)。还应检查签署程序集并使用相同的PFX文件。

Ensure the VSTO project manifest and assembly are signed. In the VSTO project's properties on the Signing tab, "Sign the ClickOnce manifests" should be checked (if not, select your PFX file). "Sign the assembly" should also be checked and using the same PFX file.

发布VSTO之后,您需要签署清单以及从命令行发布的.vsto文件。在运行mage.exe之前,您还需要将.dll从bin中复制到发布的文件夹中(以避免出现找不到文件错误)。为了安全起见,我强烈建议同时为两个.vsto签名。以下是执行这些步骤的命令行代码:

After publishing the VSTO, you'll need to sign the manifest and the published .vsto files from the command line. You will also need to copy the .dll's from the bin to your published folder before you run mage.exe (to avoid "File Not Found" errors). I highly recommend signing both .vsto's for safety's sake. Here is the command line code to perform these steps:

-

set AppPublishPath=bin\Release\app.publish
set AppPublishVersionPath=bin\Release\app.publish\Application Files\MyProjectName_1_0_0_0

set CertificatePath=C:\SignedCertificate.pfx
set CertificatePassword=password

copy bin\*.dll "%AppPublishVersionPath%"

mage -update "%AppPublishVersionPath%\MyProjectName.dll.manifest"  -certfile "%CertificatePath%"  -Password %CertificatePassword%
mage -update "%AppPublishVersionPath%\MyProjectName.vsto"  -appmanifest "%AppPublishVersionPath%\MyProjectName.dll.manifest" -certfile "%CertificatePath%"  -Password %CertificatePassword%
mage -update "%AppPublishPath%\MyProjectName.vsto"  -appmanifest "%AppPublishVersionPath%\MyProjectName.dll.manifest"  -certfile "%CertificatePath%"  -Password %CertificatePassword%

请参见下面的Nathan评论t一个可能的附加步骤。

See Nathan's comment below about a possible additional step.

这篇关于未知发布者仍然出现在使用VS2010构建的正确代码签名的VSTO加载项上的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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