6

Is ClickOnce still the way to go for Windows Forms application deployment?

I've just been looking for books that cover ClickOnce deployment and there don't seem to be many at all out there, and the ones that are are a few years old(?).


Additional notes re what I'm doing:

  • An executable and one database file (SQLite)
  • Database (SQLite) will need to be updated sometimes by the application (e.g. add table, add column)
  • Database data (which is just a file for SQLite) needs to remain across upgrades of course
Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Greg
  • 34,042
  • 79
  • 253
  • 454

4 Answers4

9

ClickOnce is still an amazing technology. It takes care of a large amount of heavy lifting from your side, but takes away some customizations that you can use with the Windows Installer.

Directly from the words of MS, ClickOnce overcomes three issues in deployment:

  • Difficulties in updating applications. With Microsoft Windows Installer deployment, whenever an application is updated, the user must reinstall the entire application; with ClickOnce deployment, you can provide updates automatically. Only those portions of the application that have changed are downloaded, then the full, updated application is reinstalled from a new side-by-side folder.

  • Impact to the user's computer. With Windows Installer deployment, applications often rely on shared components, with the potential for versioning conflicts; with ClickOnce deployment, each application is self-contained and cannot interfere with other applications.

  • Security permissions. Windows Installer deployment requires administrative permissions and allows only limited user installation; ClickOnce deployment allows non-administrative users to install and grants only those Code Access Security permissions necessary for the application.

I recommend giving this a thorough read: MSDN - ClickOnce Deployment. Also, if it's good enough for Google (Chrome), it's good enough for most of us ;)

Kyle Rosendo
  • 25,001
  • 7
  • 80
  • 118
5

It depends what you need to deploy; if it's a single executable with possibly a couple of content files then yes, but if you need custom scripts, installing services, etc. then I would highly suggest looking into Windows Installer.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Michal Ciechan
  • 13,492
  • 11
  • 76
  • 118
  • what about an executable and one database file (sqlite) with the assumption the database (sqlite) will need to be updates sometimes by the application (e.g. add table, add column), and the data needs remain across upgrades of course - will clickonce work here for a user who does not have Admin rights? – Greg Mar 02 '10 at 23:40
  • have added this last question as a question in it's own right at http://stackoverflow.com/questions/2369025/clickonce-does-writing-reading-to-the-data-directory-required-admin-rights – Greg Mar 03 '10 at 05:46
2

The answer may also depend on where you are deploying? Are you writing an internally used application for a company, where everyone has access to an internet share that you can deploy your ClickOnce too? If yes, then ClickOnce is great.

If you are trying to write shrink-wrap software for general consumption, then creating a deployment project that distills down to an MSI, or even using a product like InstallShield or NSIS (does that still exist?) may be your better option.

Richard Ev
  • 52,939
  • 59
  • 191
  • 278
Nick
  • 5,875
  • 1
  • 27
  • 38
1

ClickOnce is great if you're OK with the limitations. If you've got a Windows application that doesn't need the full-blown MSI over-engineered madness, by all means use ClickOnce.

ClickOnce takes care of auto-updates, and it takes care of previous versions and rollbacks. ClickOnce installs/uninstalls take seconds, far faster than traditional MSIs. The benefits are many, so if you're OK with the constraints, by all means you should use it.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Judah Gabriel Himango
  • 58,906
  • 38
  • 158
  • 212