Docsity

Deploying a Desktop Application - C Sharp Programming - Lecture Slides, Slides of C Sharp Programming

Partial preview of the text

Download Deploying a Desktop Application - C Sharp Programming - Lecture Slides and more Slides C Sharp Programming in PDF only on Docsity!

Deploying a Desktop

Application

Key Deployment Terms (1)

 The process of distributing an application is

called deployment

 Deploy an application by creating another

type of projected called an installer

 The installer produces a Setup.exe file that is

run by the user

 The Setup.exe file relies on other support files

containing the actual program to install

Steps in the Deployment Process

 Configure a Windows Application project for release

distribution

 Create a Deployment project within an existing

solution

 Set global properties for the Deployment project

 Configure the Deployment project using the visual

editors

 Compile the Deployment project and test the installer

 Distribute the installer

Configuring a Project for Deployment

 Visual Studio .NET supports two default

configurations

 Debug configuration is used for debugging

 Program Debug Database (.pdb) file is created for

debugging

 Program is not optimized

 Release configuration is used for distribution

 DEBUG constant is not defined

 Debug information is not generated

 Program is optimized for performance

 Custom configurations are also possible

Configuration Manager (Illustration)

Types of Deployment Projects

 Setup Project creates an installer for removable

media

 CD or DVD for example

 Web Setup Project builds an installer for Web-

based deployment

 Merge Module Projects are used to deploy Class

Library projects

 Cab Project used to create cabinet files

 Cabinet files are similar to Zip files

 They are not used much anymore

Multi-project Solutions

 Until now, a solution has had a single project

 Here we work with a Setup project and

Windows application project in the same

solution

Multi-project Solutions (Illustration)  The Solution Explorer displays all projects

Properties of a Deployment Project  Many properties are set using the Project’s Property pages. Others are set using the Properties window  Output file name contains the name of the installer  Package files list box defines how files will be deployed  Compression list box defines whether the installer is optimized for speed or size

Deployment Project (Property Pages)

General Deployment Project Properties (2)  ProductName appears as the component description in the Add/Remove programs dialog box  RemovePreviousVersions property controls whether older versions will be removed  Version contains the version number of the installer  This is the version of the installer itself rather than the version of the deployed project

General Deployment Properties (Illustration)

Deployment Editors

 File System Editor defines which files are installed

on the target computer

 File Types Editor associates files extensions with an

application

 User Interface Editor configures the dialog boxes

the user sees when they run the installer

 Launch Conditions Editor specifies target system

requirements

 Custom Actions Editor allows custom dialogs to be

created

 Registry Editor allows the installer to read and

write Registry values

The File System Editor (Purpose)  It is used to define the layout file system layout on the target computer  Application Folder represents the files copied to the target computer  Define the items that will appear on the Start menu  User’s Programs Menu folder  Add items to the target computer’s desktop  User’s Desktop folder