Winform ClickOnce Deployment and force update next time if update skip first time

T.Zacks 3,996 Reputation points
2021-07-21T17:19:17.747+00:00

Suppose i have published my application and when user run then he is getting dialog to update application but if user cancel update and when user run the application next time then update dialog is not coming. so how could i force application to check for update every time when user run application. if update exist then update dialog should come.

please tell me what i need to change in my application to get update every time. thanks

Developer technologies | Windows Forms
Developer technologies | C#
0 comments No comments
{count} votes

Accepted answer
  1. Daniel Zhang-MSFT 9,656 Reputation points
    2021-07-22T01:20:13.263+00:00

    Hi TZacks-2728,
    If users are prompted to update and choose to skip the update, they will never be prompted again until a new updated version is released. The solution is to force the update by checking "Specify the minimum version required for this application" and then setting it to the latest version.
    Specific steps: Click "Update" to open the "Update" dialog box, and select "Before Run", and then set the minimum version to the same version you are deploying. Then it will install the update before running the application.
    This must be done every time a new version is released. The user will be forced to update (no prompt or choice).
    In the second method, you can write code that uses the ApplicationDeployment class to check for updates based on events.
    More details you can refer to this document.
    If you want to automatically force the ClickOnce application to update itself without prompting the user, you can run a PowerShell script to update the minimum required version of the ClickOnce application in the .csproj file to the latest released version.
    Here is a example and hope helpful to you.
    Best Regards,
    Daniel Zhang


    If the response is helpful, please click "Accept Answer" and upvote it.

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    1 person found this answer helpful.
    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.