ClickOnce Application Fails to Update

Article ID: 2713442 - View products that this article applies to.
Expand all | Collapse all

Symptoms

Consider this scenario. You have a ClickOnce application that always succeeds when first installed. However during subsequent launches the ClickOnce application fails while checking for updates. It appears to be random, but more prevalent when there is an update available.

Another way to determine if this article applies is if the problem is corrected even temporarily by deleting the ClickOnce File Cache. See the More Information section.

Cause

Anything that interrupts the synchronization between the file system and the registry data can cause a ClickOnce application update to fail.
  • An incomplete System Restore that restores only the files but not the user profile. The registry key HKEY_CURRENT_USER\Software\Classes\Software\Microsoft\Windows\CurrentVersion\Deployment\SideBySide\2.0 should be in the same state as the files in the following folders
  • Windows XP

    %userprofile%\Local Settings\Apps\2.0\*.*
  • Windows Vista and later

    %userprofile%\AppData\Local\Apps\2.0\*.*
  • Roaming Profiles are not supported for the same reason; the potential of the files not matching the registry data. See KB 2571899, http://support.microsoft.com/kb/2571899
  • Ungraceful operating system shutdowns such as a power failure.
  • Ungraceful log off such as powering off machine rather than logging off or shutting down.

Resolution

Besides avoiding the scenarios listed in the Cause section some reduction on corruption can be seen by using framework 4.0 or higher on the target machines. Framework 4.0 has improvements that make it more robust resulting in fewer update failures compared to the earlier framework versions. The application does not have to be developed using the framework 4.0. It just needs to be installed on the target machines.


Microsoft continues to look into these failures and will update this article as new information becomes available. The mitigation for these issues continues to be 
  • Attempt to uninstall the application from Add and Remove Programs (ARP, Windows XP) or Programs and Features (Windows Vista and later operating systems).
  • If the program does not uninstall successfully, see the More Information section on deleting the ClickOnce File Cache.
If you would like to submit information for such a failing ClickOnce deployment
  • Verify the issue matches the symtoms listed in this article.
  • Submit a Connect bug. (Microsoft Support will not handle this particular issue. The Microsoft ClickOnce Product Team will address the Connect bugs). See the More Information section for the Connect bug portal.
  • Forum support is available at http://social.msdn.microsoft.com/Forums/en-AU/winformssetup/threads, see Microsoft Developer Network > Forums Home > Windows Forms Forums > ClickOnce and Setup & Deployment Projects.


More information

To delete the ClickOnce file cache delete the contents of this folder based on the operating system.

Windows XP and Server 2003 - %userprofile%\Local Settings\Apps\2.0\*.*
Windows Vista and Server 2008 and later - %userprofile%\AppData\Local\Apps\2.0\*.*

Deleting these files will clear the information for all installed ClickOnce applications. They will re-install the next time their shortcut or URLs are used. 

It is not necessary to delete the registry data. For reference the ClickOnce registry data is located in HKEY_CURRENT_USER\Software\Classes\Software\Microsoft\Windows\CurrentVersion\Deployment\SideBySide\2.0.

The Connect Portal is https://connect.microsoft.com/. When submitting a bug for this issue include the error log. Attach the registry export and ClickOnce file cache.
Registry  

                HKEY_CURRENT_USER\Software\Classes\Software\Microsoft\Windows\CurrentVersion\Deployment\SideBySide\2.0

Files

                XP ->  %userprofile%\Local Settings\Apps\2.0\*.*

                Vista+ -> %userprofile%\AppData\Local\Apps\2.0\*.*

Include ClickOnce Store Corruption in your bug title.


Note This is a "FAST PUBLISH" article created directly from within the Microsoft support organization. The information contained herein is provided as-is in response to emerging issues. As a result of the speed in making it available, the materials may include typographical errors and may be revised at any time without notice. See Terms of Use for other considerations.

Properties

Article ID: 2713442 - Last Review: July 13, 2012 - Revision: 3.0
Applies to
  • Microsoft .NET Framework 1.1 Service Pack 1
  • Microsoft .NET Framework 2.0
  • Microsoft .NET Framework 2.0 Service Pack 2
  • Microsoft .NET Framework 3.0 Service Pack 2
  • Microsoft .NET Framework 3.5 Service Pack 1
  • Microsoft .NET Framework 3.5.1
  • Microsoft .NET Framework 4
Keywords: 
KB2713442

Give Feedback

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com