Error loading prerequisites after publishing ClickOnce application from VS 2012

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

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

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

There is no additional information in the journal.

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

What causes this error and how to prevent it?

+4
source share
1 answer

Files downloaded from Microsoft had a public key than the one specified in the bootstrapper configuration files (Product.xml). At least some of them were 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 that, it worked fine.

To extract the public key:

  • Right-click on the installer executable and click Properties .
  • Click the Digital Signatures tab.
  • Select a 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 find the field named Public Key .
  • Highlight and copy data. You will need to run find / replace to remove the spaces.
  • Insert this key into the public key attribute in the Product.xml file for this installer package.
+7
source

All Articles