Why shouldn’t we create manual Shortcuts for apps which are deployed via ClickOnce?

 With the .NET Framework 3.5 Sp1 we have added a new feature to install shortcuts on the desktop to point to the app-ref. So the ClickOnce runtime (dfsvc.exe) knows about these shortcuts and it manages these through the lifecycle of deployment.

If we create manual shortcuts pointing to the app-ref or the exe we would see undesirable effects like,

1. The application is updated but when we click the shortcut (Manually created one) the old app would be launched. (This is coz the clickonce store has the previous version of the app too for the sake of users should be able to roll back to previous versions).

2. The application is updated but when we click the shortcut we see that old exe is launched or some error saying that the app is not found.

3. The shortcut in the program files is pointing to a different app identity and the one on the desktop may be pointing to old app’s identity

So, the bottom line is, let the ClickOnce engine decide when to update the shortcuts too. Do not create them manually.

 


CONTENT : Aditya Hari


REVIEW : Ravi Shankar