Windows Develop Bookmark and Share   
 index > ClickOnce and Setup & Deployment Projects > Clickonce is forcing an update
 

Clickonce is forcing an update

Hi.

I have a clickonce application that whenever I publish a new version for it, user gets the new version immediately, without questions asked (the download progress appear, but the ‘Update Available�window does not appear.

I did not specify any minimum required version.

Any ideas?


Eli Gazit (try this free icons site: http://www.iconbuffet.com/people/new?ref=EliGazit)
  • Edited byEli Gazit Monday, July 06, 2009 10:30 AM
  •  
Eli Gazit  Monday, July 06, 2009 10:30 AM
Hi Eli,

How did you publish the ClickOnce application? Did you publish the appliation within Visual Studio or using a custom tool?

If you publish the appliation within Visual Studio, please ensure not to select the checkbox before "Specify a minimum required version for this application" option in the Application Updates dialog (Project Designer -> Publish tab -> Updates button).

Sincerely,
Linda Liu
Please remember to mark the replies as answers if they help and unmark them if they provide no help. end us any feedback you have about the help from MSFT at fbmsdn@microsoft.com.
Linda Liu  Tuesday, July 07, 2009 8:06 AM
I'm using the VS to publish.

Regarding your 2nd question:


Hi.

I have a clickonce application that whenever I publish a new version for it, user gets the new version immediately, without questions asked (the download progress appear, but the ‘Update Available�window does not appear.

I did not specify any minimum required version.



Eli Gazit (try this free icons site: http://www.iconbuffet.com/people/new?ref=EliGazit)
Eli Gazit  Wednesday, July 08, 2009 11:43 AM
Whether you specified the version or not, does it have the checkbox checked for minimum version? The reason Linda Liu asked that is because that is the only way that ClickOnce will push an update without asking the user, period.

RobinDotNet
Click here to visit my ClickOnce blog!
RobinDotNet  Thursday, July 09, 2009 2:20 AM

Again, no.The checkbox for minimum required version is unmarked.
So I guess ClickOnce push an update without asking the user for another reason, period period period.... :)


Eli Gazit (try this free icons site: http://www.iconbuffet.com/people/new?ref=EliGazit)
Eli Gazit  Thursday, July 16, 2009 6:21 AM
Hi Gazit,

Please open the deployment manifest of the ClickOnce application (.application) with Notepad to see if the Deployment element has a minimumRequiredVersion attribute. If this attribute exists, the update is required or forced.

Hope this helps.
Please remember to mark the replies as answers if they help and unmark them if they provide no help. end us any feedback you have about the help from MSFT at fbmsdn@microsoft.com.
Linda Liu  Friday, July 17, 2009 5:02 AM

The minimumRequiredVersionis1.0.0.0, the default when not settings anything.


<deployment install="true" mapFileExtensions="true" minimumRequiredVersion="1.0.0.0">
Eli Gazit (try this free icons site: http://www.iconbuffet.com/people/new?ref=EliGazit)
Eli Gazit  Monday, July 20, 2009 7:38 AM

Hi Gazit,

If I don't check the checkbox before the "Specify a minimum required version for this application"optionin the Application Updates dialog, the minimumRequiredVersion attribute doesn't exist in the deployment element within the deployment manifest.

Please have atry removing the minimumRequiredVersion attribute from the <deployment install="true" mapFileExtensions="true" minimumRequiredVersion="1.0.0.0"> in the deployment manifest and resign the deployment manifest using mage.exe to see if the problem can be fixed.

Sincerely,
Linda Liu


Please remember to mark the replies as answers if they help and unmark them if they provide no help.
Linda Liu  Friday, August 07, 2009 7:39 AM
After a month of figthing... I've created a new project, moved all the files into it and re-published from scrath, and it works, so I guess we will never know what went wrong...

Thanks anyway.
Eli Gazit (try this free icons site: http://www.iconbuffet.com/people/new?ref=EliGazit)
Eli Gazit  Friday, August 07, 2009 7:41 AM
Imports System.Deployment.Application


Public Class Form1

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Dim ad As ApplicationDeployment
        Dim info As UpdateCheckInfo

        ad = ApplicationDeployment.CurrentDeployment
        info = ad.CheckForDetailedUpdate

        If Not info.UpdateAvailable Then
            MsgBox("No Update Found")
            Return
        End If

        Dim doupdate As Boolean = True

        If info.IsUpdateRequired Then
            MsgBox("There is Some updates Founds , Downloading Now...")
        Else
            If MsgBox("Update available. Download Now?", MsgBoxStyle.YesNo) = MsgBoxResult.No Then
                doupdate = False
            End If
        End If

        If doupdate Then
            ad.Update()
            MsgBox("The Update Has been Downloaded. Now Restart Application")
            Application.Restart()
        End If

    End Sub
after complete this project Publish it...
then remake or make change in application and again publish in same folder then press update button Its now update
if
my anwer is correct then press Answer Button
ShariqDON  Friday, August 07, 2009 2:24 PM

I believe the original poster has already written the code to do manual updates. His problem was that the application is still trying to do automatic updates, even though he had the checkbox for the unchecked. Thanks for sharing the code though!

RobinDotNet


Click here to visit my ClickOnce blog!
RobinDotNet  Friday, August 07, 2009 6:54 PM


instaling Problem:

In Project, Publish Tab -> Prerequisites... Option!
here is three Radio Button:
1. Download Prerequisites from the vender web site...
2. Download Prerequisites from the same location as my application...
3. Download Prerequisites from the following location...

how to use 2nd option.

i get there error during publish with 2nd option
<Error 2The install location for prerequisites has not been set to 'component vendor's web site' and the file 'WindowsInstaller3_1\WindowsInstaller-KB893803-v2-x86.exe' in item 'Windows Installer 3.1' can not be located on disk. See Help for more information.>
here is 53 error above is sample



my software Publish location is "c:\Shariq'software\"
ShariqDON  Saturday, August 08, 2009 1:25 PM
if you never mind... use this code into your main or First form :
Dim ad As ApplicationDeployment
        Dim info As UpdateCheckInfo

        ad = ApplicationDeployment.CurrentDeployment
        info = ad.CheckForDetailedUpdate

        If Not info.UpdateAvailable Then
            MsgBox("No Update Found")
            Return
        End If

        Dim doupdate As Boolean = True

        If info.IsUpdateRequired Then
            MsgBox("There is Some updates Founds , Downloading Now...")
        Else
            If MsgBox("Update available. Download Now?", MsgBoxStyle.YesNo) = MsgBoxResult.No Then
                doupdate = False
            End If
        End If

        If doupdate Then
            ad.Update()
            MsgBox("The Update Has been Downloaded. Now Restart Application")
            Application.Restart()
        End If
and Remove this : MsgBox("No Update Found")
ShariqDON  Saturday, August 08, 2009 6:27 PM
I'm really not certain of your intent. Do you have a question or a problem? This seems completely unrelated to the original post.

Are you asking about the error above where you set publish to "same location as app"? Because this has nothing to do with the code you keep posting. When does this error occur? When the user installs it, or when you publish it or what?

RobinDotNet
Click here to visit my ClickOnce blog!
RobinDotNet  Monday, August 10, 2009 5:28 AM

You can use google to search for other answers

Custom Search

More Threads

• clickonce and localized satellite assemblies
• Setup Project - Customizing the User's Shell
• Number of version ClickOnce
• ClickOnce installation fails on guest account
• Published image resource (Computed Hash)
• Auto uninstall another version ?
• Modify registry from an installer(MSI)
• Adding New file to exisitng MSI programmatically (Not opening VS 2003)
• deployment guide
• Multiple ClickOnce Applications