7

我从 Visual Studio 2012 发布了 ClickOnce 应用程序,并选择了 .NET 4.0 运行时和 Microsoft Report Viewer 2012 作为先决条件。我还选择从供应商的网站下载先决条件。

当我尝试在客户端 PC 上安装应用程序时,我收到以下错误:

安装程序检测到文件“C:\Users\MyUsername\AppData\Local\Temp\VSD537C.tmp\DotNetFX40\dotNetFx40_Full_setup.exe”自最初发布以来已更改。

该日志未提供其他详细信息。

如果我手动安装 .NET 运行时,当我再次运行 Setup.exe 时,我会收到报告查看器的相同错误。

是什么导致了这个错误,我该如何防止它发生?

4

1 回答 1

9

The files that were downloaded from Microsoft had a different public key than what was specified in the bootstrapper configuration files (Product.xml). At least some of them had been published after VS 2012 was released and must have been signed with a different key. I had to extract the public key from the digital signature certificate and use it to replace the public key specified in the product.xml file. After this, it worked fine.

To extract the public key:

  • Right click on the installer executable and click Properties.
  • Click the Digital Signatures tab.
  • Select the signature from the list and click the Details button.
  • On the General tab, click the View Certificate button.
  • In the Certificate window, click the Details tab and locate the field called Public Key.
  • Highlight and copy the data. You will need to run a find/replace to remove the blank spaces.
  • Paste this key into the public key attribute in the Product.xml file for this installer package.
于 2013-04-29T12:46:11.657 回答