tags:

views:

1173

answers:

2

If I understand correctly, ClickOnce only checks for prerequisites with the first install of an application through the setup.exe file that contains the prerequisite information. If the user opens the app in the future it will check for new versions, but it does not launch the setup.exe again, thus not checking for any NEW prerequisites that might have been added.

Is there any way to force ClickOnce to check the prerequisites again or does anyone have a good solution without asking the user to run the setup.exe again?

+6  A: 

Unfortunately, your users will have to re-run the setup.exe to check and install all the new prerequisites that you have added.

Applications deployed using ClickOnce only check for application updates (if enabled), not prerequisites as it's the bootstrapper's job to make sure all dependencies are installed before the application is installed.

I found this at Microsoft's site:

The Setup.exe (bootstrapper) is responsible for installing all dependencies before your application runs. This bootstrapper runs as a separate process that is independent of the ClickOnce run-time engine.

HAdes
Smart Client Deployment with ClickOnce by Brian Noyes says “... by design ClickOnce limits your ability to perform any custom installation steps. The intent of this limitation is to provide a trustworthy deployment mechanism ...”. Asking the user to run the setup.exe must then be the best option.
Timo
A: 

HAdes is correct. However, as long as your app can start without the new prerequisite, you have the option of checking for it in code.

I had the exact same situation with Crystal Reports and ended up writing code to check if it was installed, download the installation files, and run it in the background. Definitely a pain, but the end result worked well.

whatknott