ClickOnce and Desktop Shortcuts
Ok, this was a weird one. This post isn’t a solution, merely a description of the problem and a workaround. I’m putting it out there for Google-juice just in case someone else has the same issue and has an idea of a proper solution.
We have a couple of applications internally that are ClickOnce deployed. They date back to Visual Studio 2005 so they’re .NET 2.0 applications, and they’ve had plenty of updates over the years which get pulled down automatically by the clients. It works a treat.
Now, if you remember all the way back to the days of yore before there was such thing as .NET 3.5 SP1, you’ll know that ClickOnce originally didn’t give you the option of creating a desktop shortcut. The only thing you could do as part of the deployment was to create an icon in the Start menu. That was fine for us – our users would install the application and then drag the Start menu icon onto their desktop manually.
3.5 SP1 introduced the ability to create a desktop shortcut as part of the ClickOnce installation, and I think it has caused a bit of a problem for us.
You see, just recently our IT department pushed out .NET 3.5 SP1 via a group policy. That’s awesome for us, because every PC in the company now has it installed. Our applications, though, are still .NET 2.0, and thus don’t have the “create desktop icon” setting in their ClickOnce options.
With the latest updates to our applications, it seems that the client PCs are looking at the update, noticing that it doesn’t have an option to create a desktop shortcut, and removing the existing desktop icon for the app! So everybody who updates to the latest (.NET 2.0) version of our app is calling us, complaining that their desktop icons have disappeared!
The only workaround we have right now is to update the apps themselves to .NET 3.5 SP1 apps, and check the “Create desktop icon” checkbox in the ClickOnce options dialog. It’s not much of a solution, and it’s a drag for those clients who don’t want a desktop icon, because it gets re-created with every update. Still, it’s all we can do right now.
If you’ve seen this behaviour, leave us a comment! It’s a shame that ClickOnce couldn’t just leave the icon there if the update tells it not to create one.
Comments
# Ken
15/09/2009 1:42 AM
Thanks for this post. We had what looks like the same problem. Our work-around was to have the main app create its own desktop icon if it could not find its own. So our users only saw the new app download and a flash from their desktop while the app re-created a new icon. Like you we don't have time to move the app to 3.5 sp1.