views:

255

answers:

1

How could I ensure that all the clients will always be using the latest version of a winforms application (updates from a network place, suppose always connected) while deploying it with clickonce. Thanks.

+3  A: 

ClickOnce applications when launched automatically attempt to connect and obtain the latest update (if you have that option turned on which it is by default).

Taken from MSDN


Making Updates Required

There may be occasions when you want to require users to run an updated version of your application. For example, you might make a change to an external resource such as a Web service that would prevent the earlier version of your application from working properly. In this case, you would want to mark your update as required and prevent users from running the earlier version. NoteNote

Although it is possible to require updates using the other update strategies, checking Before the application starts is the only way to guarantee that an older version cannot be run. When the mandatory update is detected on startup, the user must either accept the update or close the application.

To mark an update as required, click Specify a minimum required version for this application in the Application Updates dialog box, then specify the publish version (Major, Minor, Build, Revision), which specifies the lowest version number of the application that can be installed. For more information, see Application Updates Dialog Box.

This is the same as setting the minimumRequiredVersion attribute of the Deployment element in the deployment manifest; for example: Copy Code


You should be able to specify the version that is required and for the application to update before it starts.

Pat
but then there's a prompt, asking if wants to update YES or SKIP. I want to ensure if it the users click SKIP, the app doesn't launch, ensuring always the latest version will be in use.
caiokf
You shouldn't get the "Skip" option if you do updates before the app starts, and make the minimum required version equal to the current version.
whatknott