PublicKey issues when deploying the project

时光怂恿深爱的人放手 提交于 2021-02-10 11:47:25

问题


I have the following problem when deploying the project:

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'.

It is the same for the other components:

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.


回答1:


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.

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.

To resolve this issue:

Update the Package Data

  • 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.


来源:https://stackoverflow.com/questions/17374809/publickey-issues-when-deploying-the-project

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!