Scott Whitlock
Scott Whitlock

Reputation: 13839

Are there any caveats to using ClickOnce in VS 2010 to deploy "real" applications?

It always seemed to me that ClickOnce was a handy way to deploy .NET applications in an intranet environment. I was thinking of using it as the deployment method for a desktop application that's distributed over the internet to general users. (The alternative would be a regular installation package.)

Does anyone have experience with this? Did it work well? Are there problems, either for the developer or end-user, that I should watch out for?

Upvotes: 4

Views: 408

Answers (1)

fletcher
fletcher

Reputation: 13760

I have used ClickOnce several times for deployment over the web, with varied experiences. The pointers I would give are:

  • Ensure that the application has one static deliverable
  • Avoid dynamic building of deployment and application manifests server side, especially with regards to a pluggable architecture (i.e. using mage.exe to build manifests based on identity and/or permissions)
  • Control authentication from the application, ClickOnce is incredibly restrictive in terms of facilitating downloads of applications from secure websites. See here for the choices you will face.
  • Avoid delivering prerequisites, or keep it to a minimum. For example, just the .NET framework, SQL express.
  • The application should not require significant privileges client-side (HKLM registry changes, for example). The application will ultimately be run from the logged on user's document's folder and you won't be able to tell whether the user is an administrator or not when they download.
  • Sign the ClickOnce manifests with a verified Authenticode certificate
  • Relating to updating the deliverable, ClickOnce handles this very well if the deliverable is static and updated in place. You have two options for deployment, an "install and run" option and a "run only" option. Both are exactly the same in terms of deployment, they copy the files to the same place, permissions are identical. The only difference is that the install version will create an entry in the start menu and add/remove programs. The update is based on name and version. For the installed version, updates are not mandatory, but the run only option will also get the latest deliverable. If the deliverable hasn't changed and the user has already downloaded the application it will not download again and just launch from the holding directory.

The technology is pretty cool, but there are several caveats that have bit me before.

Upvotes: 3

Related Questions