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?
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.
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.
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.
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.
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.
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!
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