How to add a shortcut file to a Setup project in Visual Studio 2005 or in Visual Studio .NET (837220)
The information in this article applies to:
- Microsoft Visual Studio 2005 Standard Edition
- Microsoft Visual Studio 2005 Professional Edition
- Microsoft Visual Studio .NET (2003), Enterprise Architect Edition
- Microsoft Visual Studio .NET (2003), Enterprise Developer Edition
- Microsoft Visual Studio .NET (2003), Academic Edition
- Microsoft Visual Studio .NET (2002), Professional Edition
- Microsoft Visual Studio .NET (2002), Enterprise Architect Edition
- Microsoft Visual Studio .NET (2002), Enterprise Developer Edition
- Microsoft Visual Studio .NET (2002), Academic Edition
INTRODUCTIONThis step-by-step article describes how to add a shortcut
(.lnk) file to a Setup project in Microsoft Visual Studio 2005 or in Microsoft Visual Studio .NET. To do this, you
have to add the shortcut file to your Microsoft Windows Application project and then set the
Build Action property to Content. Then, in your Setup project, add the content files from your
Windows Application project to the User's Desktop
folder. back to the topRequirementsThe following list outlines the recommended hardware, software,
network infrastructure, and service packs that you need: - Microsoft Windows 2000, Microsoft Windows XP, or Microsoft
Windows Server 2003
- Microsoft Visual Studio .NET
back to the topCreate a Windows Application projectTo create a Windows Application project, follow these steps: - Start Visual Studio 2005 or Visual Studio .NET.
- On the File menu, point to
New, and then click Project. The New Project dialog box appears.
- Under Project Type, click
Visual Basic Projects.
Note In Visual Studio 2005, Visual Basic Projects is changed to Visual Basic. - Under
Templates, click Windows Application.
- In the Name box, type
MyWindowsApp, and then click OK. By
default, a Windows Form that is named Form1 is created.
back to the topAdd a shortcut
file to your Windows Application projectTo add a shortcut file to your Windows Application project, follow these steps:
- In the project folder of the Windows
Application project that you created in the "Create a Windows Application project" section, create a shortcut.
For additional information about how to create a shortcut, click the following article number to view the article in the Microsoft Knowledge Base:
140443
How to create a shortcut on the desktop
- In Solution Explorer, click MyWindowsApp,
and then click Refresh.
- On the Project menu, click Show
All Files.
- In Solution Explorer, right-click the shortcut file that
you created in step 1, and then click Include In
Project.
- In Solution Explorer, right-click the shortcut file, and
then click Properties.
- Set the Build Action property to
Content.
- On the Build menu, click Build
MyWindowsApp to build the Windows Application project.
back to the topAdd a Setup project to your Windows Application projectTo add a Setup project to your Windows Application project, follow these steps:
- In Visual Studio 2005 or in Visual Studio .NET, create a Setup project:
- In Solution Explorer, right-click MyWindowsApp, point to Add, and then click New
Project. The Add New Project dialog box appears.
- Under Project
Type, click
Setup and Deployment Projects.
Note In Visual Studio 2005, click Other Project Types, and then click Setup and Deployment. - Under
Templates, click Setup Project.
- In the Name box, type
MyWindowsAppInstaller, and then click
OK. The project is added to Solution Explorer, and the File
System Editor appears.
- Add the project output of the Windows Application project to the Setup project:
- In the File System Editor, click Application
Folder.
- On the Action menu, point to
Add, and then click Project
Output.
- In the Add Project Output Group dialog
box, click Primary output, and then click
OK.
- In the File System Editor, click User's
Desktop.
- On the Action menu, point to
Add, and then click Project
Output.
- In the Add Project Output Group dialog
box, click Content Files, and then click
OK.
- On the Build menu, click Build MyWindowsAppInstaller.
back to the topVerify that the shortcut is
created on the desktop- In Solution Explorer, right-click
MyWindowsAppInstaller, and then click
Install.
- Follow the instructions in the Setup wizard. After the Setup wizard has completed, notice that the shortcut appears on
your desktop.
back to the topREFERENCES
For additional information, click the following article numbers to view the articles in the Microsoft Knowledge Base:
821766
How to: Build an installer by using Visual Basic .NET
307358 HOW TO: Create shortcuts for a .NET deployment project
back to the top
Modification Type: | Major | Last Reviewed: | 2/2/2006 |
---|
Keywords: | kbvs2005swept kbvs2005applies kbsetup kbDeployment kbHOWTOmaster KB837220 kbAudDeveloper |
---|
|
|
©2004 Microsoft Corporation. All rights reserved.
|
|