Saravanakumar. N
Saravanakumar. N

Reputation: 1

C# - ClickOnce - Auto update feature in a local file.

I have a click-once application. The output of this application is a file (with custom extension. for example .xyz). Auto-update facility is available only when I access this application thru the shortcut in the desktop. But when I access the application thru the output file (or the exe of the application in the local folder), auto update is not working. I know that the desktop shortcut is a .appref-ms file which access server first. Please let me know any options available to get this auto update feature even from the exe/output file.

Thanks in advance...

Upvotes: 0

Views: 1017

Answers (2)

RobinDotNet
RobinDotNet

Reputation: 11877

There is no way to run the exe and get the auto update. You have to run it as a ClickOnce application through the appref-ms shortcut. When you do that, it checks the deployment manifest on the server for a new version, and installs it if it finds it, and then runs the application. Running from the exe, it doesn't even recognize it's a ClickOnce-installed application.

Upvotes: 0

Scott Wylie
Scott Wylie

Reputation: 4735

You can write code to check if an update is available for your ClickOnce application. If an update is available you can programmatically invoke the update. This will work in your exe, instead of using the shortcut.

How to: Check for Application Updates Programmatically Using the ClickOnce Deployment API

Upvotes: 1

Related Questions