Deploy Windows Applications with Visual Studio.NET, Part 1

Configuring Project Properties

Apart from setting the configuration properties for the entire solution, you also need to set the following deployment-specific properties for the deployment project, FormattingApplicationSetup. These properties are accessed through the Properties window. The following list discusses some of the important properties that can be set for a deployment project:

AddRemoveProgramsIcon—Specifies the icon to be displayed in the Add/Remove Programs dialog box on the target computer

Author—Allows you to specify the name of the application's author

Description—Allows you to specify the description that is displayed during the installation

Keywords—Specifies the keywords that can be used to search for an installer on the target machine

DetectNewerInstalledVersion—Allows you to specify whether you want to check for newer versions of the application during the installation

RemovePreviousVersions—Allows you to indicate whether you want to remove the previous versions of the application during the installation

Manufacturer—Specifies the name of the application's manufacturer

ManufacturerUrl—URL of the manufacturer's Web site

ProductCode—Specifies a unique identifier (GUID) for the application

ProductName—Name of the product

SupportUrl—URL for the Web site that contains support information about the application

Title—Title for the installer

Version—Specifies the version number of the installer

After making the above changes, the FormattingApplicationSetup properties window looks like Figure 3.

Now that you understand the different properties that need to be configured, you can learn about the core component of setup and deployment projects that provides the foundation for performing advanced deployment-related configurations.

Different Types of Setup Editors

Because the deployment projects in Visual Studio .NET offer a great deal of flexibility, you very easily can specify how and where a solution will be deployed. Because the bulk of an installer's work is copying files to the right places, the setup editors obviously each contain a file system configuration editor. However, a setup also can include Registry configuration options, checking for special conditions, and so on. The ability to customize the installer's user interface is also useful. For this reason, VS .NET includes a number of editors within the setup projects.

The following editors can all be accessed through the View | Editors menu:

File System Editor—Adds files and shortcuts, such as Start menu items, to the installation package

Registry Editor—Manipulate Registry entries on the target computer

File Types Editor—Associates file extensions with applications; useful in cases when your application uses custom file extensions and you want to associate a specific application with that file extension

User Interface Editor—Configures the dialogs that are shown during the installation

Launch Conditions Editor—Specifies the requirements for your application to be installed on the target computer

Part 2 of this article series will take an in-depth look at all of the above editors.

What You've Learned

Part 1 of this article series taught you the different ways of deploying a Windows application and then identified when to use which deployment option. It also demonstrated the configurations that are required before creating an installer package. To this end, you used the project properties of a Setup and Deployment project and saw how these properties play an important role in the creation of an installer package. Part 2 will explore the different types of editors provided by the deployment project and then demonstrate how to deploy the installer project onto the target machines.

Download the Code

To download the accompanying source code for this article, click here.

About the Author

Thiru Thangarathinam has six years of experience in architecting, designing, developing, and implementing applications using object-oriented application development methodologies. He also possesses a thorough understanding of the software life cycle (design, development, and testing). He holds several certifications, including MCAD for .NET, MCSD, and MCP. Thiru is an expert with ASP.NET, .NET Framework, Visual C# .NET, Visual Basic .NET, ADO.NET, XML Web services, and .NET Remoting. Thiru also has authored numerous books and articles. Contact him at thiruthangarathinam@yahoo.com.

Advertiser Disclosure:
Some of the products that appear on this site are from companies from which QuinStreet receives compensation. This compensation may impact how and where products appear on this site including, for example, the order in which they appear. QuinStreet does not include all companies or all types of products available in the marketplace.

Thanks for your registration, follow us on our social networks to keep up-to-date