Visual Studio Deployment Project - Create shortcut to deployed executable
Visual StudioSetup DeploymentVisual Studio Problem Overview
I realize there is likely a simple method to do this but how does one create a desktop shortcut to the executable deployed by an MSI built using a Visual Studio Deployment project?
I imagine I need to use the Filesystem editor but when I create shortcut on the user's desktop I can't target the executable. I can only specify the target as the application folder not the specific executable.
Visual Studio Solutions
Solution 1 - Visual Studio
After wasting an hour, I got it done - VS 2010 ... VS 2017 (this article helped):
- In your Deployment Project go to File System Editor
- Click on "Application Folder" (I assume you have "Primary Output" from your projects there)
- Right click on "Primary Output" of the project you want to target with your shortcut - select "Create Shortcut to Primary Output ..."
- Rename shortcut
- Drag shortcut to Desktop / Programs Menu folder
That's it!
Solution 2 - Visual Studio
I would add the following steps (to roman m's answer) to get the .exe's icon into the shortcut, because it seems that by default you will get an ugly generic document-shortcut icon.
Assuming you have already given your program the desired icon,
- right-click on the Deployment Project
- pick menu item View > File System
- in the File System window, find the shortuct whose icon you want to change (for example, under "Users's Programs Menu")
- go to the shortcut's Properties (right-click and pick "Properties Window")
- go to Icon
- Browse...
- change "Files of type" to *.exe
- browse to and select your "primary output"
- OK, OK
Solution 3 - Visual Studio
Should be quite simple:
- Open FileSystem editor and go the User's Desktop folder.
- Right click with the mouse and select Create New Shortcut.
- You will be presented with a dialog that allows you to select for instance the application folder (on the target machine). When you double click on this you see what is inside that folder.
- Now simply select the primary project output that "contains" your exe file.
Likewise you can set the icon of the shortcut. At least I believe so.
Solution 4 - Visual Studio
I resolved this error by using a 64 x 64 icon
Solution 5 - Visual Studio
wondering if any of you have actually used visual studio? when you add a primary output and right click it, theres no option to add a shortcut. if you create a shortcut, you cant select primary output as an option. the option simply is not there
Solution 6 - Visual Studio
icon file size is important, 75 KB is not showed in shortcut exe file, but 15 KB is showed.