Main menu

ClickOnce with .Net 4.5.2 Prerequisite installation fail

Recently at Assette, we decided  to improve our product suite by leveraging the power of .Net Framework 4.5.2. so as a first step we wanted to push .Net Framework 4.5.2 to our existing clients using a similar approach mentioned here. ( ClickOnce only allows prerequisites to be installed during the first installation, hence uninstalling and re-installing).

In some machines, especially Windows 7. we started getting the following error message when the setup tried to install .net 4.5.2:

“Setup has detected that the file “<temp path>\NDP452-KB2901954-web.exe” has changed since it was initially published”

Setup has detected that the file "<temp path>\NDP452-KB2901954-web.exe" has changed since it was initially published

Also the log file specified in the above path shows the following: (it says the downloaded DotNetFX452\NDP452-KB2901954-Web.exe is not signed.

Downloading 'DotNetFX452\NDP452-KB2901954-Web.exe' from '' to 'C:\Users\user\AppData\Local\Temp\VSDA23C.tmp\'
Download completed at 10/6/2015 3:23:05 PM
Verifying file integrity of C:\Users\user\AppData\Local\Temp\VSDA23C.tmp\DotNetFX452\NDP452-KB2901954-Web.exe
WinVerifyTrust returned -2146762496
File not signed
Error: Setup has detected that the file 'C:\Users\user\AppData\Local\Temp\VSDA23C.tmp\DotNetFX452\NDP452-KB2901954-Web.exe' has changed since it was initially published.

So after scratching my head a few hours. and some googling figured out some suggestions to add/edit prerequsites by editing the Package.xml file. and i looked at the package.xml file for .net 4.5.2  under “C:\Program Files (x86)\Microsoft Visual Studio 14.0\SDK\Bootstrapper\Packages\DotNetFX452\en”

it had the following line that gives the URL of the .net framework web installer:

<String Name="DotNetFX45FullWebBootstrapper">;clcid=0x409</String>

I tried to download the file manually by copying and pasting in the browser and it showed that it has been signed by Microsoft. so just to ensure this is the same URL being downloaded by the setup i ran fiddler and it looked like same for the first instance, it was downloading the below url:

But when i downloaded this url it showed as if the file is not signed. now this is what has been causing the problem for me. looks like the URL that is parsed and not parsed are treated in different manner (&amp; being parsed as &). the one which is not parsed seems to be downloading the signed version of the .net installed and vice versa.

To fix this i simply changed the value for “DotNetFX45FullWebBootstrapper” as below:

<String Name="DotNetFX45FullWebBootstrapper">;amp;clcid=0x409</String>

which in turn when parsed through the setup results in giving the correct url and downloading the right file;clcid=0x409.



Aneef Fashir (41 Posts)

Software Architect @ Assette, Sri Lanka