I wanted to deploy my project with ClickOnce deployment. But when I did it like that, it was asking in a dialog box at the end user machine:
A new version of XXXX is available. Do you want to download it now?
But my end users don't have a mouse or keyboard. So my intention is: It must take the updates automatically, but it must NOT ask that dialog box at the client side. How do I achieve this by using ClickOnce deployment?
Click the Publish tab. Click the Updates button to open the Application Updates dialog box. In the Application Updates dialog box, make sure that the check box The application should check for updates is selected. In the Choose when the application should check for updates section, select After the application starts.
ClickOnce and DirectInvoke in Microsoft Edge | Microsoft Learn. This browser is no longer supported. Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
ClickOnce is a deployment technology that enables you to create self-updating Windows-based applications that can be installed and run with minimal user interaction.
Looks like you can do this by changing some properties in the build.
http://blog.jnericks.com/configuring-msbuild-to-auto-update-clickonce
- MinimumRequiredVersion - Tells ClickOnce that when it updates this application it should update to this version (however this does not force ClickOnce to perform the update). As you can see we set this to the same version number that the ApplicationVersion is set to so that the MinimumRequiredVersion is always the latest version.
- UpdateMode=Foreground - Tells ClickOnce to update the application before it is opened.
- UpdateRequired=True - Tells ClickOnce to automatically perform the update.
No MSBuild scenario:
Then publish the application and test it. This was worked fine for me on a local test application.
Edit: looks like some people have been getting the minimum required version to update, might want to look into their solutions.
Edit 2: Image showing where versioning is important:
Also, note I have "Automatically increment revision with each publish" checked. Every time you go into the Properties for the project, that version will be up to date. You'll generally just have to change the "Revision" part of the Version in the "Application Updates" window to match the "Revision" in the Publish tab.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With