Packaging and Deploying .NET ApplicationsPre-Assessment Questions    •    User defined exceptions are derived from the ___...
Packaging and Deploying .NET ApplicationsPre-Assessment Questions (Contd.)    •    Which of the following involves end use...
Packaging and Deploying .NET ApplicationsPre-Assessment Questions (Contd.)    •    Which of the following is not true abou...
Packaging and Deploying .NET ApplicationsPre-Assessment Questions (Contd.)    •    Which of the following is used to locat...
Packaging and Deploying .NET ApplicationsSolutions to Pre-AssessmentQuestions    1.   b.    2.   b.    3.   c.    4.   d. ...
Packaging and Deploying .NET ApplicationsObjectives    In this lesson, you will learn to:         • Create assemblies and ...
Packaging and Deploying .NET ApplicationsWorking with Assemblies    •    An assembly is the collection of all information ...
Packaging and Deploying .NET ApplicationsWorking with Assemblies (Contd.)    •    An assembly that groups all elements in ...
Packaging and Deploying .NET ApplicationsWorking with Assemblies (Contd.)    •    Sharing an assembly and installing it to...
Packaging and Deploying .NET ApplicationsWorking with Assemblies (Contd.)    •    An assembly can be added to the GAC by u...
Packaging and Deploying .NET ApplicationsGetting Started with Deploying .NETApplications    •    The different deployment ...
Packaging and Deploying .NET ApplicationsXCOPY Deployment    •    XCOPY deployment uses the MS-DOS XCOPY command to copy t...
Packaging and Deploying .NET ApplicationsVisual Studio .NET Deployment Tools    •    Visual Studio .NET Deployment Tools a...
Packaging and Deploying .NET ApplicationsVisual Studio .NET Deployment Tools(Contd.)    •    In addition to the templates,...
Packaging and Deploying .NET ApplicationsVisual Studio .NET Deployment Tools(Contd.)    •    When you build a merge module...
Packaging and Deploying .NET ApplicationsDeployment Project Editors    •    Visual Studio.NET provides the following six e...
Packaging and Deploying .NET ApplicationsDeployment Project Editors (Contd.)    •    The File System editor allows you to ...
Packaging and Deploying .NET ApplicationsDeployment Project Editors (Contd.)    •    The Registry editor allows you to per...
Packaging and Deploying .NET ApplicationsDeployment Project Editors (Contd.)    •    The Custom Actions editor allows you ...
Packaging and Deploying .NET ApplicationsDeployment Via Distributable Mediaand Networks    •    For deployment via distrib...
Packaging and Deploying .NET Applications                  Practice         Deploying a Windows Based                 Appl...
Packaging and Deploying .NET ApplicationsProblem Statement    •    The development of the application for a stockbroker’s ...
Packaging and Deploying .NET ApplicationsSolution    To solve the preceding problem, the following steps need to be perfor...
Packaging and Deploying .NET ApplicationsSummaryIn this lesson, you learned that:     •    An assembly is a collection of ...
Packaging and Deploying .NET ApplicationsSummary (Contd.)In this lesson, you learned that:     •    There are two common d...
Packaging and Deploying .NET ApplicationsSummary (Contd.)In this lesson, you learned that:     • Visual Studio .NET provid...
Upcoming SlideShare
Loading in...5
×

Vb.net session 13

322

Published on

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
322
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
0
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Vb.net session 13

  1. 1. Packaging and Deploying .NET ApplicationsPre-Assessment Questions • User defined exceptions are derived from the __________ class. a. System.Exception b. System.ApplicationException c. System.SystemException d. System.CustomException ©NIIT Enhancing and Distributing Applications Lesson 2A / Slide 1 of 26
  2. 2. Packaging and Deploying .NET ApplicationsPre-Assessment Questions (Contd.) • Which of the following involves end user participation? a. Unit Testing. b. Acceptance Testing. c. Regression Testing. d. Integration Testing. ©NIIT Enhancing and Distributing Applications Lesson 2A / Slide 2 of 26
  3. 3. Packaging and Deploying .NET ApplicationsPre-Assessment Questions (Contd.) • Which of the following is not true about test cases? a. Test cases should test every line of code. b. Test cases should include data values outside the range of valid data values. c. Test cases should include all possible allowed data values. d. Test cases should include invalid data values. ©NIIT Enhancing and Distributing Applications Lesson 2A / Slide 3 of 26
  4. 4. Packaging and Deploying .NET ApplicationsPre-Assessment Questions (Contd.) • Which of the following is used to locate and fix known bugs in a program? a. Tracing b. Testing c. Exception Handling d. Debugging • The On Error GoTo 0 statement is used to: • Disable any exception handlers • Pass the control to the first line of code • Pass the control to the last line of code • Pass the control to the next line of code ©NIIT Enhancing and Distributing Applications Lesson 2A / Slide 4 of 26
  5. 5. Packaging and Deploying .NET ApplicationsSolutions to Pre-AssessmentQuestions 1. b. 2. b. 3. c. 4. d. 5. a. ©NIIT Enhancing and Distributing Applications Lesson 2A / Slide 5 of 26
  6. 6. Packaging and Deploying .NET ApplicationsObjectives In this lesson, you will learn to: • Create assemblies and place them in the Global Assembly Cache • Identify the version information stored in an assembly • Implement different deployment strategies • Identify different types of deployment projects • Create a deployment project • Use various editors in a deployment project • Deploy an application ©NIIT Enhancing and Distributing Applications Lesson 2A / Slide 6 of 26
  7. 7. Packaging and Deploying .NET ApplicationsWorking with Assemblies • An assembly is the collection of all information required by the Common Language Runtime (CLR) to execute an application. • An assembly is self-descriptive and consists of three things: • Manifest • Microsoft Intermediate Language Code( MSIL) • Required Resources • There are two types of assemblies: • Single-File • Multi-Fie ©NIIT Enhancing and Distributing Applications Lesson 2A / Slide 7 of 26
  8. 8. Packaging and Deploying .NET ApplicationsWorking with Assemblies (Contd.) • An assembly that groups all elements in a single file is called a single-file assembly • An assembly that groups its elements in multiple files is called a multi-file assembly. • Assemblies can also be classified as: • Private assemblies • Shared assemblies • For assemblies to be shared they must be added to the Global Assembly Cache (GAC). ©NIIT Enhancing and Distributing Applications Lesson 2A / Slide 8 of 26
  9. 9. Packaging and Deploying .NET ApplicationsWorking with Assemblies (Contd.) • Sharing an assembly and installing it to the GAC requires your assembly to be signed with a strong name. • A strong name uniquely identifies an assembly. • To create a strong named assembly, you need to: • Create a strong named key pair using sn.exe utility: sn –k myKey.snk • In the AssemblyInfo file, add attributes that describe the assembly: <Assembly: AssemblyKeyFile (“myKey.snk”)> <Assembly: AssemblyVersion (“1.0.1.2”)> ©NIIT Enhancing and Distributing Applications Lesson 2A / Slide 9 of 26
  10. 10. Packaging and Deploying .NET ApplicationsWorking with Assemblies (Contd.) • An assembly can be added to the GAC by using the following methods: • Using the Windows installer • Using the Gacutil.exe that is the Global Assembly Cache tool. • Using the Windows drag and drop feature. • The version number of the assembly is divided into four parts. They are: • Major version number • Minor version number • Build number • Revision number • The ILDisassembler utility can be used to view information about an assembly. ildasm <assembly name> ©NIIT Enhancing and Distributing Applications Lesson 2A / Slide 10 of 26
  11. 11. Packaging and Deploying .NET ApplicationsGetting Started with Deploying .NETApplications • The different deployment strategies are: • XCOPY Deployment • Visual Studio .NET Deployment Tools ©NIIT Enhancing and Distributing Applications Lesson 2A / Slide 11 of 26
  12. 12. Packaging and Deploying .NET ApplicationsXCOPY Deployment • XCOPY deployment uses the MS-DOS XCOPY command to copy the contents of a directory and subdirectories to a target computer • Limitations of XCOPY Deployment: • Requires that all files needed by the application are located in the application directory. • Requires that the .NET Framework be installed on the target machines. • For applications that requires databases and shared components, the required resources must be available on each client machine. ©NIIT Enhancing and Distributing Applications Lesson 2A / Slide 12 of 26
  13. 13. Packaging and Deploying .NET ApplicationsVisual Studio .NET Deployment Tools • Visual Studio .NET Deployment Tools allow you to create setup programs for deploying applications. • To create a setup program for an application, Visual Studio.NET provides a special project type called Setup and Deployment Projects. • The Setup and Deployment Projects type provides various templates for deploying different types of applications: • Setup Project • Web Setup Project • Merge Module Project • Cab Project ©NIIT Enhancing and Distributing Applications Lesson 2A / Slide 13 of 26
  14. 14. Packaging and Deploying .NET ApplicationsVisual Studio .NET Deployment Tools(Contd.) • In addition to the templates, Visual Studio .NET provides Setup Wizard that simplifies the task of creating a deployment project. • You use the Setup Project template to package all application files and create a Windows Installer (.msi) file. • A Web Setup project is similar to a Setup project but is used to install a Web-based application on a Web server. • A Merge Module Project template should be used to deploy a component that is shared by a number of applications. ©NIIT Enhancing and Distributing Applications Lesson 2A / Slide 14 of 26
  15. 15. Packaging and Deploying .NET ApplicationsVisual Studio .NET Deployment Tools(Contd.) • When you build a merge module project, a .msm file is created. The .msm file cannot be executed independently and must be merged with another deployment project that creates a .msi file. • You use the Cab Project template to package components that can be downloaded from a Web server to a Web browser • The Setup Wizard guides you through a number of steps for creating a basic deployment project. • You can use deployment project editors to specify details like files to be included and registry entries to be made at the time of installation. ©NIIT Enhancing and Distributing Applications Lesson 2A / Slide 15 of 26
  16. 16. Packaging and Deploying .NET ApplicationsDeployment Project Editors • Visual Studio.NET provides the following six editors in deployment projects: • File System • Registry • File Types • User Interface • Custom Actions • Launch Conditions ©NIIT Enhancing and Distributing Applications Lesson 2A / Slide 16 of 26
  17. 17. Packaging and Deploying .NET ApplicationsDeployment Project Editors (Contd.) • The File System editor allows you to perform the following functions: • Add a special folder • Adding a custom folder • Add a subfolder • Delete a folder • Add and remove project outputs • Add and remove files • Add and remove shortcuts ©NIIT Enhancing and Distributing Applications Lesson 2A / Slide 17 of 26
  18. 18. Packaging and Deploying .NET ApplicationsDeployment Project Editors (Contd.) • The Registry editor allows you to perform the following functions: • Add and remove registry keys • Add and remove registry key values • Importing an existing registry file in the registry editor • The File Types editor allows you to perform the following functions: • Add and remove file types • Add and remove actions • The User Interface editor allows you to perform the following functions: • Add and remove dialog boxes • Customize installation dialog boxes ©NIIT Enhancing and Distributing Applications Lesson 2A / Slide 18 of 26
  19. 19. Packaging and Deploying .NET ApplicationsDeployment Project Editors (Contd.) • The Custom Actions editor allows you to add and remove custom actions. • The Launch Conditions editor allows you to perform the following functions: • Add a file launch condition • Add a registry launch condition • Add a windows installer launch condition • Add the .NET Framework launch condition • Add the Internet Information Services launch condition ©NIIT Enhancing and Distributing Applications Lesson 2A / Slide 19 of 26
  20. 20. Packaging and Deploying .NET ApplicationsDeployment Via Distributable Mediaand Networks • For deployment via distributable media, the .msi files created using Visual Studio .NET deployment tools can be copied to a floppy disk or other media. • To deploy to a network location: • Create a Web Setup project. • Use the File System Editor to add the project output group for the application to the Web Setup project. • After building the installer, copy it to the server computer, from where it can be downloaded over the network. ©NIIT Enhancing and Distributing Applications Lesson 2A / Slide 20 of 26
  21. 21. Packaging and Deploying .NET Applications Practice Deploying a Windows Based Application ©NIIT Enhancing and Distributing Applications Lesson 2A / Slide 21 of 26
  22. 22. Packaging and Deploying .NET ApplicationsProblem Statement • The development of the application for a stockbroker’s office is complete. The application now needs to be shipped to the client so that it can be installed on user computers. The installation process should perform the following tasks: • Copy all application files to a user computer. • Create a shortcut on the desktop of a computer to start the application. • When a user begins installation, a license agreement should be displayed to the user. The process of installation should proceed only when a user accepts the license agreement. ©NIIT Enhancing and Distributing Applications Lesson 2A / Slide 22 of 26
  23. 23. Packaging and Deploying .NET ApplicationsSolution To solve the preceding problem, the following steps need to be performed: 1. Create a Deployment Project 2. Add the application files to the deployment project 3. Create a shortcut of the application 4. Add a dialog box to the deployment project 5. Build the solution and execute the installer ©NIIT Enhancing and Distributing Applications Lesson 2A / Slide 23 of 26
  24. 24. Packaging and Deploying .NET ApplicationsSummaryIn this lesson, you learned that: • An assembly is a collection of all information required by the Common Language Runtime (CLR) to execute your application. • Deployment is the process of distributing the files that constitute an application. • An assembly that groups all files in a single file is called a single-file assembly. • An assembly made up of multiple files is called a multi-file assembly. • Assemblies can be private or shared. • For sharing an assembly it needs to be installed in the Global Assembly Cache. • After creating an assembly for a component, you can create a deployment project to deploy the component. ©NIIT Enhancing and Distributing Applications Lesson 2A / Slide 24 of 26
  25. 25. Packaging and Deploying .NET ApplicationsSummary (Contd.)In this lesson, you learned that: • There are two common deployment strategies available with .NET. They are: • XCOPY Deployment • Setup and Deployment projects • To help you create a setup program for your application, Visual Studio.NET provides a special project type called Setup and Deployment Projects. • The Setup and Deployment Project type provides a number of templates for deploying different types of applications. These are: • Setup Project • Merge Module Project • Web Setup Project • Cab Project ©NIIT Enhancing and Distributing Applications Lesson 2A / Slide 25 of 26
  26. 26. Packaging and Deploying .NET ApplicationsSummary (Contd.)In this lesson, you learned that: • Visual Studio .NET provides the following six editors in deployment projects: • File System • Registry • File Types • User Interface • Custom Actions • Launch Conditions ©NIIT Enhancing and Distributing Applications Lesson 2A / Slide 26 of 26

×