I have several .NET Windows Forms applications that I'm preparing to convert into a ClickOnce/smart-client deployment scenario. I've read the isn't-this-great tutorials, but are there pitfalls or "gotchas" that I should be aware of?
There are several minor applications used off and on, but the main application is in C#, runs 24/7, is quite large, but only changes every few weeks. It also writes to a log file locallly and talks to local hardware devices.
In case someone refers to this in a search, we have found many customers concerned with the lack of security 'distributing' their application. The application must be available in a public location - without any authentication - for it to be able to check for updates. The only exception is if you have Windows NT authentication. I think Securing ClickOnce Applications explains what I mean.
Desktop icons are fairly trivial to do via code, and as mentioned, with 3.5 SP1, baked in - so that is no longer an issue.
There is still an unfixed bug with the xmlSerializer - it doesn't get deployed properly in some cases. An easy workaround is to manually add this file to the deployment. PITA, but it is easy enough... It can be shocking when your deployment suddenly fails though...
You can't silently uninstall ClickOnce deployed applications. Also I think it's impossible to add parameters to the startup shortcut.
Here are a few that I am aware of.
Can't put an icon on the desktop.You can now.I can't install for all users.
I need to jump through hoops to move the deployment to a different server. It is not a problem if you are developing internally, and the users can see the server that you are publishing to or if you are deploying to the public web, but it is not great if you need to roll out to multiple customer sites independently.
Since .NET 3.5 SP1 you do not need to sign the deployment manifest anymore which makes it much easier to move deployments to new servers.
I can't install assemblies in the GAC. You can get around this by creating regular install packages that are pre-requisites of the ClickOnce application.
You can't install if the client is behind a proxy that requires authentication.
One of the pitfalls with ClickOnce is the fact that you can't install to the GAC. This is a problem if you want to install multiple applications that share DLL files. Each application will require a local copy of the DLL files. Also, multiple user installs are out. See the list comparing Window Installer to ClickOnce.