I try all the possible configuration in ClickOnce but the application only updates on restart.
I want the application to update after the application startup but in VS 2022 the update after startup is blocked as we can see in the following image:
I am using .net core 6 and my IDE is VS2022.
CodePudding user response:
According to the documentations: For .NET 3.1 and newer applications, checking updates before the application starts is the only update option supported.
ClickOnce update strategies
Automatic update - Check for updates after application startup
It checks for an update in the background while the application is running. If an update is available, the next time that the user starts the application, he will be prompted to download and install the update. This works best for low-bandwidth network connections or for larger applications that might require lengthy downloads.
Automatic update - Check for updates before application startup
It checks for an update every time the user starts the application. If an update is available, it will be downloaded and started; otherwise, the existing version of the application will be started. This works best for high-bandwidth network connections; the delay in starting the application may be unacceptably long over low-bandwidth connections.
Manual update - Provide a user interface for updates
Developer can write code that uses the ApplicationDeployment class to check for updates based on an event, such as a user request. It works best when you need different update strategies for different users, or when you want to have manual check for update.
To learn more, take a look at the following doc articles: