Chapter 14: Installing .NET Applications


The last stage of application development is implementing a deployment solution. A deployment solution installs the completed application on a user's computer or networked environment. The installation must be complete with supporting files and Registry values. Successful deployment solutions accomplish this with the least amount of user interaction necessary.

How to deploy an application varies significantly whether you are deploying to a server, to a desktop, or to a device. Although the purpose of a setup program is to create files and folders on a target computer, there are additional issues you need to address. You might need to make Registry updates, create file associations, and render the installation user interface differently from one country to another. This chapter covers all of these topics and explains how Visual Studio .NET helps to simplify them.

Defining the Elements of Application Deployment

A setup program can perform many functions ”from basic file copy using the operating system's XCOPY service to a fully scripted setup program loaded with features. In all cases, the setup program must create folders, move files, update the Registry, create file associations, and possibly support localization.

Creating Folders and Moving Files

The primary purpose of a setup program is to install the enterprise application files on a target computer. Because the target file system organization can differ from one computer to another, the deployment project references directories as abstract folders. This ensures that files are installed in their intended locations. Abstract folders can represent nearly every system- related folder, including Program Files, the user's Desktop, Windows, and System. You can copy files to any of these existing folders or to new folders created under them.

Updating the System Registry

Alongside creating folders and moving files is the need to create system Registry keys with default values. Many desktop applications insert user-specific values, environment settings, and even product expiration information into the Registry. The deployment project includes a hierarchical view of a typical Registry structure where you can modify existing Registry keys or add new Registry keys. During installation, the created Registry structure will be applied to the target computer.

Creating File Associations

Document-centric applications also find it useful to create an association between themselves and files that have a specific file extension. Just as a .doc file is normally associated with the Microsoft Word application, an .issue file might be associated with the IssueTracker application. This way, double-clicking the file within the file explorer will automatically start the IssueTracker desktop client. Additionally, you can associate one or more actions with a document, such as Open, Edit, or Copy. You can associate these actions with different installed applications when selected from a document's context menu within the file explorer.

Supporting Localization

Multinational applications need to support localization, not only within the application but also during deployment. The deployment project supports the inclusion of multiple merge files, each containing files related to a specific locale. Merge files are simply packages of individual files that you can use for grouping files in many ways, including by locale. The deployment project also supports localization itself. When running, instructions for each wizard step can appear in the locale's native language.




Developing. NET Enterprise Applications
Developing .NET Enterprise Applications
ISBN: 1590590465
EAN: 2147483647
Year: 2005
Pages: 119

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net