How do I configure ClickOnce to always prompt user if they want to update.

Kevin Weidner 0 Reputation points
2024-08-07T17:16:29.68+00:00

QUESTION: What values are needed to configure the "pubmxl" (ClickOnce publish profile), so that a user is always prompted to update an application to specific version, even if the user previously clicked Skip?

For example: The user opens a ClickOnce deployed application. The user is prompted to update to "Version X". The user clicks Skip, and does not update the application to "Version X"

  • CURRENT BEHAVIOR: If the user closes and re-opens the application multiple times, the user IS NOT AGAIN prompted to update to "Version X"
  • DESIRED BEHAVIOR: If the user closes and re-opens the application multiple times, and the user Skips the update each time, then the user IS STILL prompted to update to "Version X" each time the application is re-opened.

Additional Details:

  • This is for a .net 6 applicaton.
  • The publish is invoked from "msbuild /target:publish" using Visual Studio 2022
  • Cannot use Mage to resolve this.

Thank you

.NET
.NET
Microsoft Technologies based on the .NET software framework.
4,103 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Jiale Xue - MSFT 49,361 Reputation points Microsoft External Staff
    2024-08-08T03:09:56.1766667+00:00

    Hi @Kevin Weidner , Welcome to Microsoft Q&A,

    You have two options:

    1. You can do this by configuring the "Minimum Required Version" that ClickOnce publishes. Make sure you update the ClickOnce deployment version number every time you publish a new update to avoid caching issues. This will ensure that every time a user opens the application, if their version is below the specified "Minimum Required Version", they will always be prompted to update, but below the minimum version may cause it to fail to launch.
    2. At application startup, you can write custom code to check if a new version is available and prompt the user to update. Even if the user chooses to skip, you can continue to prompt them at each launch. Use application settings or registry to record users who skip updates When the user chooses to skip updates, record that choice (for example, using application settings or registry). At each launch, check this record and prompt the user to update.

    Best Regards,

    Jiale


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment". 

    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.


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.