SlideShare a Scribd company logo
1 of 26
Packaging and Deploying .NET Applications


Pre-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
Packaging and Deploying .NET Applications


Pre-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
Packaging and Deploying .NET Applications


Pre-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
Packaging and Deploying .NET Applications


Pre-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
Packaging and Deploying .NET Applications


Solutions to Pre-Assessment
Questions
    1.   b.
    2.   b.
    3.   c.
    4.   d.
    5.   a.




 ©NIIT        Enhancing and Distributing Applications   Lesson 2A / Slide 5 of 26
Packaging and Deploying .NET Applications


Objectives
    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
Packaging and Deploying .NET Applications


Working 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
Packaging and Deploying .NET Applications


Working 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
Packaging and Deploying .NET Applications


Working 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
Packaging and Deploying .NET Applications


Working 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
Packaging and Deploying .NET Applications


Getting Started with Deploying .NET
Applications
    •    The different deployment strategies are:


          •   XCOPY Deployment
          •   Visual Studio .NET Deployment Tools




 ©NIIT              Enhancing and Distributing Applications   Lesson 2A / Slide 11 of 26
Packaging and Deploying .NET Applications


XCOPY 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
Packaging and Deploying .NET Applications


Visual 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
Packaging and Deploying .NET Applications


Visual 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
Packaging and Deploying .NET Applications


Visual 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
Packaging and Deploying .NET Applications


Deployment 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
Packaging and Deploying .NET Applications


Deployment 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
Packaging and Deploying .NET Applications


Deployment 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
Packaging and Deploying .NET Applications


Deployment 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
Packaging and Deploying .NET Applications


Deployment Via Distributable Media
and 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
Packaging and Deploying .NET Applications




                  Practice
         Deploying a Windows Based
                 Application




 ©NIIT      Enhancing and Distributing Applications   Lesson 2A / Slide 21 of 26
Packaging and Deploying .NET Applications


Problem 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
Packaging and Deploying .NET Applications


Solution
    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
Packaging and Deploying .NET Applications


Summary
In 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
Packaging and Deploying .NET Applications


Summary (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
Packaging and Deploying .NET Applications


Summary (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

More Related Content

Similar to Vb.net session 13

Vb.net session 14
Vb.net session 14Vb.net session 14
Vb.net session 14Niit Care
 
Vb net xp_16
Vb net xp_16Vb net xp_16
Vb net xp_16Niit Care
 
Vb.net session 09
Vb.net session 09Vb.net session 09
Vb.net session 09Niit Care
 
Vb.net session 01
Vb.net session 01Vb.net session 01
Vb.net session 01Niit Care
 
Montreal Kubernetes Meetup: Developer-first workflows (for microservices) on ...
Montreal Kubernetes Meetup: Developer-first workflows (for microservices) on ...Montreal Kubernetes Meetup: Developer-first workflows (for microservices) on ...
Montreal Kubernetes Meetup: Developer-first workflows (for microservices) on ...Ambassador Labs
 
(WPF + WinForms) * .NET Core = Modern Desktop
(WPF + WinForms) * .NET Core = Modern Desktop(WPF + WinForms) * .NET Core = Modern Desktop
(WPF + WinForms) * .NET Core = Modern DesktopOren Novotny
 
V mware thin app 4.5 what_s new presentation
V mware thin app 4.5 what_s new presentationV mware thin app 4.5 what_s new presentation
V mware thin app 4.5 what_s new presentationsolarisyourep
 
Deploy and Update Jakarta EE & MicroProfile applications with Paketo.pptx
Deploy and Update Jakarta EE & MicroProfile applications with Paketo.pptxDeploy and Update Jakarta EE & MicroProfile applications with Paketo.pptx
Deploy and Update Jakarta EE & MicroProfile applications with Paketo.pptxJamie Coleman
 
Why is .Net Technology Recognised for Software Development?
Why is .Net Technology Recognised for Software Development?Why is .Net Technology Recognised for Software Development?
Why is .Net Technology Recognised for Software Development?LOGINPHP360
 
Building reference images with mdt compress - MCT EU Summit - Portugal 2015
Building reference images with mdt compress - MCT EU Summit - Portugal 2015Building reference images with mdt compress - MCT EU Summit - Portugal 2015
Building reference images with mdt compress - MCT EU Summit - Portugal 2015Herman Arnedo
 
Why is .Net Technology Recognised for Software Development?
Why is .Net Technology Recognised for Software Development?Why is .Net Technology Recognised for Software Development?
Why is .Net Technology Recognised for Software Development?LOGINPHP360
 
6294 a planning and managing windows 7 desktop deployments and environments
6294 a planning and managing windows 7 desktop deployments and environments6294 a planning and managing windows 7 desktop deployments and environments
6294 a planning and managing windows 7 desktop deployments and environmentsbestip
 
Establish reliable builds and deployments with Magento
Establish reliable builds and deployments with MagentoEstablish reliable builds and deployments with Magento
Establish reliable builds and deployments with MagentoUnic
 
VMworld 2013: ThinApp 101 and What's New in ThinApp Next Version
VMworld 2013: ThinApp 101 and What's New in ThinApp Next VersionVMworld 2013: ThinApp 101 and What's New in ThinApp Next Version
VMworld 2013: ThinApp 101 and What's New in ThinApp Next VersionVMworld
 

Similar to Vb.net session 13 (20)

Vb.net session 14
Vb.net session 14Vb.net session 14
Vb.net session 14
 
Vb net xp_16
Vb net xp_16Vb net xp_16
Vb net xp_16
 
Vb.net session 09
Vb.net session 09Vb.net session 09
Vb.net session 09
 
Vb.net session 01
Vb.net session 01Vb.net session 01
Vb.net session 01
 
Application slides
Application slidesApplication slides
Application slides
 
Montreal Kubernetes Meetup: Developer-first workflows (for microservices) on ...
Montreal Kubernetes Meetup: Developer-first workflows (for microservices) on ...Montreal Kubernetes Meetup: Developer-first workflows (for microservices) on ...
Montreal Kubernetes Meetup: Developer-first workflows (for microservices) on ...
 
About .net
About .net About .net
About .net
 
(WPF + WinForms) * .NET Core = Modern Desktop
(WPF + WinForms) * .NET Core = Modern Desktop(WPF + WinForms) * .NET Core = Modern Desktop
(WPF + WinForms) * .NET Core = Modern Desktop
 
Ajs 1 c
Ajs 1 cAjs 1 c
Ajs 1 c
 
V mware thin app 4.5 what_s new presentation
V mware thin app 4.5 what_s new presentationV mware thin app 4.5 what_s new presentation
V mware thin app 4.5 what_s new presentation
 
Deploy and Update Jakarta EE & MicroProfile applications with Paketo.pptx
Deploy and Update Jakarta EE & MicroProfile applications with Paketo.pptxDeploy and Update Jakarta EE & MicroProfile applications with Paketo.pptx
Deploy and Update Jakarta EE & MicroProfile applications with Paketo.pptx
 
Why is .Net Technology Recognised for Software Development?
Why is .Net Technology Recognised for Software Development?Why is .Net Technology Recognised for Software Development?
Why is .Net Technology Recognised for Software Development?
 
Training
TrainingTraining
Training
 
Developing NuGet
Developing NuGetDeveloping NuGet
Developing NuGet
 
Building reference images with mdt compress - MCT EU Summit - Portugal 2015
Building reference images with mdt compress - MCT EU Summit - Portugal 2015Building reference images with mdt compress - MCT EU Summit - Portugal 2015
Building reference images with mdt compress - MCT EU Summit - Portugal 2015
 
Why is .Net Technology Recognised for Software Development?
Why is .Net Technology Recognised for Software Development?Why is .Net Technology Recognised for Software Development?
Why is .Net Technology Recognised for Software Development?
 
6294 a planning and managing windows 7 desktop deployments and environments
6294 a planning and managing windows 7 desktop deployments and environments6294 a planning and managing windows 7 desktop deployments and environments
6294 a planning and managing windows 7 desktop deployments and environments
 
Assemblies
AssembliesAssemblies
Assemblies
 
Establish reliable builds and deployments with Magento
Establish reliable builds and deployments with MagentoEstablish reliable builds and deployments with Magento
Establish reliable builds and deployments with Magento
 
VMworld 2013: ThinApp 101 and What's New in ThinApp Next Version
VMworld 2013: ThinApp 101 and What's New in ThinApp Next VersionVMworld 2013: ThinApp 101 and What's New in ThinApp Next Version
VMworld 2013: ThinApp 101 and What's New in ThinApp Next Version
 

More from Niit Care (20)

Ajs 1 b
Ajs 1 bAjs 1 b
Ajs 1 b
 
Ajs 4 b
Ajs 4 bAjs 4 b
Ajs 4 b
 
Ajs 4 a
Ajs 4 aAjs 4 a
Ajs 4 a
 
Ajs 4 c
Ajs 4 cAjs 4 c
Ajs 4 c
 
Ajs 3 b
Ajs 3 bAjs 3 b
Ajs 3 b
 
Ajs 3 a
Ajs 3 aAjs 3 a
Ajs 3 a
 
Ajs 3 c
Ajs 3 cAjs 3 c
Ajs 3 c
 
Ajs 2 b
Ajs 2 bAjs 2 b
Ajs 2 b
 
Ajs 2 a
Ajs 2 aAjs 2 a
Ajs 2 a
 
Ajs 2 c
Ajs 2 cAjs 2 c
Ajs 2 c
 
Ajs 1 a
Ajs 1 aAjs 1 a
Ajs 1 a
 
Dacj 4 2-c
Dacj 4 2-cDacj 4 2-c
Dacj 4 2-c
 
Dacj 4 2-b
Dacj 4 2-bDacj 4 2-b
Dacj 4 2-b
 
Dacj 4 2-a
Dacj 4 2-aDacj 4 2-a
Dacj 4 2-a
 
Dacj 4 1-c
Dacj 4 1-cDacj 4 1-c
Dacj 4 1-c
 
Dacj 4 1-b
Dacj 4 1-bDacj 4 1-b
Dacj 4 1-b
 
Dacj 4 1-a
Dacj 4 1-aDacj 4 1-a
Dacj 4 1-a
 
Dacj 1-2 b
Dacj 1-2 bDacj 1-2 b
Dacj 1-2 b
 
Dacj 1-3 c
Dacj 1-3 cDacj 1-3 c
Dacj 1-3 c
 
Dacj 1-3 b
Dacj 1-3 bDacj 1-3 b
Dacj 1-3 b
 

Recently uploaded

Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 

Recently uploaded (20)

Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 

Vb.net session 13

  • 1. Packaging and Deploying .NET Applications Pre-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. Packaging and Deploying .NET Applications Pre-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. Packaging and Deploying .NET Applications Pre-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. Packaging and Deploying .NET Applications Pre-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. Packaging and Deploying .NET Applications Solutions to Pre-Assessment Questions 1. b. 2. b. 3. c. 4. d. 5. a. ©NIIT Enhancing and Distributing Applications Lesson 2A / Slide 5 of 26
  • 6. Packaging and Deploying .NET Applications Objectives 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. Packaging and Deploying .NET Applications Working 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. Packaging and Deploying .NET Applications Working 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. Packaging and Deploying .NET Applications Working 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. Packaging and Deploying .NET Applications Working 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. Packaging and Deploying .NET Applications Getting Started with Deploying .NET Applications • The different deployment strategies are: • XCOPY Deployment • Visual Studio .NET Deployment Tools ©NIIT Enhancing and Distributing Applications Lesson 2A / Slide 11 of 26
  • 12. Packaging and Deploying .NET Applications XCOPY 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. Packaging and Deploying .NET Applications Visual 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. Packaging and Deploying .NET Applications Visual 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. Packaging and Deploying .NET Applications Visual 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. Packaging and Deploying .NET Applications Deployment 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. Packaging and Deploying .NET Applications Deployment 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. Packaging and Deploying .NET Applications Deployment 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. Packaging and Deploying .NET Applications Deployment 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. Packaging and Deploying .NET Applications Deployment Via Distributable Media and 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. Packaging and Deploying .NET Applications Practice Deploying a Windows Based Application ©NIIT Enhancing and Distributing Applications Lesson 2A / Slide 21 of 26
  • 22. Packaging and Deploying .NET Applications Problem 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. Packaging and Deploying .NET Applications Solution 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. Packaging and Deploying .NET Applications Summary In 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. Packaging and Deploying .NET Applications Summary (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. Packaging and Deploying .NET Applications Summary (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