A ClickOnce application configured to do updates programmatically sometimes displays a ClickOnce Update Available prompt.

We have a WPF application deployed with ClickOnce that checks and performs updates programmatically when the application starts. This generally behaves perfectly, unless the user selects "No" for our "Do you want to update"? immediate. In this case, the next time you start the application (sequentially), the ClickOnce "Update Available" dialog box opens with the option of updating or skipping. This does not cause a technical problem, but it will confuse the user so that he can see two completely different dialogue styles. (If the user selects Skip in the ClickOnce dialog box, then the application launches and displays our own Available Update dialog box.) Any ideasWhy is the Framework ClickOnce dialog box displayed in this case? Thank.

+3
source share
2 answers

In the Updates dialog box (located on the Publish tab), do you have any checkboxes checked to check for updates?

[EDIT 6/18/2010] Here is another piece of information that I think will fix your problem.

Methods CheckForUpdate()and CheckForDetailedUpdate()save the results of checking for updates to disk. The next time the application starts, the ClickOnce engine sees that an update is available and prompts the user for an unwanted window.

Apparently, updating is a two-step process:

  • 1. , ClickOnce.
  • 2. ClickOnce , .

" ", , ClickOnce 1. 2 .

CheckForUpdate() CheckForDetailedUpdate() , 1 - , , 2 .

CheckForUpdate() CheckForDetailedUpdate() . , (CheckForUpdate(bool persistUpdateCheckResult) CheckForDetailedUpdate(bool persistUpdateCheckResult)) , false ( CheckForUpdate(false) CheckForDetailedUpdate(false)).

+7

CheckForUpdate CheckForDetailedUpdate false.

intellisense .

0

Source: https://habr.com/ru/post/1744270/


All Articles