0

I would like to create a desktop shortcut for my ClickOnce deployed application. The IDE is Visual Studio 2005 and there isn't any need for upgrading to Visual Studio 2008 yet.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
OrElse
  • 9,709
  • 39
  • 140
  • 253
  • If you have to stay with Visual Studio 2005, your only option is to write code to create the icon. Here's [how to do it][1]. However, be aware of the fact that if a user uninstalls your application, the desktop icon won't get removed. If you ever upgrade to Visual Studio 2008 SP1, you'll get this feature out of the box. [1]:https://stackoverflow.com/questions/152188/can-i-create-a-desktop-icon-for-a-clickonce-application – codeConcussion Aug 12 '09 at 13:31

1 Answers1

0

You cannot do this in ClickOnce, and that is by design:

One of the goals of ClickOnce was to make the user experience of installing and running rich client code as "web-like" as possible

[...]

In keeping with the web-like model we wanted to be as minimally invasive as possible in terms of shell footprint and opted to not "spam" the desktop with shortcuts (note that on the XP startmenu will light up with a notification that an app has been installed for ClickOnce apps).

as explained in this thread on social.msdn.microsoft.com.

The only workaround is to create the desktop icon yourself on first startup. But doing so is not recommended.

You might want to reevaluate whether your really need a desktop icon. I personally hate installers which do that.

sleske
  • 81,358
  • 34
  • 189
  • 227
  • what i don't get is the "by design". I guess in VS2008 they don't care about "web-like" since there is an option of creating a desktop shortcut – OrElse Aug 12 '09 at 11:04
  • They've noticed that the web is very popular, but they still don't quite get why. That's why they've also put in stuff like error providers. – MarkJ Aug 12 '09 at 11:35