Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why doesn't my ClickOnce application recognize there is an upgrade the first time I open the application after deploying a new version?

  1. I deploy a new version of my ClickOnce application
  2. I open my ClickOnce application on the test client machine
  3. No upgrade is offered
  4. I close my ClickOnce application and re-open it and now the upgrade is offered

Why do I have to open, close, and re-open in order to upgrade?

ClickOnce? More like click four times!

What's up with this?

like image 321
Brian T Hannan Avatar asked Jan 27 '11 17:01

Brian T Hannan


People also ask

How do I update my ClickOnce app?

With a project selected in Solution Explorer, on the Project menu, click Properties. 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.

How do I debug ClickOnce application?

To debug this, simply attach before the button is pressed, then set a breakpoint (make sure that you open the appropriate archived file and set the breakpoint there). Use the IsNetworkDeployed property to invoke the System. Deployment.

How do you add prerequisites to a ClickOnce application?

ClickOnce allows you to add prerequisites in ClickOnce deployment. It should download the installer packages for those prerequisites to your development machine. When you publish the ClickOnce application, choose Download prerequisites from the same location as my application.

How do I ClickOnce deployment?

In the Publish wizard, select Folder. In the Specific target page, select ClickOnce. Enter a path or select Browse to select the publish location. In the Install location page, select where users will install the application from.


2 Answers

Sounds like your project is set to check for updates 'After the application starts' rather than 'Before your application starts' - check the settings on the Publish tab of the project properties, and click the 'Updates' button.

From http://msdn.microsoft.com/en-us/library/s22azw1e%28v=vs.90%29.aspx

Checking for Updates After Application Startup By using this strategy, the application will attempt to locate and read the deployment manifest file in the background while the application is running. If an update is available, the next time that the user runs the application, he will be prompted to download and install the update.

like image 86
stuartd Avatar answered Oct 19 '22 22:10

stuartd


I would check the xml of the YourAppName.application which will be deployed with the rest of the assemblies, etc, onto the deploy server.

Check the minimumRequiredVersion="1.0.0.0" and make sure that before you publish you get these properties properly set up (I assume you do).

Then, if you serve this app off of a web server, might wanna check if the server is not serving a cached copy YourAppName.application the first time you try running the app.

Good luck!

like image 34
tzup Avatar answered Oct 19 '22 22:10

tzup