Error downloading prerequisites after publishing ClickOnce application from VS 2012
Asked Answered
R

1

8

I published a ClickOnce application from Visual Studio 2012, and selected the .NET 4.0 runtime and Microsoft Report Viewer 2012 as prerequisites. I also selected to download the prerequisites from the vendor's website.

When I try to install the application on a client PC, I receive the following error:

Setup has detected that the file 'C:\Users\MyUsername\AppData\Local\Temp\VSD537C.tmp\DotNetFX40\dotNetFx40_Full_setup.exe' has changed since it was initially published.

The log provides no additional details.

If I manually install the .NET runtime, then I receive the same error for the report viewer when I run the Setup.exe again.

What causes this error and how do I prevent it from happening?

Rhoea answered 25/4, 2013 at 18:31 Comment(0)
R
11

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.
Rhoea answered 29/4, 2013 at 12:46 Comment(4)
Argh, I still wasn't able to get it to work. I think it wants the SQL CLR Types as well, but the go.microsoft.com DL link for that is 404.Certify
@MarkSowul I experienced the same thing. I had to download the SQL CLR Types install file from another package. I forget exactly what it was, but it was either a SQL server service pack, or a Visual Studio Data Tools package. Of course, I still had to perform the steps listed after I downloaded it.Rhoea
Where is Product.xmlSnowmobile
@AbdullaSirajudeen %ProgramFiles(x86)%\Microsoft SDKs\ClickOnce Bootstrapper\Packages\<Package name>Deputy

© 2022 - 2024 — McMap. All rights reserved.