Vb net xp_16

420 views

Published on

Published in: Technology
  • Be the first to comment

  • Be the first to like this

Vb net xp_16

  1. 1. Deploying .NET ApplicationsObjectivesIn this lesson, you will learn to:Identify different types of deployment projectsCreate a deployment projectUse editors in a deployment projectDeploy an applicationDeploy a componentDeploy a Web service ©NIIT Deploying .NET Applications/Lesson 16/Slide 1 of 28
  2. 2. Deploying .NET ApplicationsVisual Studio .NET DeploymentIs a process of distributing the files that make up anapplication to install it on target computers.Involves the task of packaging all files and components and creating a setup program that Copies all the necessary files to the target computer. Stores files in appropriate folders. Creates the necessary registry entries. Creates a Start menu item and an icon on the desktop of a user computer to provide easy access to the application. ©NIIT Deploying .NET Applications/Lesson 16/Slide 2 of 28
  3. 3. Deploying .NET ApplicationsSetup and Deployment ProjectsProvide a number of templates for deploying different types of applications depending on the type of application thatneeds to be deployed and the mode of deployment. Theyare: Setup Project Merge Module Project Web Setup Project Cab Project Setup Wizard ©NIIT Deploying .NET Applications/Lesson 16/Slide 3 of 28
  4. 4. Deploying .NET ApplicationsSetup Project TemplateIs used to package all application files and create aWindows Installer (.msi) file.Web Setup Project TemplateIs used to install a Web-based application.Is similar to a setup project.Merge Module Project TemplateIs used to create a single package that contains all files,resources, registry entries, and the setup logic necessary fordeploying a component. ©NIIT Deploying .NET Applications/Lesson 16/Slide 4 of 28
  5. 5. Deploying .NET ApplicationsIs similar to a dynamic link library (DLL), which allowsapplications to share code with a difference that it allowsvarious Windows Installers to share the installation code.Resolves any version-related problems by identifying all the dependencies for a component and ensuring that thecorrect versions of the components are installed.Cab Project TemplateIs used to package components that can be downloaded from a Web server to a Web browser.Is typically used when you want a component to execute on a client computer instead of a Web server. ©NIIT Deploying .NET Applications/Lesson 16/Slide 5 of 28
  6. 6. Deploying .NET ApplicationsDeployment Project EditorsCan be used to specify the files that needs to be included in the project and the registry entries to be made for theapplication that has to be deployed.Can also be used to customize the user interface.Are of the following types: File System Registry File Types User Interface Custom Actions Launch Conditions ©NIIT Deploying .NET Applications/Lesson 16/Slide 6 of 28
  7. 7. Deploying .NET ApplicationsThe File System EditorIs displayed by default.Displays a standard set of folders that represent the folder structure on the target computer.Contains the navigation pane and the details pane. Thenavigation pane displays a list of folders. When you select a folder, the files and shortcuts in the folder are displayed in the details pane.Can be used to add subfolders, special folders, orcustom folders to a deployment project. Special foldersrepresent some predefined Windows folders. ©NIIT Deploying .NET Applications/Lesson 16/Slide 7 of 28
  8. 8. Deploying .NET ApplicationsThe File System Editor (Contd.)Allows adding project outputs (such as .exe and .dll files) and additional files (such as readme.txt) to adeployment project.Allows specifying the folders on the target computers towhich the application files are to be copied. ©NIIT Deploying .NET Applications/Lesson 16/Slide 8 of 28
  9. 9. Deploying .NET ApplicationsThe Registry EditorProvides a hierarchical representation of the registry on the target computer.Has a layout similar to that of the Windows Registry editor.Is used to add registry keys and values to the registry on the target computer.Contains two panes, the navigation pane and the detailpane. The navigation pane displays a standard set ofregistry keys that correspond to the registry keys on thetarget computer. They are: HKEY_CLASSES_ROOT HKEY_USERS HKEY_CURRENT_USER HKEY_LOCAL_MACHINE ©NIIT Deploying .NET Applications/Lesson 16/Slide 9 of 28
  10. 10. Deploying .NET ApplicationsThe File Types EditorAllows you to specify file types and file associations on a target computer. ©NIIT Deploying .NET Applications/Lesson 16/Slide 10 of 28
  11. 11. Deploying .NET ApplicationsThe User Interface EditorDisplays the dialog boxes that are automatically added by Visual Studio.NET when you create a deployment project.Is used to provide customized dialog boxes.Contains a list of dialog boxes, which are divided into two sections: Install Administrative InstallCategorizes dialog boxes as follows: Start dialog boxes Progress dialog boxes End dialog boxes ©NIIT Deploying .NET Applications/Lesson 16/Slide 11 of 28
  12. 12. Deploying .NET ApplicationsThe Custom Actions EditorIs used to add custom actions to a deployment project.These actions must be compiled into a .dll or an .exe fileand added to the deployment project by using the FileSystem editor. ©NIIT Deploying .NET Applications/Lesson 16/Slide 12 of 28
  13. 13. Deploying .NET ApplicationsThe Launch Conditions EditorIs used to ensure that the version of the operating system on the target computer is appropriate for running your application or search the target computer for aparticular file or a key in the registry.Can be used to add a number of launch conditions. These conditions are: File launch condition Registry launch condition Windows Installer launch condition .NET Framework launch condition Internet Information Services launch condition ©NIIT Deploying .NET Applications/Lesson 16/Slide 13 of 28
  14. 14. Deploying .NET ApplicationsJust a Minute…Which of the following deployment editors can be used tospecify Control Panel settings on the target computer?a) File Systems editorb) Launch Conditions editorc) Registry editord) User Interface editor ©NIIT Deploying .NET Applications/Lesson 16/Slide 14 of 28
  15. 15. Deploying .NET ApplicationsProblem Statement 16.D.1The development of the Call Center module for DiazTelecommunications is complete. The application now needsto be shipped to the client so that it can be installed on usercomputers. The installation process should perform thefollowing tasks:Copy all application files to a user computer.Create a shortcut on the desktop of a computer for starting the application.When a user begins installation, a license agreement shouldbe displayed to the user. The process of installation shouldproceed only when a user accepts the license agreement. ©NIIT Deploying .NET Applications/Lesson 16/Slide 15 of 28
  16. 16. Deploying .NET ApplicationsTask ListIdentify the type of deployment project to be used forcreating the installer.Identify the editors to be used in the deployment project.Create a deployment project.Add the application files to the deployment project.Create a shortcut for the application.Add a dialog box to the deployment project.Build the solution.Execute the installer. ©NIIT Deploying .NET Applications/Lesson 16/Slide 16 of 28
  17. 17. Deploying .NET ApplicationsTask 1: Identify the type of deployment project to beused for creating the installer.Result:In the given scenario, a Windows-based application is to be installed. For this, you can use the Setup and Deployment Projects project type and the Setup Project template. ©NIIT Deploying .NET Applications/Lesson 16/Slide 17 of 28
  18. 18. Deploying .NET ApplicationsTask 2: Identify the editors to be used in thedeployment project.Result:The following table lists the tasks to be performed by the installation package and the editor that can be used to perform the task: Task Editor Copy all files to the target computer File System editor Create a shortcut for the application on File System editor the desktop of a computer Create a shortcut for the application on File System editor the Programs menu Display a license agreement to a user User Interface editor ©NIIT Deploying .NET Applications/Lesson 16/Slide 18 of 28
  19. 19. Deploying .NET ApplicationsTask 3: Create a deployment project.Task 4: Add the application files to the deploymentproject.Task 5: Create a shortcut for the application.Task 6: Add a dialog box to the deployment project.Task 7: Build the solution.Task 8: Execute the installer. ©NIIT Deploying .NET Applications/Lesson 16/Slide 19 of 28
  20. 20. Deploying .NET ApplicationsDeploying ComponentsCOM components suffer from various problems relating to deployment such as: Registration VersioningThe .NET platform solves the issues relating to thedeployment of components by using assemblies. Anassembly has the following features: Is self-describing. Records version information and enforces it at run time. Provides the ability to work with side-by-side components. ©NIIT Deploying .NET Applications/Lesson 16/Slide 20 of 28
  21. 21. Deploying .NET ApplicationsDeploying ComponentsThe process of deploying components involves the following steps: Creating an assembly ® Single-file Assembly ® Multi-file Assembly Deploying an assembly ©NIIT Deploying .NET Applications/Lesson 16/Slide 21 of 28
  22. 22. Deploying .NET ApplicationsJust a Minute…Consider the following files:CalcDisc.VBProductDet.VBList the steps that you will follow to create a single deployableunit containing these two files. ©NIIT Deploying .NET Applications/Lesson 16/Slide 22 of 28
  23. 23. Deploying .NET ApplicationsDeploying Web ServicesIs done simply by copying the .asmx file corresponding to the Web service and the assemblies used by the Webservice to the destination computer that has InternetInformation Services (IIS) 4.0 or later installed on it.Can also be done by using a Web Setup deploymentproject. ©NIIT Deploying .NET Applications/Lesson 16/Slide 23 of 28
  24. 24. Deploying .NET ApplicationsSummaryIn this lesson, you learned that:Deployment is the process of distributing the files thatconstitute an application.To help you create a setup program for your application,Visual Studio .NET provides a special project type calledSetup and Deployment Projects. This project type provides a number of templates for deploying different types of applications.Visual Studio .NET provides four templates for deployment projects. These are: Setup Project: Allows you to package all application files and create a Windows Installer (.msi) file. ©NIIT Deploying .NET Applications/Lesson 16/Slide 24 of 28
  25. 25. Deploying .NET ApplicationsSummary (Contd.) Merge Module Project: Allows you to create a single package that contains all files, resources, registry entries, and the setup logic necessary for deploying a component. Web Setup Project: Allows you to package all files of a Web application or a Web service. Cab Project: Allows you to package components that can be downloaded from a Web Server to a Web browser.Visual Studio .NET provides the following six editors indeployment projects: File System: Allows you to add special folders, custom folders, subfolders, and files to a deployment project. ©NIIT Deploying .NET Applications/Lesson 16/Slide 25 of 28
  26. 26. Deploying .NET ApplicationsSummary (Contd.) Registry: Allows you to add registry keys and values to a deployment project. File Types: Allows you to specify file associations in a deployment project. User Interface: Allows you to add and remove dialog boxes from a deployment project. Custom Actions: Allows you to add custom actions to the deployment project. Launch Conditions: Allows you to specify launch conditions in a deployment project.To solve the problems of registration and version pertaining to the deployment of COM components, Microsoft has introduced assemblies in its .NET platform. ©NIIT Deploying .NET Applications/Lesson 16/Slide 26 of 28
  27. 27. Deploying .NET ApplicationsSummary (Contd.)An assembly has the following features: It is self-describing. It records version information and enforces it at run time. It provides the ability to work with side-by-side components.An assembly may be embedded within a single DLL file.Such an assembly is called a single-file assembly.You can create a single-file assembly by using VisualStudio .NET or the vbc compiler. ©NIIT Deploying .NET Applications/Lesson 16/Slide 27 of 28
  28. 28. Deploying .NET ApplicationsSummary (Contd.)An assembly made up of multiple files is called a multi-file assembly. In case of a multi-file assembly, at least oneof the files in the assembly must contain the assembly manifest.You can create a multi-file assembly by using the Al.exeutility.After creating an assembly for a component, you can create a deployment project to deploy the component.You can deploy a Web service simply by copying the .asmx file corresponding to the Web service and theassemblies used by the Web service to the destinationcomputer.You can also use a Web Setup deployment project todeploy a Web service. ©NIIT Deploying .NET Applications/Lesson 16/Slide 28 of 28

×