部署项目时的PublicKey问题 [英] PublicKey issues when deploying the project

查看:82
本文介绍了部署项目时的PublicKey问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在部署项目时遇到以下问题:

I have the following problem when deploying the project:

警告 8 Microsoft Report"中PublicKey"属性的值Viewer 2012 Runtime' 与文件 'C:\Program Files 不匹配(x86)\微软SDKs\Windows\v8.0A\Bootstrapper\Packages\ReportViewer\ReportViewer.msi'.

Warning 8 The value of the 'PublicKey' attribute in 'Microsoft Report Viewer 2012 Runtime' does not match that of file 'C:\Program Files (x86)\Microsoft SDKs\Windows\v8.0A\Bootstrapper\Packages\ReportViewer\ReportViewer.msi'.

其他组件也一样:

警告 6 Microsoft® System"中PublicKey"属性的值SQL Server® 2012 (x86)'的 CLR 类型与文件的类型不匹配'C:\Program Files (x86)\MicrosoftSDKs\Windows\v8.0A\Bootstrapper\Packages\SqlClrTypes_x86\SQLSysClrTypes.msi'.

Warning 6 The value of the 'PublicKey' attribute in 'Microsoft® System CLR Types for SQL Server® 2012 (x86)' does not match that of file 'C:\Program Files (x86)\Microsoft SDKs\Windows\v8.0A\Bootstrapper\Packages\SqlClrTypes_x86\SQLSysClrTypes.msi'.

不能忽略此警告,因为它会在其他设备上安装软件时产生问题.

This warning can not be ignored since it creates problem when installing the software on the other device.

推荐答案

Visual Studio 检查名为 Product.xml 的文件以获取有关安装程序先决条件的详细信息.此文件将与警告中引用的安装程序位于同一位置.

Visual Studio checks a file called Product.xml for details about installer prerequisites. This file will be in the same location as the installer cited in the warning.

对于每个警告,您需要更新 PackageFile 属性 PublicKey 以匹配您正在使用的安装程序.随着新版本的出现,签名可能会发生变化,但 Product.xml 不包含在新的安装程序版本中,因此它并不总是匹配.

For each warning you need to update the PackageFile property PublicKey to match the installer you are using. As new versions come out, the signature might change but the Product.xml is not included with new installer version and thus it doesn't always match.

要解决此问题:

更新包数据

  • 打开[Program Files]\Microsoft SDKs\Windows\$Version\Bootstrapper\Packages\$PackageName 文件夹
  • 右键单击引用的安装程序包.
  • 选择属性
  • 选择数字签名标签
  • 从签名列表中选择sha1摘要
  • 点击详情
  • 点击查看证书
  • 选择Details标签
  • 选择公钥
  • 复制预览窗口中的所有文本
  • 将其粘贴到文本编辑器中
  • 使用 Find\Replace 工具删除密钥中的所有空格
  • 编辑 Product.xml 文件.
  • 找到 的元素并更改 PublicKey
  • 保存 Product.xml 文件.
  • 对每个带有此警告的包重复此操作.
  • Open the [Program Files]\Microsoft SDKs\Windows\$Version\Bootstrapper\Packages\$PackageName folder
  • Right-Click the installer package cited.
  • Select Properties
  • Select Digital Signatures tab
  • Select sha1 digest from the signature list
  • Click Details
  • Click View Certificate
  • Select Details tab
  • Select Public Key
  • Copy all the text from the preview window
  • Paste it in to a text editor
  • Use Find\Replace tool to remove all spaces from the key
  • Edit the Product.xml file.
  • Find the element for <PackageFile Name="$PackageName" and change the PublicKey
  • Save the Product.xml file.
  • Repeat for each package with this warning.

这篇关于部署项目时的PublicKey问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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