Ali Behzadian Nejad
Ali Behzadian Nejad

Reputation: 9044

Adding shortcut to setup project in visual studio 2010

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.

Upvotes: 9

Views: 29865

Answers (4)

Adarsh Ravi
Adarsh Ravi

Reputation: 955

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.

Upvotes: 18

AleX_
AleX_

Reputation: 508

In order to include .net framework as part of the installation package, select your installer project from solution explorer, right click -> properties.

In the opened window, press "prerequisites" button. Another window opens and select your desired .Net Framework version and then from the radio buttons choose "Download prerequisites from the same location as my application".

Upvotes: 0

Praveen
Praveen

Reputation: 56539

Here is a good visual This explains the entire setup and deployment in vs2010.

A short note from my answer:

(1) File -> New Project -> Other Project Types -> Setup and Deployment -> Visual Studio Installer

(2) Add a name to your setup project.

(3) Right click Application Folder -> Add -> project output

(4) ****Select your respective project's solution "primary output from yours.."****

(5) ****Add the respective 3rd party dlls.**** // Never forget this one.

(6) Right click setup project in solution explorer and BUILD it.

(7) Find the respective setup in debug folder(by default)

You will get the .exe and .msi in the folder.

Upvotes: 0

Hassan Boutougha
Hassan Boutougha

Reputation: 3919

here the explanation to add a shortcut in your project: http://support.microsoft.com/kb/837220

Upvotes: 0

Related Questions