C# – Adding shortcut to setup project in visual studio 2010

cinstallationnetvisual studio 2010winforms

I am using visual studio 2010 and I have a .net desktop app (winform). I want to create a setup for project. I have added a setup wizard project to the solution. Now I want to add a shortcut to Programs menu and desktop. With right click on "User's Program menu" and selecting Add, I have only these options: Folder, File, Project output and Assembly. How can I add shortcuts?
Another question: Is it possible to add .net 4.0 to setup project and install it if necessary?
Thank you in advance.

Best Answer

if you're looking to add shortcut to your desktop while installing your windows app you should follow these steps

  1. From Solution Explorer click your setup project.
  2. Click File System Editor (on top of Solution Explorer).
  3. When File System Editor has opened, on left tab you can see "File System on Target Machine". Click Application Folder.
  4. Then on the right tab the "Primary output from MyApp (Active)" appears. Right click it and select "Create shortcut to Primary output from MyApp (Active)". You should now see the shortcut appear below the primary output, which is your application executable.
  5. Drag & Drop that shortcut from right tab to left tabs File System on Target Machine - User's Desktop folder.
  6. Now the shortcut to your .exe will appear on the desktop after install.
  7. You can click the shortcut in File System Editor and edit the Name property from Properties grid to change the text that appears on the icon.