views:

121

answers:

3

Hi, I am writing a c# application. I need to integrate update feature to this application (ie, the application should check if a new update is available and should update to new version if available). How can i do that.

Thanks

+5  A: 

Take a look at the ClickOnce Deployment.

Canavar
+1 : For click once
Mahin
Correct me if I'm wrong, but I think ClickOnce is only for Win Forms Apps.
Eddie
@Eddie : yes, you're right, but isn't he asking for it ?
Canavar
@Canavar His actual question seems vague to me whether his app is Win Forms or Web. But ClickOnce is definitely the choice for Win Forms. +1
Eddie
@Eddie: why would anybody need to auto-update a web app?
MusiGenesis
+3  A: 

The Auto Update feature in ClickOnce Deployment

Mahin
+1  A: 

If you want to write your own solution then you should have a separate program that will do the update as you can't update any dlls that are already in use, so this new program must not share any dlls with the actual program.

I think the best approach would be to make an http connection, if you are downloading the updates, and send your version number, and have the server determine if there is an update, depending on specifics, such as whether the update is for a 64-bit OS or 32-bit, for example.

But, allow the user to pick how the update works, I think the Google Chrome solution is bad, as it updates silently, but doesn't even tell you that there was an update. I prefer if I can pick to update automatically, or just download automatically, so I can pick when to do the update.

James Black