MrGreggles
MrGreggles

Reputation: 6175

How to Set Up ClickOnce Updating? (the nitty-gritty, including relevant publishing stuff)

This is getting a bit frustrating now! Heaps of awesome Karma for whoever can help me sort this out. :-)

My cool little desktop C# app gets sent to users manually, zipped. They install it and all is well. One big missing piece to finish it off though is getting auto-updates to work.

PART I: Publish Wizard Steps

1) "Where do you want to publish the application?" -> Local drive on my PC. OK

2) "How will the users install the app?" -> From a CD-ROM or DVD-ROM (manual delivery). OK

3) "Where will the application check for updates?" -> Question! I have a website and can setup whatever I need to in terms of FTP accounts or whatever, but I'm not sure what to put in here. Also Annonymous FTP vs login-FTP? I'd really appreciate it if I could get some concrete suggestions for how to set this up. Examples rather than theory per favore. Thx!

PART II: Files to copy to the update folder Once the update location is sorted out, what files need to be copied there? The contents of the 'publish' folder?

PART III: Signing I must admit to not really knowing what 'signing the manifest' is all about. Is it necessary to do anything more than ticking "Sign the ClickOnce manifests"?

PART IV: Anything else? If there are any more parts to the puzzle, an everyday-language explanation would be great.

Thanks in advance for any help!

Upvotes: 0

Views: 966

Answers (3)

James Jones
James Jones

Reputation: 8763

If you're using ClickOnce and have a web site, why are you distributing via manual delivery? ClickOnce is made to be published & distributed via web site.

Anyways, here's an MSDN article on how to deploy using any configuration.

Upvotes: 0

Henk Holterman
Henk Holterman

Reputation: 273219

Regarding Part III,

you should of course sign the Assemblies. Just create a snk file first, it is your signature. Create it once, keep it safe and re-use it.

But for signing the manifest you need a certificate. Look carefully in the Certificate box for expiration Date, Issued to/by etc. Most likely you have a Test certificate now.

If you do not want to go through the trouble of buying and installing a certificate, then do not sign the manifest with a Test-Certificate. Not signing the manifest will mean that the user will have to click Yes in an "Are You Sure to ... from uncertified ..." box.
Making it a Click-Twice install.

Upvotes: 1

ChrisF
ChrisF

Reputation: 137138

At step 2 select "From a Web site" and specify the URL where you'll upload the files (from the location specified at step 1) to. The files and folders you'll need to upload are:

  • [application name].application
  • setup.exe
  • publish.htm
  • Application Files (folder)

The html file isn't essential but contains all the links your users will need to click.

The next question will be "Will the application be available offline?"

Select "Yes".

Users can then download (or run directly) the setup.exe on your website. The application will then check periodically for updates.

To set the frequency select Properties on the project name then Publish. On this page you'll see an Updates... option. Select this and then fill out the choices you want from the list:

Tick that the application should check for updates.

Choose before or after the application starts. The answer to this will depend on how large the update is, whether your application is started and left open etc - all questions specific to your application which I can't answer.

Then how often. If your application is changing a lot then make this more frequent, if it's hardly changing at all make it less often.

Upvotes: 1

Related Questions