﻿<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/">
  <channel>
    <title>Charles Nurse</title>
    <description>My personal blog on DotNetNuke.</description>
    <link>http://www.dotnetnuke.com/Community/Blogs/tabid/825/BlogId/15/Default.aspx</link>
    <language>en-US</language>
    <webMaster>admin1@dotnetnuke.com</webMaster>
    <pubDate>Sat, 10 May 2008 18:27:23 GMT</pubDate>
    <lastBuildDate>Sat, 10 May 2008 18:27:23 GMT</lastBuildDate>
    <docs>http://backend.userland.com/rss</docs>
    <generator>Blog RSS Generator Version 3.4.0.39853</generator>
    <item>
      <title>Gleanings From the Wet Coast - Agile and TDD</title>
      <description>&lt;p&gt;This Blog is the first in a series of Blogs that I intend to write about new concepts and ideas that I discover in my travels through .NET.  These will not neccessarily be my ideas - in fact most of them won't be, but I hope you will find them interesting and useful for your own development projects.&lt;/p&gt;
&lt;p&gt;A few weeks ago when the new codeplex-based DNN Forge was introduced, I created a project that I called "The Family Tree project".  I have been working off-and-on for about 3 years on both a GEDCOM parser and a rich Object Model for managing Family Tree information.  The problem I had with this project is that early on I had taken a Waterfall approach to the design, and as this was a hobby project - and therefore I had limited time to work on it - the progress was painfully slow.&lt;/p&gt;
&lt;p&gt;On Friday, after returning from the MVP summit and seeing all the cool new stuff coming along as well as a new emphasis on Test Driven Development, I decided to take a new approach to this project.&lt;/p&gt;
&lt;p&gt;I decided to start anew - using an Agile development process.  Why an Agile process?  My previous efforts resulted in poor progress as the tasks seemed so large to complete, and so I always found excuses to do something more interesting.  Using an Agile process I can work on a single feature (eg List all Individuals) and get that feature working at all levels, before moving on to the next feature.&lt;/p&gt;
&lt;p&gt;Andrew had recently downloaded Rob Conery's videos where he uses a TDD approach to rewiting the Commerce Starter Kit using MVC.  So we decided to try using TDD (Test Driven Development) ourselves on this project.  As I expect the project to take some time to complete, we also deccided to build it in ASP.NET 3.5 using the latest bits.&lt;/p&gt;
&lt;p&gt;On Saturday, Andrew and I spent most of the day "Pair-Programming" the first "feature" - List Individuals.  In about 6 hrs we were able to complete all the tests to test all layers of the application, from the View down to the database for this single feature. &lt;/p&gt;
&lt;p&gt;So even before we actually browsed to the page we were pretty confident that everything would work - and it did.  Next we added the tests for "View" a single Individual.  As we had built much of the framework and hooks between the layers, this took less than an hour to complete, and again once we knew all the tests worked we were quite confident that browsing to the site would work and it did.  These two features, which are essentially feature complete (although all we are returniing is a first name and last name for each individual) resulted in 28 tests.  It really is cool to see all those green lights each time you make a change.&lt;/p&gt;
&lt;p&gt;Although, you might think that TDD is more time-consuming as you have to write a whole bunch of test code - I think these results demonstrate that you can be productive - as you can be confident - if each test continues to pass - that new work does not break what you have already completed.&lt;/p&gt;
&lt;p&gt;It is hard to convert an existing project like DNN to Test Driven Development - but I would urge you to consider this approach when starting new projects.&lt;/p&gt;
&lt;p&gt;In future Blogs in this series I will share with you my "Gleanings" as we work through the  project.  Below is a list of some of the decisions we have made about what we will use for this project, but as we are being Agile this is just a first stab.&lt;/p&gt;
&lt;ol&gt;
    &lt;li&gt;Use a TDD development approach to test ALL Layers of the Application.&lt;/li&gt;
    &lt;li&gt;Use MoQ as a Mocking Framework to help in the testing - we will also use a Web testing framework like WATIN or WebAii, so we can automate tests on the "browser" part of the equation.&lt;/li&gt;
    &lt;li&gt;Use an IoC (Inversion of Control) Container&lt;/li&gt;
    &lt;li&gt;Use all the new syntax sugar in C# 3.0 like Extension methods, Lambda Expressions, LINQ  - sorry, I do all my non-dnn development in C# so I can keep up to date in both languages.&lt;/li&gt;
    &lt;li&gt;Use LINQ in the Data Layer (LINQ to SQL for now - but we may switch to LINQ to NHibernate or LINQ to Entities)&lt;/li&gt;
    &lt;li&gt;Build an MVC-based Website front end - Initially this part of the project is mainly designed as a learning experience, but this may become a full-blown application&lt;/li&gt;
    &lt;li&gt;Create an MVP (Module View Presenter) style Module for DNN (see Phil's blogs on this approach to Module Development)&lt;/li&gt;
    &lt;li&gt;Expose a Web Services Interface for Silverlight (RIA) and WPF (Windows) clients&lt;/li&gt;
&lt;/ol&gt;</description>
      <link>http://www.dotnetnuke.com/Community/Blogs/tabid/825/EntryID/1810/Default.aspx</link>
      <comments>http://www.dotnetnuke.com/Community/Blogs/tabid/825/EntryID/1810/Default.aspx#Comments</comments>
      <guid isPermaLink="true">http://www.dotnetnuke.com/Default.aspx?tabid=825&amp;EntryID=1810</guid>
      <pubDate>Mon, 21 Apr 2008 08:00:00 GMT</pubDate>
      <slash:comments>3</slash:comments>
      <trackback:ping>http://www.dotnetnuke.com/DesktopModules/Blog/Trackback.aspx?id=1810</trackback:ping>
    </item>
    <item>
      <title>Cambrian First Look - Extension Installer (Pt 3)</title>
      <description>&lt;p&gt;In my previous blog in this series I described how the new Extension Installer processes the manifest.  In summary the Installer creates an instance of a PackageInstaller and passes the manifest to it.  The PackageInstaller then parses the manifest and creates a ComponentInstaller for each component referenced in the manifest.  we sthus end up with the PackageInstaller having a collection (SortedList(Of T)) of ComponentInstallers.&lt;/p&gt;
&lt;h3&gt;Installing the Package&lt;/h3&gt;
&lt;p&gt;In this blog I will describe the next step in the process - Installing the Package.  As in my previous blog we will start in the Install wizard.&lt;/p&gt;
&lt;p&gt;&lt;!--
{\rtf1\ansi\ansicpg\lang1024\noproof1252\uc1 \deff0{\fonttbl{\f0\fnil\fcharset0\fprq1 Consolas;}}{\colortbl;??\red255\green255\blue255;\red0\green0\blue0;\red204\green120\blue50;\red0\green255\blue0;\red165\green194\blue92;\red104\green151\blue187;}??\fs20 \cf1\cb2\highlight2 {\b         }\cf3 {\b Private}\cf1 {\b  }\cf3 {\b Sub}\cf1 {\b  InstallPackage(}\cf3 {\b ByVal}\cf1 {\b  e }\cf3 {\b As}\cf1 {\b  System.Web.UI.WebControls.WizardNavigationEventArgs)}\par ??{\b             CreateInstaller()}\par ??\par ??{\b             }\cf3 {\b If}\cf1 {\b  Installer.IsValid }\cf3 {\b Then}\par ??\cf1 {\b                 }\cf4 {\b 'Reset Log}\par ??\cf1 {\b                 Installer.InstallerInfo.Log.Logs.Clear()}\par ??\par ??{\b                 }\cf4 {\b 'Install}\par ??\cf1 {\b                 Installer.Install()}\par ??\par ??{\b                 }\cf3 {\b If}\cf1 {\b  }\cf3 {\b Not}\cf1 {\b  Installer.IsValid }\cf3 {\b Then}\par ??\cf1 {\b                     lblInstallMessage.Text = Localization.GetString(}\cf5 "InstallError"\cf1 {\b , LocalResourceFile)}\par ??{\b                 }\cf3 {\b End}\cf1 {\b  }\cf3 {\b If}\par ??\par ??\cf1 {\b                 phInstallLogs.Controls.Add(Installer.InstallerInfo.Log.GetLogsTable)}\par ??{\b             }\cf3 {\b Else}\par ??\cf1 {\b                 }\cf4 {\b 'Error reading Manifest}\par ??\cf1 {\b                 }\cf3 {\b Select}\cf1 {\b  }\cf3 {\b Case}\cf1 {\b  e.CurrentStepIndex}\par ??{\b                     }\cf3 {\b Case}\cf1 {\b  }\cf6 2\par ??\cf1 {\b                         lblAcceptMessage.Text = Localization.GetString(}\cf5 "InstallError"\cf1 {\b , LocalResourceFile)}\par ??{\b                         phAcceptLogs.Controls.Add(Installer.InstallerInfo.Log.GetLogsTable)}\par ??{\b                     }\cf3 {\b Case}\cf1 {\b  }\cf6 3\par ??\cf1 {\b                         lblInstallMessage.Text = Localization.GetString(}\cf5 "InstallError"\cf1 {\b , LocalResourceFile)}\par ??{\b                         phInstallLogs.Controls.Add(Installer.InstallerInfo.Log.GetLogsTable)}\par ??{\b                 }\cf3 {\b End}\cf1 {\b  }\cf3 {\b Select}\par ??\cf1 {\b                 e.Cancel = }\cf3 {\b True}\par ??\cf1 {\b             }\cf3 {\b End}\cf1 {\b  }\cf3 {\b If}\par ??\cf1 {\b         }\cf3 {\b End}\cf1 {\b  }\cf3 {\b Sub}\par ??}
--&gt;&lt;/p&gt;
&lt;div style="background: black none repeat scroll 0% 50%; font-family: Consolas; font-size: 10pt; color: white; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; font-weight: bold;"&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  292&lt;/span&gt;         &lt;span style="color: rgb(204, 120, 50);"&gt;Private&lt;/span&gt; &lt;span style="color: rgb(204, 120, 50);"&gt;Sub&lt;/span&gt; InstallPackage(&lt;span style="color: rgb(204, 120, 50);"&gt;ByVal&lt;/span&gt; e &lt;span style="color: rgb(204, 120, 50);"&gt;As&lt;/span&gt; System.Web.UI.WebControls.WizardNavigationEventArgs)&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  293&lt;/span&gt;             CreateInstaller()&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  294&lt;/span&gt; &lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  295&lt;/span&gt;             &lt;span style="color: rgb(204, 120, 50);"&gt;If&lt;/span&gt; Installer.IsValid &lt;span style="color: rgb(204, 120, 50);"&gt;Then&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  296&lt;/span&gt;                 &lt;span style="color: lime;"&gt;'Reset Log&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  297&lt;/span&gt;                 Installer.InstallerInfo.Log.Logs.Clear()&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  298&lt;/span&gt; &lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  299&lt;/span&gt;                 &lt;span style="color: lime;"&gt;'Install&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  300&lt;/span&gt;                 Installer.Install()&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  301&lt;/span&gt; &lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  302&lt;/span&gt;                 &lt;span style="color: rgb(204, 120, 50);"&gt;If&lt;/span&gt; &lt;span style="color: rgb(204, 120, 50);"&gt;Not&lt;/span&gt; Installer.IsValid &lt;span style="color: rgb(204, 120, 50);"&gt;Then&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  303&lt;/span&gt;                     lblInstallMessage.Text = Localization.GetString(&lt;span style="color: rgb(165, 194, 92); font-weight: normal;"&gt;"InstallError"&lt;/span&gt;, LocalResourceFile)&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  304&lt;/span&gt;                 &lt;span style="color: rgb(204, 120, 50);"&gt;End&lt;/span&gt; &lt;span style="color: rgb(204, 120, 50);"&gt;If&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  305&lt;/span&gt; &lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  306&lt;/span&gt;                 phInstallLogs.Controls.Add(Installer.InstallerInfo.Log.GetLogsTable)&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  307&lt;/span&gt;             &lt;span style="color: rgb(204, 120, 50);"&gt;Else&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  308&lt;/span&gt;                 &lt;span style="color: lime;"&gt;'Error reading Manifest&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  309&lt;/span&gt;                 &lt;span style="color: rgb(204, 120, 50);"&gt;Select&lt;/span&gt; &lt;span style="color: rgb(204, 120, 50);"&gt;Case&lt;/span&gt; e.CurrentStepIndex&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  310&lt;/span&gt;                     &lt;span style="color: rgb(204, 120, 50);"&gt;Case&lt;/span&gt; &lt;span style="color: rgb(104, 151, 187); font-weight: normal;"&gt;2&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  311&lt;/span&gt;                         lblAcceptMessage.Text = Localization.GetString(&lt;span style="color: rgb(165, 194, 92); font-weight: normal;"&gt;"InstallError"&lt;/span&gt;, LocalResourceFile)&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  312&lt;/span&gt;                         phAcceptLogs.Controls.Add(Installer.InstallerInfo.Log.GetLogsTable)&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  313&lt;/span&gt;                     &lt;span style="color: rgb(204, 120, 50);"&gt;Case&lt;/span&gt; &lt;span style="color: rgb(104, 151, 187); font-weight: normal;"&gt;3&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  314&lt;/span&gt;                         lblInstallMessage.Text = Localization.GetString(&lt;span style="color: rgb(165, 194, 92); font-weight: normal;"&gt;"InstallError"&lt;/span&gt;, LocalResourceFile)&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  315&lt;/span&gt;                         phInstallLogs.Controls.Add(Installer.InstallerInfo.Log.GetLogsTable)&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  316&lt;/span&gt;                 &lt;span style="color: rgb(204, 120, 50);"&gt;End&lt;/span&gt; &lt;span style="color: rgb(204, 120, 50);"&gt;Select&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  317&lt;/span&gt;                 e.Cancel = &lt;span style="color: rgb(204, 120, 50);"&gt;True&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  318&lt;/span&gt;             &lt;span style="color: rgb(204, 120, 50);"&gt;End&lt;/span&gt; &lt;span style="color: rgb(204, 120, 50);"&gt;If&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  319&lt;/span&gt;         &lt;span style="color: rgb(204, 120, 50);"&gt;End&lt;/span&gt; &lt;span style="color: rgb(204, 120, 50);"&gt;Sub&lt;/span&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;The InstallPackage method first creates the Installer (and parses the manfest).  As long as the manifest is valid, it clears the Logs and call the Install method of the Installer.  If the Install fails for any reason it displays a message to the user.  In both cases (success or failure) the Logs are displayed so the user can see the results of the install.&lt;/p&gt;
&lt;p&gt;&lt;!--
{\rtf1\ansi\ansicpg\lang1024\noproof1252\uc1 \deff0{\fonttbl{\f0\fnil\fcharset0\fprq1 Consolas;}}{\colortbl;??\red255\green255\blue255;\red0\green0\blue0;\red204\green120\blue50;\red0\green255\blue0;\red165\green194\blue92;}??\fs20 \cf1\cb2\highlight2 {\b         }\cf3 {\b Public}\cf1 {\b  }\cf3 {\b Function}\cf1 {\b  Install() }\cf3 {\b As}\cf1 {\b  }\cf3 {\b Boolean}\par ??\cf1 {\b             InstallerInfo.Log.StartJob(Util.INSTALL_Start)}\par ??{\b             }\cf3 {\b Dim}\cf1 {\b  bStatus }\cf3 {\b As}\cf1 {\b  }\cf3 {\b Boolean}\cf1 {\b  = }\cf3 {\b True}\par ??\cf1 {\b             }\cf3 {\b Try}\par ??\cf1 {\b                 InstallPackages()}\par ??{\b             }\cf3 {\b Catch}\cf1 {\b  ex }\cf3 {\b As}\cf1 {\b  Exception}\par ??{\b                 InstallerInfo.Log.AddFailure(ex)}\par ??{\b                 bStatus = }\cf3 {\b False}\par ??\cf1 {\b             }\cf3 {\b End}\cf1 {\b  }\cf3 {\b Try}\par ??\par ??\cf1 {\b             }\cf3 {\b If}\cf1 {\b  InstallerInfo.Log.Valid }\cf3 {\b Then}\par ??\cf1 {\b                 InstallerInfo.Log.EndJob(Util.INSTALL_Success)}\par ??{\b             }\cf3 {\b Else}\par ??\cf1 {\b                 InstallerInfo.Log.EndJob(Util.INSTALL_Failed)}\par ??{\b             }\cf3 {\b End}\cf1 {\b  }\cf3 {\b If}\par ??\par ??\cf1 {\b             }\cf4 {\b ' log installation event}\par ??\cf1 {\b             LogInstallEvent(}\cf5 "Package"\cf1 {\b )}\par ??\par ??{\b             }\cf4 {\b 'Clear Host Cache}\par ??\cf1 {\b             DataCache.ClearHostCache(}\cf3 {\b True}\cf1 {\b )}\par ??\par ??{\b             }\cf3 {\b Return}\cf1 {\b  bStatus}\par ??{\b         }\cf3 {\b End}\cf1 {\b  }\cf3 {\b Function}\par ??}
--&gt;&lt;/p&gt;
&lt;div style="background: black none repeat scroll 0% 50%; font-family: Consolas; font-size: 10pt; color: white; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; font-weight: bold;"&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  325&lt;/span&gt;         &lt;span style="color: rgb(204, 120, 50);"&gt;Public&lt;/span&gt; &lt;span style="color: rgb(204, 120, 50);"&gt;Function&lt;/span&gt; Install() &lt;span style="color: rgb(204, 120, 50);"&gt;As&lt;/span&gt; &lt;span style="color: rgb(204, 120, 50);"&gt;Boolean&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  326&lt;/span&gt;             InstallerInfo.Log.StartJob(Util.INSTALL_Start)&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  327&lt;/span&gt;             &lt;span style="color: rgb(204, 120, 50);"&gt;Dim&lt;/span&gt; bStatus &lt;span style="color: rgb(204, 120, 50);"&gt;As&lt;/span&gt; &lt;span style="color: rgb(204, 120, 50);"&gt;Boolean&lt;/span&gt; = &lt;span style="color: rgb(204, 120, 50);"&gt;True&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  328&lt;/span&gt;             &lt;span style="color: rgb(204, 120, 50);"&gt;Try&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  329&lt;/span&gt;                 InstallPackages()&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  330&lt;/span&gt;             &lt;span style="color: rgb(204, 120, 50);"&gt;Catch&lt;/span&gt; ex &lt;span style="color: rgb(204, 120, 50);"&gt;As&lt;/span&gt; Exception&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  331&lt;/span&gt;                 InstallerInfo.Log.AddFailure(ex)&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  332&lt;/span&gt;                 bStatus = &lt;span style="color: rgb(204, 120, 50);"&gt;False&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  333&lt;/span&gt;             &lt;span style="color: rgb(204, 120, 50);"&gt;End&lt;/span&gt; &lt;span style="color: rgb(204, 120, 50);"&gt;Try&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  334&lt;/span&gt; &lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  335&lt;/span&gt;             &lt;span style="color: rgb(204, 120, 50);"&gt;If&lt;/span&gt; InstallerInfo.Log.Valid &lt;span style="color: rgb(204, 120, 50);"&gt;Then&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  336&lt;/span&gt;                 InstallerInfo.Log.EndJob(Util.INSTALL_Success)&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  337&lt;/span&gt;             &lt;span style="color: rgb(204, 120, 50);"&gt;Else&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  338&lt;/span&gt;                 InstallerInfo.Log.EndJob(Util.INSTALL_Failed)&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  339&lt;/span&gt;             &lt;span style="color: rgb(204, 120, 50);"&gt;End&lt;/span&gt; &lt;span style="color: rgb(204, 120, 50);"&gt;If&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  340&lt;/span&gt; &lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  341&lt;/span&gt;             &lt;span style="color: lime;"&gt;' log installation event&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  342&lt;/span&gt;             LogInstallEvent(&lt;span style="color: rgb(165, 194, 92); font-weight: normal;"&gt;"Package"&lt;/span&gt;)&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  343&lt;/span&gt; &lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  344&lt;/span&gt;             &lt;span style="color: lime;"&gt;'Clear Host Cache&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  345&lt;/span&gt;             DataCache.ClearHostCache(&lt;span style="color: rgb(204, 120, 50);"&gt;True&lt;/span&gt;)&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  346&lt;/span&gt; &lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  347&lt;/span&gt;             &lt;span style="color: rgb(204, 120, 50);"&gt;Return&lt;/span&gt; bStatus&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  348&lt;/span&gt;         &lt;span style="color: rgb(204, 120, 50);"&gt;End&lt;/span&gt; &lt;span style="color: rgb(204, 120, 50);"&gt;Function&lt;/span&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;The Install method attempts to install the packages(line 329), loggeing any exception that might occur.  The results of the installation are logged to the EventLog and the Host Cache is cleared.&lt;/p&gt;
&lt;p&gt;&lt;!--
{\rtf1\ansi\ansicpg\lang1024\noproof1252\uc1 \deff0{\fonttbl{\f0\fnil\fcharset0\fprq1 Consolas;}}{\colortbl;??\red255\green255\blue255;\red0\green0\blue0;\red204\green120\blue50;\red0\green255\blue0;\red165\green194\blue92;}??\fs20 \cf1\cb2\highlight2 {\b         }\cf3 {\b Private}\cf1 {\b  }\cf3 {\b Sub}\cf1 {\b  InstallPackages()}\par ??{\b             }\cf4 {\b 'Iterate through all the Packages}\par ??\cf1 {\b             }\cf3 {\b For}\cf1 {\b  }\cf3 {\b Each}\cf1 {\b  kvp }\cf3 {\b As}\cf1 {\b  KeyValuePair(}\cf3 {\b Of}\cf1 {\b  }\cf3 {\b String}\cf1 {\b , PackageInstaller) }\cf3 {\b In}\cf1 {\b  Packages}\par ??{\b                 }\cf4 {\b 'Check if package is valid}\par ??\cf1 {\b                 }\cf3 {\b If}\cf1 {\b  kvp.Value.Package.IsValid }\cf3 {\b Then}\par ??\cf1 {\b                     InstallerInfo.Log.AddInfo(Util.INSTALL_Start + }\cf5 " - "\cf1 {\b  + kvp.Value.Package.Name)}\par ??{\b                     kvp.Value.Install()}\par ??{\b                     }\cf3 {\b If}\cf1 {\b  InstallerInfo.Log.Valid }\cf3 {\b Then}\par ??\cf1 {\b                         InstallerInfo.Log.AddInfo(Util.INSTALL_Success + }\cf5 " - "\cf1 {\b  + kvp.Value.Package.Name)}\par ??{\b                     }\cf3 {\b Else}\par ??\cf1 {\b                         InstallerInfo.Log.AddInfo(Util.INSTALL_Failed + }\cf5 " - "\cf1 {\b  + kvp.Value.Package.Name)}\par ??{\b                     }\cf3 {\b End}\cf1 {\b  }\cf3 {\b If}\par ??\cf1 {\b                 }\cf3 {\b Else}\par ??\cf1 {\b                     InstallerInfo.Log.AddFailure(Util.INSTALL_Aborted + }\cf5 " - "\cf1 {\b  + kvp.Value.Package.Name)}\par ??{\b                 }\cf3 {\b End}\cf1 {\b  }\cf3 {\b If}\par ??\cf1 {\b             }\cf3 {\b Next}\par ??\par ??\cf1 {\b             }\cf4 {\b 'Delete Temp Folder}\par ??\cf1 {\b             }\cf3 {\b If}\cf1 {\b  }\cf3 {\b Not}\cf1 {\b  }\cf3 {\b String}\cf1 {\b .IsNullOrEmpty(TempInstallFolder) }\cf3 {\b Then}\par ??\cf1 {\b                 Directory.Delete(TempInstallFolder, }\cf3 {\b True}\cf1 {\b )}\par ??{\b             }\cf3 {\b End}\cf1 {\b  }\cf3 {\b If}\par ??\cf1 {\b             InstallerInfo.Log.AddInfo(Util.FOLDER_DeletedBackup)}\par ??{\b         }\cf3 {\b End}\cf1 {\b  }\cf3 {\b Sub}\par ??}
--&gt;&lt;/p&gt;
&lt;div style="background: black none repeat scroll 0% 50%; font-family: Consolas; font-size: 10pt; color: white; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; font-weight: bold;"&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  188&lt;/span&gt;         &lt;span style="color: rgb(204, 120, 50);"&gt;Private&lt;/span&gt; &lt;span style="color: rgb(204, 120, 50);"&gt;Sub&lt;/span&gt; InstallPackages()&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  189&lt;/span&gt;             &lt;span style="color: lime;"&gt;'Iterate through all the Packages&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  190&lt;/span&gt;             &lt;span style="color: rgb(204, 120, 50);"&gt;For&lt;/span&gt; &lt;span style="color: rgb(204, 120, 50);"&gt;Each&lt;/span&gt; kvp &lt;span style="color: rgb(204, 120, 50);"&gt;As&lt;/span&gt; KeyValuePair(&lt;span style="color: rgb(204, 120, 50);"&gt;Of&lt;/span&gt; &lt;span style="color: rgb(204, 120, 50);"&gt;String&lt;/span&gt;, PackageInstaller) &lt;span style="color: rgb(204, 120, 50);"&gt;In&lt;/span&gt; Packages&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  191&lt;/span&gt;                 &lt;span style="color: lime;"&gt;'Check if package is valid&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  192&lt;/span&gt;                 &lt;span style="color: rgb(204, 120, 50);"&gt;If&lt;/span&gt; kvp.Value.Package.IsValid &lt;span style="color: rgb(204, 120, 50);"&gt;Then&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  193&lt;/span&gt;                     InstallerInfo.Log.AddInfo(Util.INSTALL_Start + &lt;span style="color: rgb(165, 194, 92); font-weight: normal;"&gt;" - "&lt;/span&gt; + kvp.Value.Package.Name)&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  194&lt;/span&gt;                     kvp.Value.Install()&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  195&lt;/span&gt;                     &lt;span style="color: rgb(204, 120, 50);"&gt;If&lt;/span&gt; InstallerInfo.Log.Valid &lt;span style="color: rgb(204, 120, 50);"&gt;Then&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  196&lt;/span&gt;                         InstallerInfo.Log.AddInfo(Util.INSTALL_Success + &lt;span style="color: rgb(165, 194, 92); font-weight: normal;"&gt;" - "&lt;/span&gt; + kvp.Value.Package.Name)&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  197&lt;/span&gt;                     &lt;span style="color: rgb(204, 120, 50);"&gt;Else&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  198&lt;/span&gt;                         InstallerInfo.Log.AddInfo(Util.INSTALL_Failed + &lt;span style="color: rgb(165, 194, 92); font-weight: normal;"&gt;" - "&lt;/span&gt; + kvp.Value.Package.Name)&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  199&lt;/span&gt;                     &lt;span style="color: rgb(204, 120, 50);"&gt;End&lt;/span&gt; &lt;span style="color: rgb(204, 120, 50);"&gt;If&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  200&lt;/span&gt;                 &lt;span style="color: rgb(204, 120, 50);"&gt;Else&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  201&lt;/span&gt;                     InstallerInfo.Log.AddFailure(Util.INSTALL_Aborted + &lt;span style="color: rgb(165, 194, 92); font-weight: normal;"&gt;" - "&lt;/span&gt; + kvp.Value.Package.Name)&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  202&lt;/span&gt;                 &lt;span style="color: rgb(204, 120, 50);"&gt;End&lt;/span&gt; &lt;span style="color: rgb(204, 120, 50);"&gt;If&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  203&lt;/span&gt;             &lt;span style="color: rgb(204, 120, 50);"&gt;Next&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  204&lt;/span&gt; &lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  205&lt;/span&gt;             &lt;span style="color: lime;"&gt;'Delete Temp Folder&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  206&lt;/span&gt;             &lt;span style="color: rgb(204, 120, 50);"&gt;If&lt;/span&gt; &lt;span style="color: rgb(204, 120, 50);"&gt;Not&lt;/span&gt; &lt;span style="color: rgb(204, 120, 50);"&gt;String&lt;/span&gt;.IsNullOrEmpty(TempInstallFolder) &lt;span style="color: rgb(204, 120, 50);"&gt;Then&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  207&lt;/span&gt;                 Directory.Delete(TempInstallFolder, &lt;span style="color: rgb(204, 120, 50);"&gt;True&lt;/span&gt;)&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  208&lt;/span&gt;             &lt;span style="color: rgb(204, 120, 50);"&gt;End&lt;/span&gt; &lt;span style="color: rgb(204, 120, 50);"&gt;If&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  209&lt;/span&gt;             InstallerInfo.Log.AddInfo(Util.FOLDER_DeletedBackup)&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  210&lt;/span&gt;         &lt;span style="color: rgb(204, 120, 50);"&gt;End&lt;/span&gt; &lt;span style="color: rgb(204, 120, 50);"&gt;Sub&lt;/span&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;The installPackages method iterates through the packages (Note: The Installer framework is setup to support the concept of multiple packages in a single manifest/zip.  However, the initial implementation of the Wizard only supports one package per manifest/zip).  For each Package, the method calls the PackageInstallers Install method.&lt;/p&gt;
&lt;p&gt;&lt;!--
{\rtf1\ansi\ansicpg\lang1024\noproof1252\uc1 \deff0{\fonttbl{\f0\fnil\fcharset0\fprq1 Consolas;}}{\colortbl;??\red255\green255\blue255;\red0\green0\blue0;\red204\green120\blue50;\red0\green255\blue0;\red104\green151\blue187;\red165\green194\blue92;}??\fs20 \cf1\cb2\highlight2 {\b         }\cf3 {\b Public}\cf1 {\b  }\cf3 {\b Overrides}\cf1 {\b  }\cf3 {\b Sub}\cf1 {\b  Install()}\par ??{\b             }\cf3 {\b Dim}\cf1 {\b  isCompleted }\cf3 {\b As}\cf1 {\b  }\cf3 {\b Boolean}\cf1 {\b  = }\cf3 {\b True}\par ??\par ??\cf1 {\b             }\cf3 {\b Try}\par ??\cf1 {\b                 }\cf4 {\b 'Save the Package Information}\par ??\cf1 {\b                 }\cf3 {\b If}\cf1 {\b  InstalledPackage }\cf3 {\b IsNot}\cf1 {\b  }\cf3 {\b Nothing}\cf1 {\b  }\cf3 {\b Then}\par ??\cf1 {\b                     Package.PackageID = InstalledPackage.PackageID}\par ??{\b                 }\cf3 {\b End}\cf1 {\b  }\cf3 {\b If}\par ??\par ??\cf1 {\b                 }\cf4 {\b 'Save Package}\par ??\cf1 {\b                 PackageController.SavePackage(Package)}\par ??\par ??{\b                 }\cf4 {\b 'Iterate through all the Components}\par ??\cf1 {\b                 }\cf3 {\b For}\cf1 {\b  index }\cf3 {\b As}\cf1 {\b  }\cf3 {\b Integer}\cf1 {\b  = }\cf5 0\cf1 {\b  }\cf3 {\b To}\cf1 {\b  ComponentInstallers.Count - }\cf5 1\par ??\cf1 {\b                     }\cf3 {\b Dim}\cf1 {\b  compInstaller }\cf3 {\b As}\cf1 {\b  ComponentInstallerBase = ComponentInstallers.Values(index)}\par ??{\b                     }\cf3 {\b If}\cf1 {\b  compInstaller.Version &gt; Package.InstalledVersion }\cf3 {\b Then}\par ??\cf1 {\b                         Log.AddInfo(Util.INSTALL_Start + }\cf6 " - "\cf1 {\b  + compInstaller.Type)}\par ??{\b                         compInstaller.Install()}\par ??{\b                         }\cf3 {\b If}\cf1 {\b  compInstaller.Completed }\cf3 {\b Then}\par ??\cf1 {\b                             Log.AddInfo(Util.COMPONENT_Installed + }\cf6 " - "\cf1 {\b  + compInstaller.Type)}\par ??{\b                         }\cf3 {\b Else}\par ??\cf1 {\b                             Log.AddFailure(Util.INSTALL_Failed + }\cf6 " - "\cf1 {\b  + compInstaller.Type)}\par ??{\b                             isCompleted = }\cf3 {\b False}\par ??\cf1 {\b                             }\cf3 {\b Exit}\cf1 {\b  }\cf3 {\b For}\par ??\cf1 {\b                         }\cf3 {\b End}\cf1 {\b  }\cf3 {\b If}\par ??\cf1 {\b                     }\cf3 {\b End}\cf1 {\b  }\cf3 {\b If}\par ??\cf1 {\b                 }\cf3 {\b Next}\par ??\cf1 {\b             }\cf3 {\b Catch}\cf1 {\b  ex }\cf3 {\b As}\cf1 {\b  Exception}\par ??{\b                 Log.AddFailure(Util.INSTALL_Aborted + }\cf6 " - "\cf1 {\b  + Package.Name)}\par ??{\b             }\cf3 {\b End}\cf1 {\b  }\cf3 {\b Try}\par ??\par ??\cf1 {\b             }\cf3 {\b If}\cf1 {\b  isCompleted }\cf3 {\b Then}\par ??\cf1 {\b                 }\cf4 {\b 'All components successfully installed so Commit any pending changes}\par ??\cf1 {\b                 Commit()}\par ??{\b             }\cf3 {\b Else}\par ??\cf1 {\b                 }\cf4 {\b 'There has been a failure so Rollback}\par ??\cf1 {\b                 Rollback()}\par ??{\b             }\cf3 {\b End}\cf1 {\b  }\cf3 {\b If}\par ??\cf1 {\b         }\cf3 {\b End}\cf1 {\b  }\cf3 {\b Sub}}
--&gt;&lt;/p&gt;
&lt;div style="background: black none repeat scroll 0% 50%; font-family: Consolas; font-size: 10pt; color: white; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; font-weight: bold;"&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  278&lt;/span&gt;         &lt;span style="color: rgb(204, 120, 50);"&gt;Public&lt;/span&gt; &lt;span style="color: rgb(204, 120, 50);"&gt;Overrides&lt;/span&gt; &lt;span style="color: rgb(204, 120, 50);"&gt;Sub&lt;/span&gt; Install()&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  279&lt;/span&gt;             &lt;span style="color: rgb(204, 120, 50);"&gt;Dim&lt;/span&gt; isCompleted &lt;span style="color: rgb(204, 120, 50);"&gt;As&lt;/span&gt; &lt;span style="color: rgb(204, 120, 50);"&gt;Boolean&lt;/span&gt; = &lt;span style="color: rgb(204, 120, 50);"&gt;True&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  280&lt;/span&gt; &lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  281&lt;/span&gt;             &lt;span style="color: rgb(204, 120, 50);"&gt;Try&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  282&lt;/span&gt;                 &lt;span style="color: lime;"&gt;'Save the Package Information&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  283&lt;/span&gt;                 &lt;span style="color: rgb(204, 120, 50);"&gt;If&lt;/span&gt; InstalledPackage &lt;span style="color: rgb(204, 120, 50);"&gt;IsNot&lt;/span&gt; &lt;span style="color: rgb(204, 120, 50);"&gt;Nothing&lt;/span&gt; &lt;span style="color: rgb(204, 120, 50);"&gt;Then&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  284&lt;/span&gt;                     Package.PackageID = InstalledPackage.PackageID&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  285&lt;/span&gt;                 &lt;span style="color: rgb(204, 120, 50);"&gt;End&lt;/span&gt; &lt;span style="color: rgb(204, 120, 50);"&gt;If&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  286&lt;/span&gt; &lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  287&lt;/span&gt;                 &lt;span style="color: lime;"&gt;'Save Package&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  288&lt;/span&gt;                 PackageController.SavePackage(Package)&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  289&lt;/span&gt; &lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  290&lt;/span&gt;                 &lt;span style="color: lime;"&gt;'Iterate through all the Components&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  291&lt;/span&gt;                 &lt;span style="color: rgb(204, 120, 50);"&gt;For&lt;/span&gt; index &lt;span style="color: rgb(204, 120, 50);"&gt;As&lt;/span&gt; &lt;span style="color: rgb(204, 120, 50);"&gt;Integer&lt;/span&gt; = &lt;span style="color: rgb(104, 151, 187); font-weight: normal;"&gt;0&lt;/span&gt; &lt;span style="color: rgb(204, 120, 50);"&gt;To&lt;/span&gt; ComponentInstallers.Count - &lt;span style="color: rgb(104, 151, 187); font-weight: normal;"&gt;1&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  292&lt;/span&gt;                     &lt;span style="color: rgb(204, 120, 50);"&gt;Dim&lt;/span&gt; compInstaller &lt;span style="color: rgb(204, 120, 50);"&gt;As&lt;/span&gt; ComponentInstallerBase = ComponentInstallers.Values(index)&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  293&lt;/span&gt;                     &lt;span style="color: rgb(204, 120, 50);"&gt;If&lt;/span&gt; compInstaller.Version &gt; Package.InstalledVersion &lt;span style="color: rgb(204, 120, 50);"&gt;Then&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  294&lt;/span&gt;                         Log.AddInfo(Util.INSTALL_Start + &lt;span style="color: rgb(165, 194, 92); font-weight: normal;"&gt;" - "&lt;/span&gt; + compInstaller.Type)&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  295&lt;/span&gt;                         compInstaller.Install()&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  296&lt;/span&gt;                         &lt;span style="color: rgb(204, 120, 50);"&gt;If&lt;/span&gt; compInstaller.Completed &lt;span style="color: rgb(204, 120, 50);"&gt;Then&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  297&lt;/span&gt;                             Log.AddInfo(Util.COMPONENT_Installed + &lt;span style="color: rgb(165, 194, 92); font-weight: normal;"&gt;" - "&lt;/span&gt; + compInstaller.Type)&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  298&lt;/span&gt;                         &lt;span style="color: rgb(204, 120, 50);"&gt;Else&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  299&lt;/span&gt;                             Log.AddFailure(Util.INSTALL_Failed + &lt;span style="color: rgb(165, 194, 92); font-weight: normal;"&gt;" - "&lt;/span&gt; + compInstaller.Type)&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  300&lt;/span&gt;                             isCompleted = &lt;span style="color: rgb(204, 120, 50);"&gt;False&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  301&lt;/span&gt;                             &lt;span style="color: rgb(204, 120, 50);"&gt;Exit&lt;/span&gt; &lt;span style="color: rgb(204, 120, 50);"&gt;For&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  302&lt;/span&gt;                         &lt;span style="color: rgb(204, 120, 50);"&gt;End&lt;/span&gt; &lt;span style="color: rgb(204, 120, 50);"&gt;If&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  303&lt;/span&gt;                     &lt;span style="color: rgb(204, 120, 50);"&gt;End&lt;/span&gt; &lt;span style="color: rgb(204, 120, 50);"&gt;If&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  304&lt;/span&gt;                 &lt;span style="color: rgb(204, 120, 50);"&gt;Next&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  305&lt;/span&gt;             &lt;span style="color: rgb(204, 120, 50);"&gt;Catch&lt;/span&gt; ex &lt;span style="color: rgb(204, 120, 50);"&gt;As&lt;/span&gt; Exception&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  306&lt;/span&gt;                 Log.AddFailure(Util.INSTALL_Aborted + &lt;span style="color: rgb(165, 194, 92); font-weight: normal;"&gt;" - "&lt;/span&gt; + Package.Name)&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  307&lt;/span&gt;             &lt;span style="color: rgb(204, 120, 50);"&gt;End&lt;/span&gt; &lt;span style="color: rgb(204, 120, 50);"&gt;Try&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  308&lt;/span&gt; &lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  309&lt;/span&gt;             &lt;span style="color: rgb(204, 120, 50);"&gt;If&lt;/span&gt; isCompleted &lt;span style="color: rgb(204, 120, 50);"&gt;Then&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  310&lt;/span&gt;                 &lt;span style="color: lime;"&gt;'All components successfully installed so Commit any pending changes&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  311&lt;/span&gt;                 Commit()&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  312&lt;/span&gt;             &lt;span style="color: rgb(204, 120, 50);"&gt;Else&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  313&lt;/span&gt;                 &lt;span style="color: lime;"&gt;'There has been a failure so Rollback&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  314&lt;/span&gt;                 Rollback()&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  315&lt;/span&gt;             &lt;span style="color: rgb(204, 120, 50);"&gt;End&lt;/span&gt; &lt;span style="color: rgb(204, 120, 50);"&gt;If&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  316&lt;/span&gt;         &lt;span style="color: rgb(204, 120, 50);"&gt;End&lt;/span&gt; &lt;span style="color: rgb(204, 120, 50);"&gt;Sub&lt;/span&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;This method is the "hub" of the installation process.  The first part of the method (lines 282-288) determine whether we are dealing with an upgrade or a new install and save the Package level settings to the database.  Next, the method iterates through the ComponentInstallers collection.  Remember, this collection is a SortedList, and the loop processes the ComponentInstallers in order.  The loop checks if the componentInstaller's version is greater than the version of any previously installed package - we don't want to replace a version 2 component with a version 1 component.  If the new version is greater than any existing version, the PackageInstaller calls the ComponentInstallers Install method.  Once all the components have been installed, the isCompleted flag is checked to determine if any components failed to install.  If there was a failure, then the Rollback method is called, while if the installs all completed successfully the Commit method is called.  This provides a level of Transactional support.  If one component fails, an attempt is made to "undo" the changes that were successfully made in other components.&lt;/p&gt;
&lt;p&gt;If we look at the Commit method&lt;/p&gt;
&lt;p&gt;&lt;!--
{\rtf1\ansi\ansicpg\lang1024\noproof1252\uc1 \deff0{\fonttbl{\f0\fnil\fcharset0\fprq1 Consolas;}}{\colortbl;??\red255\green255\blue255;\red0\green0\blue0;\red204\green120\blue50;\red104\green151\blue187;}??\fs20 \cf1\cb2\highlight2 {\b         }\cf3 {\b Public}\cf1 {\b  }\cf3 {\b Overrides}\cf1 {\b  }\cf3 {\b Sub}\cf1 {\b  Commit()}\par ??{\b             }\cf3 {\b For}\cf1 {\b  index }\cf3 {\b As}\cf1 {\b  }\cf3 {\b Integer}\cf1 {\b  = }\cf4 0\cf1 {\b  }\cf3 {\b To}\cf1 {\b  ComponentInstallers.Count - }\cf4 1\par ??\cf1 {\b                 }\cf3 {\b Dim}\cf1 {\b  compInstaller }\cf3 {\b As}\cf1 {\b  ComponentInstallerBase = ComponentInstallers.Values(index)}\par ??{\b                 }\cf3 {\b If}\cf1 {\b  compInstaller.Version &gt; Package.InstalledVersion }\cf3 {\b AndAlso}\cf1 {\b  compInstaller.Completed }\cf3 {\b Then}\par ??\cf1 {\b                     compInstaller.Commit()}\par ??{\b                 }\cf3 {\b End}\cf1 {\b  }\cf3 {\b If}\par ??\cf1 {\b             }\cf3 {\b Next}\par ??\cf1 {\b             }\cf3 {\b If}\cf1 {\b  Log.Valid }\cf3 {\b Then}\par ??\cf1 {\b                 Log.AddInfo(Util.INSTALL_Committed)}\par ??{\b             }\cf3 {\b Else}\par ??\cf1 {\b                 Log.AddFailure(Util.INSTALL_Aborted)}\par ??{\b             }\cf3 {\b End}\cf1 {\b  }\cf3 {\b If}\par ??\cf1 {\b         }\cf3 {\b End}\cf1 {\b  }\cf3 {\b Sub}\par ??}
--&gt;&lt;/p&gt;
&lt;div style="background: black none repeat scroll 0% 50%; font-family: Consolas; font-size: 10pt; color: white; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; font-weight: bold;"&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  256&lt;/span&gt;         &lt;span style="color: rgb(204, 120, 50);"&gt;Public&lt;/span&gt; &lt;span style="color: rgb(204, 120, 50);"&gt;Overrides&lt;/span&gt; &lt;span style="color: rgb(204, 120, 50);"&gt;Sub&lt;/span&gt; Commit()&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  257&lt;/span&gt;             &lt;span style="color: rgb(204, 120, 50);"&gt;For&lt;/span&gt; index &lt;span style="color: rgb(204, 120, 50);"&gt;As&lt;/span&gt; &lt;span style="color: rgb(204, 120, 50);"&gt;Integer&lt;/span&gt; = &lt;span style="color: rgb(104, 151, 187); font-weight: normal;"&gt;0&lt;/span&gt; &lt;span style="color: rgb(204, 120, 50);"&gt;To&lt;/span&gt; ComponentInstallers.Count - &lt;span style="color: rgb(104, 151, 187); font-weight: normal;"&gt;1&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  258&lt;/span&gt;                 &lt;span style="color: rgb(204, 120, 50);"&gt;Dim&lt;/span&gt; compInstaller &lt;span style="color: rgb(204, 120, 50);"&gt;As&lt;/span&gt; ComponentInstallerBase = ComponentInstallers.Values(index)&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  259&lt;/span&gt;                 &lt;span style="color: rgb(204, 120, 50);"&gt;If&lt;/span&gt; compInstaller.Version &gt; Package.InstalledVersion &lt;span style="color: rgb(204, 120, 50);"&gt;AndAlso&lt;/span&gt; compInstaller.Completed &lt;span style="color: rgb(204, 120, 50);"&gt;Then&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  260&lt;/span&gt;                     compInstaller.Commit()&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  261&lt;/span&gt;                 &lt;span style="color: rgb(204, 120, 50);"&gt;End&lt;/span&gt; &lt;span style="color: rgb(204, 120, 50);"&gt;If&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  262&lt;/span&gt;             &lt;span style="color: rgb(204, 120, 50);"&gt;Next&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  263&lt;/span&gt;             &lt;span style="color: rgb(204, 120, 50);"&gt;If&lt;/span&gt; Log.Valid &lt;span style="color: rgb(204, 120, 50);"&gt;Then&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  264&lt;/span&gt;                 Log.AddInfo(Util.INSTALL_Committed)&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  265&lt;/span&gt;             &lt;span style="color: rgb(204, 120, 50);"&gt;Else&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  266&lt;/span&gt;                 Log.AddFailure(Util.INSTALL_Aborted)&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  267&lt;/span&gt;             &lt;span style="color: rgb(204, 120, 50);"&gt;End&lt;/span&gt; &lt;span style="color: rgb(204, 120, 50);"&gt;If&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  268&lt;/span&gt;         &lt;span style="color: rgb(204, 120, 50);"&gt;End&lt;/span&gt; &lt;span style="color: rgb(204, 120, 50);"&gt;Sub&lt;/span&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;and the Rollback method&lt;/p&gt;
&lt;p&gt;&lt;!--
{\rtf1\ansi\ansicpg\lang1024\noproof1252\uc1 \deff0{\fonttbl{\f0\fnil\fcharset0\fprq1 Consolas;}}{\colortbl;??\red255\green255\blue255;\red0\green0\blue0;\red204\green120\blue50;\red104\green151\blue187;\red165\green194\blue92;\red0\green255\blue0;}??\fs20 \cf1\cb2\highlight2 {\b         }\cf3 {\b Public}\cf1 {\b  }\cf3 {\b Overrides}\cf1 {\b  }\cf3 {\b Sub}\cf1 {\b  Rollback()}\par ??{\b             }\cf3 {\b For}\cf1 {\b  index }\cf3 {\b As}\cf1 {\b  }\cf3 {\b Integer}\cf1 {\b  = }\cf4 0\cf1 {\b  }\cf3 {\b To}\cf1 {\b  ComponentInstallers.Count - }\cf4 1\par ??\cf1 {\b                 }\cf3 {\b Dim}\cf1 {\b  compInstaller }\cf3 {\b As}\cf1 {\b  ComponentInstallerBase = ComponentInstallers.Values(index)}\par ??{\b                 }\cf3 {\b If}\cf1 {\b  compInstaller.Version &gt; Package.InstalledVersion }\cf3 {\b AndAlso}\cf1 {\b  compInstaller.Completed }\cf3 {\b Then}\par ??\cf1 {\b                     Log.AddInfo(Util.COMPONENT_RollingBack + }\cf5 " - "\cf1 {\b  + compInstaller.Type)}\par ??{\b                     compInstaller.Rollback()}\par ??{\b                     Log.AddInfo(Util.COMPONENT_RolledBack + }\cf5 " - "\cf1 {\b  + compInstaller.Type)}\par ??{\b                 }\cf3 {\b End}\cf1 {\b  }\cf3 {\b If}\par ??\cf1 {\b             }\cf3 {\b Next}\par ??\par ??\cf1 {\b             }\cf6 {\b 'If Previously Installed Package exists then we need to update the DataStore with this }\par ??\cf1 {\b             }\cf3 {\b If}\cf1 {\b  InstalledPackage }\cf3 {\b Is}\cf1 {\b  }\cf3 {\b Nothing}\cf1 {\b  }\cf3 {\b Then}\par ??\cf1 {\b                 }\cf6 {\b 'No Previously Installed Package - Delete newly added Package}\par ??\cf1 {\b                 PackageController.DeletePackage(Package.PackageID)}\par ??{\b             }\cf3 {\b Else}\par ??\cf1 {\b                 }\cf6 {\b 'Previously Installed Package - Rollback to Previously Installed}\par ??\cf1 {\b                 PackageController.SavePackage(InstalledPackage)}\par ??{\b             }\cf3 {\b End}\cf1 {\b  }\cf3 {\b If}\par ??\cf1 {\b         }\cf3 {\b End}\cf1 {\b  }\cf3 {\b Sub}\par ??}
--&gt;&lt;/p&gt;
&lt;div style="background: black none repeat scroll 0% 50%; font-family: Consolas; font-size: 10pt; color: white; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; font-weight: bold;"&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  429&lt;/span&gt;         &lt;span style="color: rgb(204, 120, 50);"&gt;Public&lt;/span&gt; &lt;span style="color: rgb(204, 120, 50);"&gt;Overrides&lt;/span&gt; &lt;span style="color: rgb(204, 120, 50);"&gt;Sub&lt;/span&gt; Rollback()&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  430&lt;/span&gt;             &lt;span style="color: rgb(204, 120, 50);"&gt;For&lt;/span&gt; index &lt;span style="color: rgb(204, 120, 50);"&gt;As&lt;/span&gt; &lt;span style="color: rgb(204, 120, 50);"&gt;Integer&lt;/span&gt; = &lt;span style="color: rgb(104, 151, 187); font-weight: normal;"&gt;0&lt;/span&gt; &lt;span style="color: rgb(204, 120, 50);"&gt;To&lt;/span&gt; ComponentInstallers.Count - &lt;span style="color: rgb(104, 151, 187); font-weight: normal;"&gt;1&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  431&lt;/span&gt;                 &lt;span style="color: rgb(204, 120, 50);"&gt;Dim&lt;/span&gt; compInstaller &lt;span style="color: rgb(204, 120, 50);"&gt;As&lt;/span&gt; ComponentInstallerBase = ComponentInstallers.Values(index)&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  432&lt;/span&gt;                 &lt;span style="color: rgb(204, 120, 50);"&gt;If&lt;/span&gt; compInstaller.Version &gt; Package.InstalledVersion &lt;span style="color: rgb(204, 120, 50);"&gt;AndAlso&lt;/span&gt; compInstaller.Completed &lt;span style="color: rgb(204, 120, 50);"&gt;Then&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  433&lt;/span&gt;                     Log.AddInfo(Util.COMPONENT_RollingBack + &lt;span style="color: rgb(165, 194, 92); font-weight: normal;"&gt;" - "&lt;/span&gt; + compInstaller.Type)&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  434&lt;/span&gt;                     compInstaller.Rollback()&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  435&lt;/span&gt;                     Log.AddInfo(Util.COMPONENT_RolledBack + &lt;span style="color: rgb(165, 194, 92); font-weight: normal;"&gt;" - "&lt;/span&gt; + compInstaller.Type)&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  436&lt;/span&gt;                 &lt;span style="color: rgb(204, 120, 50);"&gt;End&lt;/span&gt; &lt;span style="color: rgb(204, 120, 50);"&gt;If&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  437&lt;/span&gt;             &lt;span style="color: rgb(204, 120, 50);"&gt;Next&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  438&lt;/span&gt; &lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  439&lt;/span&gt;             &lt;span style="color: lime;"&gt;'If Previously Installed Package exists then we need to update the DataStore with this &lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  440&lt;/span&gt;             &lt;span style="color: rgb(204, 120, 50);"&gt;If&lt;/span&gt; InstalledPackage &lt;span style="color: rgb(204, 120, 50);"&gt;Is&lt;/span&gt; &lt;span style="color: rgb(204, 120, 50);"&gt;Nothing&lt;/span&gt; &lt;span style="color: rgb(204, 120, 50);"&gt;Then&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  441&lt;/span&gt;                 &lt;span style="color: lime;"&gt;'No Previously Installed Package - Delete newly added Package&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  442&lt;/span&gt;                 PackageController.DeletePackage(Package.PackageID)&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  443&lt;/span&gt;             &lt;span style="color: rgb(204, 120, 50);"&gt;Else&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  444&lt;/span&gt;                 &lt;span style="color: lime;"&gt;'Previously Installed Package - Rollback to Previously Installed&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  445&lt;/span&gt;                 PackageController.SavePackage(InstalledPackage)&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  446&lt;/span&gt;             &lt;span style="color: rgb(204, 120, 50);"&gt;End&lt;/span&gt; &lt;span style="color: rgb(204, 120, 50);"&gt;If&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  447&lt;/span&gt;         &lt;span style="color: rgb(204, 120, 50);"&gt;End&lt;/span&gt; &lt;span style="color: rgb(204, 120, 50);"&gt;Sub&lt;/span&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;we can see that both methods follow the same pattern as the Install method.  They iterate through the ComponentInstallers calling the relevant methods in these classes.&lt;/p&gt;
&lt;p&gt;The advantage of this process is that the installation of each component type is delgated to a custom installer that knows how to handle the component.  Thus the install method of the AssemblyInstaller is very different from the Install method of a ConfigInstaller.  As we saw in the previous blog, this approach is also extensible.&lt;/p&gt;
&lt;p&gt;Uninstalling an Extension works in much the same way as Installing, so we will get a Log of the Uninstall, both if the uninstall is a success or a failure.&lt;/p&gt;
&lt;p&gt;I hope these last two blogs have given you an overview of how the process works.  Unless you actually need to create your own ComponentInstaller, you should not need to delve into this code in detail.  However, if you would like to take advantage of some of the new aspects of the Extension Installer, you will need to understand how to build a version 5 manifest, and I will delve into that aspect in more detail in my next blog on the subject.&lt;/p&gt;</description>
      <link>http://www.dotnetnuke.com/Community/Blogs/tabid/825/EntryID/1799/Default.aspx</link>
      <comments>http://www.dotnetnuke.com/Community/Blogs/tabid/825/EntryID/1799/Default.aspx#Comments</comments>
      <guid isPermaLink="true">http://www.dotnetnuke.com/Default.aspx?tabid=825&amp;EntryID=1799</guid>
      <pubDate>Mon, 07 Apr 2008 08:00:00 GMT</pubDate>
      <slash:comments>7</slash:comments>
      <trackback:ping>http://www.dotnetnuke.com/DesktopModules/Blog/Trackback.aspx?id=1799</trackback:ping>
    </item>
    <item>
      <title>Cambrian First Look - Extension Installer (Pt 2)</title>
      <description>&lt;p&gt;In my previous blog I introduced the new Extension Installer from a developer's perspective.  In this Blog I will continue that discussion by showing how the various classes interact.&lt;/p&gt;
&lt;h3&gt;Reading the Manifest.&lt;/h3&gt;
&lt;p&gt;The Installer class has a number of Constructors, but the Install Wizard invokes the following Contructor.&lt;/p&gt;
&lt;p&gt;&lt;!--
{\rtf1\ansi\ansicpg\lang1024\noproof1252\uc1 \deff0{\fonttbl{\f0\fnil\fcharset0\fprq1 Consolas;}}{\colortbl;??\red255\green255\blue255;\red0\green0\blue0;\red204\green120\blue50;\red165\green194\blue92;}??\fs20 \cf1\cb2\highlight2 {\b _Installer = }\cf3 {\b New}\cf1 {\b  Installer(TempInstallFolder, ManifestFile, Request.MapPath(}\cf4 "."\cf1 {\b ), }\cf3 {\b True}\cf1 {\b )}}
--&gt;&lt;/p&gt;
&lt;div style="background: black none repeat scroll 0% 50%; font-family: Consolas; font-size: 10pt; color: white; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; font-weight: bold;"&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;   63&lt;/span&gt;         &lt;span style="color: rgb(204, 120, 50);"&gt;Public&lt;/span&gt; &lt;span style="color: rgb(204, 120, 50);"&gt;Sub&lt;/span&gt; &lt;span style="color: rgb(204, 120, 50);"&gt;New&lt;/span&gt;(&lt;span style="color: rgb(204, 120, 50);"&gt;ByVal&lt;/span&gt; tempFolder &lt;span style="color: rgb(204, 120, 50);"&gt;As&lt;/span&gt; &lt;span style="color: rgb(204, 120, 50);"&gt;String&lt;/span&gt;, &lt;span style="color: rgb(204, 120, 50);"&gt;ByVal&lt;/span&gt; manifest &lt;span style="color: rgb(204, 120, 50);"&gt;As&lt;/span&gt; &lt;span style="color: rgb(204, 120, 50);"&gt;String&lt;/span&gt;, &lt;span style="color: rgb(204, 120, 50);"&gt;ByVal&lt;/span&gt; physicalSitePath &lt;span style="color: rgb(204, 120, 50);"&gt;As&lt;/span&gt; &lt;span style="color: rgb(204, 120, 50);"&gt;String&lt;/span&gt;, &lt;span style="color: rgb(204, 120, 50);"&gt;ByVal&lt;/span&gt; loadManifest &lt;span style="color: rgb(204, 120, 50);"&gt;As&lt;/span&gt; &lt;span style="color: rgb(204, 120, 50);"&gt;Boolean&lt;/span&gt;)&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;   64&lt;/span&gt;             _InstallerInfo = &lt;span style="color: rgb(204, 120, 50);"&gt;New&lt;/span&gt; InstallerInfo(tempFolder, manifest, physicalSitePath)&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;   65&lt;/span&gt;             &lt;span style="color: rgb(204, 120, 50);"&gt;If&lt;/span&gt; loadManifest &lt;span style="color: rgb(204, 120, 50);"&gt;Then&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;   66&lt;/span&gt;                 ReadManifest()&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;   67&lt;/span&gt;             &lt;span style="color: rgb(204, 120, 50);"&gt;End&lt;/span&gt; &lt;span style="color: rgb(204, 120, 50);"&gt;If&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;   68&lt;/span&gt;         &lt;span style="color: rgb(204, 120, 50);"&gt;End&lt;/span&gt; &lt;span style="color: rgb(204, 120, 50);"&gt;Sub&lt;/span&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;This Constructor instantiates an InstallerInfo instance, and then calls the ReadManifest method.&lt;/p&gt;
&lt;p&gt;&lt;!--
{\rtf1\ansi\ansicpg\lang1024\noproof1252\uc1 \deff0{\fonttbl{\f0\fnil\fcharset0\fprq1 Consolas;}}{\colortbl;??\red255\green255\blue255;\red0\green0\blue0;\red204\green120\blue50;\red0\green255\blue0;}??\fs20 \cf1\cb2\highlight2 {\b         }\cf3 {\b Public}\cf1 {\b  }\cf3 {\b Sub}\cf1 {\b  ReadManifest()}\par ??{\b             InstallerInfo.Log.StartJob(Util.DNN_Reading)}\par ??\par ??{\b             }\cf3 {\b If}\cf1 {\b  InstallerInfo.ManifestFile }\cf3 {\b IsNot}\cf1 {\b  }\cf3 {\b Nothing}\cf1 {\b  }\cf3 {\b Then}\par ??\cf1 {\b                 ReadManifest(}\cf3 {\b New}\cf1 {\b  FileStream(InstallerInfo.ManifestFile.TempFileName, FileMode.Open, FileAccess.Read))}\par ??{\b             }\cf3 {\b End}\cf1 {\b  }\cf3 {\b If}\par ??\par ??\cf1 {\b             }\cf3 {\b If}\cf1 {\b  InstallerInfo.Log.Valid }\cf3 {\b Then}\par ??\cf1 {\b                 InstallerInfo.Log.EndJob(Util.DNN_Success)}\par ??{\b             }\cf3 {\b Else}\par ??\cf1 {\b                 }\cf4 {\b 'Delete Temp Folder}\par ??\cf1 {\b                 }\cf3 {\b If}\cf1 {\b  }\cf3 {\b Not}\cf1 {\b  }\cf3 {\b String}\cf1 {\b .IsNullOrEmpty(TempInstallFolder) }\cf3 {\b Then}\par ??\cf1 {\b                     Directory.Delete(TempInstallFolder, }\cf3 {\b True}\cf1 {\b )}\par ??{\b                 }\cf3 {\b End}\cf1 {\b  }\cf3 {\b If}\par ??\cf1 {\b             }\cf3 {\b End}\cf1 {\b  }\cf3 {\b If}\par ??\cf1 {\b         }\cf3 {\b End}\cf1 {\b  }\cf3 {\b Sub}\par ??}
--&gt;&lt;/p&gt;
&lt;div style="background: black none repeat scroll 0% 50%; font-family: Consolas; font-size: 10pt; color: white; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; font-weight: bold;"&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  358&lt;/span&gt;         &lt;span style="color: rgb(204, 120, 50);"&gt;Public&lt;/span&gt; &lt;span style="color: rgb(204, 120, 50);"&gt;Sub&lt;/span&gt; ReadManifest()&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  359&lt;/span&gt;             InstallerInfo.Log.StartJob(Util.DNN_Reading)&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  360&lt;/span&gt; &lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  361&lt;/span&gt;             &lt;span style="color: rgb(204, 120, 50);"&gt;If&lt;/span&gt; InstallerInfo.ManifestFile &lt;span style="color: rgb(204, 120, 50);"&gt;IsNot&lt;/span&gt; &lt;span style="color: rgb(204, 120, 50);"&gt;Nothing&lt;/span&gt; &lt;span style="color: rgb(204, 120, 50);"&gt;Then&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  362&lt;/span&gt;                 ReadManifest(&lt;span style="color: rgb(204, 120, 50);"&gt;New&lt;/span&gt; FileStream(InstallerInfo.ManifestFile.TempFileName, FileMode.Open, FileAccess.Read))&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  363&lt;/span&gt;             &lt;span style="color: rgb(204, 120, 50);"&gt;End&lt;/span&gt; &lt;span style="color: rgb(204, 120, 50);"&gt;If&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  364&lt;/span&gt; &lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  365&lt;/span&gt;             &lt;span style="color: rgb(204, 120, 50);"&gt;If&lt;/span&gt; InstallerInfo.Log.Valid &lt;span style="color: rgb(204, 120, 50);"&gt;Then&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  366&lt;/span&gt;                 InstallerInfo.Log.EndJob(Util.DNN_Success)&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  367&lt;/span&gt;             &lt;span style="color: rgb(204, 120, 50);"&gt;Else&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  368&lt;/span&gt;                 &lt;span style="color: lime;"&gt;'Delete Temp Folder&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  369&lt;/span&gt;                 &lt;span style="color: rgb(204, 120, 50);"&gt;If&lt;/span&gt; &lt;span style="color: rgb(204, 120, 50);"&gt;Not&lt;/span&gt; &lt;span style="color: rgb(204, 120, 50);"&gt;String&lt;/span&gt;.IsNullOrEmpty(TempInstallFolder) &lt;span style="color: rgb(204, 120, 50);"&gt;Then&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  370&lt;/span&gt;                     Directory.Delete(TempInstallFolder, &lt;span style="color: rgb(204, 120, 50);"&gt;True&lt;/span&gt;)&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  371&lt;/span&gt;                 &lt;span style="color: rgb(204, 120, 50);"&gt;End&lt;/span&gt; &lt;span style="color: rgb(204, 120, 50);"&gt;If&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  372&lt;/span&gt;             &lt;span style="color: rgb(204, 120, 50);"&gt;End&lt;/span&gt; &lt;span style="color: rgb(204, 120, 50);"&gt;If&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  373&lt;/span&gt;         &lt;span style="color: rgb(204, 120, 50);"&gt;End&lt;/span&gt; &lt;span style="color: rgb(204, 120, 50);"&gt;Sub&lt;/span&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;This method in turn calls a private ReadManifest method that actually does the work, by creating a FileStream from the manifest file..&lt;/p&gt;
&lt;p&gt;&lt;!--
{\rtf1\ansi\ansicpg\lang1024\noproof1252\uc1 \deff0{\fonttbl{\f0\fnil\fcharset0\fprq1 Consolas;}}{\colortbl;??\red255\green255\blue255;\red0\green0\blue0;\red204\green120\blue50;\red0\green255\blue0;\red165\green194\blue92;}??\fs20 \cf1\cb2\highlight2 {\b         }\cf3 {\b Private}\cf1 {\b  }\cf3 {\b Sub}\cf1 {\b  ReadManifest(}\cf3 {\b ByVal}\cf1 {\b  stream }\cf3 {\b As}\cf1 {\b  Stream)}\par ??{\b             }\cf3 {\b Dim}\cf1 {\b  doc }\cf3 {\b As}\cf1 {\b  }\cf3 {\b New}\cf1 {\b  XPathDocument(stream)}\par ??\par ??{\b             }\cf4 {\b 'Read the root node to determine what version the manifest is}\par ??\cf1 {\b             }\cf3 {\b Dim}\cf1 {\b  rootNav }\cf3 {\b As}\cf1 {\b  XPathNavigator = doc.CreateNavigator()}\par ??{\b             rootNav.MoveToFirstChild()}\par ??{\b             }\cf3 {\b Dim}\cf1 {\b  packageType }\cf3 {\b As}\cf1 {\b  }\cf3 {\b String}\cf1 {\b  = Null.NullString}\par ??{\b             }\cf3 {\b If}\cf1 {\b  rootNav.Name = }\cf5 "dotnetnuke"\cf1 {\b  }\cf3 {\b Then}\par ??\cf1 {\b                 packageType = Util.ReadAttribute(rootNav, }\cf5 "type"\cf1 {\b )}\par ??{\b             }\cf3 {\b ElseIf}\cf1 {\b  rootNav.Name.ToLower = }\cf5 "languagepack"\cf1 {\b  }\cf3 {\b Then}\par ??\cf1 {\b                 packageType = }\cf5 "LanguagePack"\par ??\cf1 {\b             }\cf3 {\b Else}\par ??\cf1 {\b                 InstallerInfo.Log.AddFailure(Util.PACKAGE_UnRecognizable)}\par ??{\b             }\cf3 {\b End}\cf1 {\b  }\cf3 {\b If}\par ??\par ??\cf1 {\b             }\cf3 {\b Select}\cf1 {\b  }\cf3 {\b Case}\cf1 {\b  packageType}\par ??{\b                 }\cf3 {\b Case}\cf1 {\b  }\cf5 "Package"\par ??\cf1 {\b                     }\cf4 {\b 'Parse the package nodes}\par ??\cf1 {\b                     ProcessPackages(rootNav)}\par ??{\b                 }\cf3 {\b Case}\cf1 {\b  }\cf5 "Module"\par ??\cf1 {\b                     }\cf4 {\b 'Legacy Module}\par ??\cf1 {\b                     }\cf3 {\b Dim}\cf1 {\b  modulewriter }\cf3 {\b As}\cf1 {\b  }\cf3 {\b New}\cf1 {\b  ModulePackageWriter(rootNav, InstallerInfo)}\par ??{\b                     }\cf3 {\b Dim}\cf1 {\b  legacyManifest }\cf3 {\b As}\cf1 {\b  }\cf3 {\b String}\cf1 {\b  = modulewriter.WriteManifest()}\par ??{\b                     }\cf3 {\b Dim}\cf1 {\b  legacyDoc }\cf3 {\b As}\cf1 {\b  }\cf3 {\b New}\cf1 {\b  XPathDocument(}\cf3 {\b New}\cf1 {\b  StringReader(legacyManifest))}\par ??\par ??{\b                     }\cf4 {\b 'Parse the package nodes}\par ??\cf1 {\b                     ProcessPackages(legacyDoc.CreateNavigator().SelectSingleNode(}\cf5 "dotnetnuke"\cf1 {\b ))}\par ??{\b                 }\cf3 {\b Case}\cf1 {\b  }\cf5 "LanguagePack"\par ??\cf1 {\b                     }\cf4 {\b 'Legacy Language Pack}\par ??\cf1 {\b                     }\cf3 {\b Dim}\cf1 {\b  languageWriter }\cf3 {\b As}\cf1 {\b  }\cf3 {\b New}\cf1 {\b  LanguagePackWriter(rootNav, InstallerInfo)}\par ??{\b                     }\cf3 {\b Dim}\cf1 {\b  legacyManifest }\cf3 {\b As}\cf1 {\b  }\cf3 {\b String}\cf1 {\b  = languageWriter.WriteManifest()}\par ??{\b                     }\cf3 {\b Dim}\cf1 {\b  legacyDoc }\cf3 {\b As}\cf1 {\b  }\cf3 {\b New}\cf1 {\b  XPathDocument(}\cf3 {\b New}\cf1 {\b  StringReader(legacyManifest))}\par ??\par ??{\b                     }\cf4 {\b 'Parse the package nodes}\par ??\cf1 {\b                     ProcessPackages(legacyDoc.CreateNavigator().SelectSingleNode(}\cf5 "dotnetnuke"\cf1 {\b ))}\par ??{\b             }\cf3 {\b End}\cf1 {\b  }\cf3 {\b Select}\par ??\cf1 {\b         }\cf3 {\b End}\cf1 {\b  }\cf3 {\b Sub}\par ??}
--&gt;&lt;/p&gt;
&lt;div style="background: black none repeat scroll 0% 50%; font-family: Consolas; font-size: 10pt; color: white; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; font-weight: bold;"&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  254&lt;/span&gt;         &lt;span style="color: rgb(204, 120, 50);"&gt;Private&lt;/span&gt; &lt;span style="color: rgb(204, 120, 50);"&gt;Sub&lt;/span&gt; ReadManifest(&lt;span style="color: rgb(204, 120, 50);"&gt;ByVal&lt;/span&gt; stream &lt;span style="color: rgb(204, 120, 50);"&gt;As&lt;/span&gt; Stream)&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  255&lt;/span&gt;             &lt;span style="color: rgb(204, 120, 50);"&gt;Dim&lt;/span&gt; doc &lt;span style="color: rgb(204, 120, 50);"&gt;As&lt;/span&gt; &lt;span style="color: rgb(204, 120, 50);"&gt;New&lt;/span&gt; XPathDocument(stream)&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  256&lt;/span&gt; &lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  257&lt;/span&gt;             &lt;span style="color: lime;"&gt;'Read the root node to determine what version the manifest is&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  258&lt;/span&gt;             &lt;span style="color: rgb(204, 120, 50);"&gt;Dim&lt;/span&gt; rootNav &lt;span style="color: rgb(204, 120, 50);"&gt;As&lt;/span&gt; XPathNavigator = doc.CreateNavigator()&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  259&lt;/span&gt;             rootNav.MoveToFirstChild()&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  260&lt;/span&gt;             &lt;span style="color: rgb(204, 120, 50);"&gt;Dim&lt;/span&gt; packageType &lt;span style="color: rgb(204, 120, 50);"&gt;As&lt;/span&gt; &lt;span style="color: rgb(204, 120, 50);"&gt;String&lt;/span&gt; = Null.NullString&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  261&lt;/span&gt;             &lt;span style="color: rgb(204, 120, 50);"&gt;If&lt;/span&gt; rootNav.Name = &lt;span style="color: rgb(165, 194, 92); font-weight: normal;"&gt;"dotnetnuke"&lt;/span&gt; &lt;span style="color: rgb(204, 120, 50);"&gt;Then&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  262&lt;/span&gt;                 packageType = Util.ReadAttribute(rootNav, &lt;span style="color: rgb(165, 194, 92); font-weight: normal;"&gt;"type"&lt;/span&gt;)&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  263&lt;/span&gt;             &lt;span style="color: rgb(204, 120, 50);"&gt;ElseIf&lt;/span&gt; rootNav.Name.ToLower = &lt;span style="color: rgb(165, 194, 92); font-weight: normal;"&gt;"languagepack"&lt;/span&gt; &lt;span style="color: rgb(204, 120, 50);"&gt;Then&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  264&lt;/span&gt;                 packageType = &lt;span style="color: rgb(165, 194, 92); font-weight: normal;"&gt;"LanguagePack"&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  265&lt;/span&gt;             &lt;span style="color: rgb(204, 120, 50);"&gt;Else&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  266&lt;/span&gt;                 InstallerInfo.Log.AddFailure(Util.PACKAGE_UnRecognizable)&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  267&lt;/span&gt;             &lt;span style="color: rgb(204, 120, 50);"&gt;End&lt;/span&gt; &lt;span style="color: rgb(204, 120, 50);"&gt;If&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  268&lt;/span&gt; &lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  269&lt;/span&gt;             &lt;span style="color: rgb(204, 120, 50);"&gt;Select&lt;/span&gt; &lt;span style="color: rgb(204, 120, 50);"&gt;Case&lt;/span&gt; packageType&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  270&lt;/span&gt;                 &lt;span style="color: rgb(204, 120, 50);"&gt;Case&lt;/span&gt; &lt;span style="color: rgb(165, 194, 92); font-weight: normal;"&gt;"Package"&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  271&lt;/span&gt;                     &lt;span style="color: lime;"&gt;'Parse the package nodes&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  272&lt;/span&gt;                     ProcessPackages(rootNav)&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  273&lt;/span&gt;                 &lt;span style="color: rgb(204, 120, 50);"&gt;Case&lt;/span&gt; &lt;span style="color: rgb(165, 194, 92); font-weight: normal;"&gt;"Module"&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  274&lt;/span&gt;                     &lt;span style="color: lime;"&gt;'Legacy Module&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  275&lt;/span&gt;                     &lt;span style="color: rgb(204, 120, 50);"&gt;Dim&lt;/span&gt; modulewriter &lt;span style="color: rgb(204, 120, 50);"&gt;As&lt;/span&gt; &lt;span style="color: rgb(204, 120, 50);"&gt;New&lt;/span&gt; ModulePackageWriter(rootNav, InstallerInfo)&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  276&lt;/span&gt;                     &lt;span style="color: rgb(204, 120, 50);"&gt;Dim&lt;/span&gt; legacyManifest &lt;span style="color: rgb(204, 120, 50);"&gt;As&lt;/span&gt; &lt;span style="color: rgb(204, 120, 50);"&gt;String&lt;/span&gt; = modulewriter.WriteManifest()&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  277&lt;/span&gt;                     &lt;span style="color: rgb(204, 120, 50);"&gt;Dim&lt;/span&gt; legacyDoc &lt;span style="color: rgb(204, 120, 50);"&gt;As&lt;/span&gt; &lt;span style="color: rgb(204, 120, 50);"&gt;New&lt;/span&gt; XPathDocument(&lt;span style="color: rgb(204, 120, 50);"&gt;New&lt;/span&gt; StringReader(legacyManifest))&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  278&lt;/span&gt; &lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  279&lt;/span&gt;                     &lt;span style="color: lime;"&gt;'Parse the package nodes&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  280&lt;/span&gt;                     ProcessPackages(legacyDoc.CreateNavigator().SelectSingleNode(&lt;span style="color: rgb(165, 194, 92); font-weight: normal;"&gt;"dotnetnuke"&lt;/span&gt;))&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  281&lt;/span&gt;                 &lt;span style="color: rgb(204, 120, 50);"&gt;Case&lt;/span&gt; &lt;span style="color: rgb(165, 194, 92); font-weight: normal;"&gt;"LanguagePack"&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  282&lt;/span&gt;                     &lt;span style="color: lime;"&gt;'Legacy Language Pack&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  283&lt;/span&gt;                     &lt;span style="color: rgb(204, 120, 50);"&gt;Dim&lt;/span&gt; languageWriter &lt;span style="color: rgb(204, 120, 50);"&gt;As&lt;/span&gt; &lt;span style="color: rgb(204, 120, 50);"&gt;New&lt;/span&gt; LanguagePackWriter(rootNav, InstallerInfo)&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  284&lt;/span&gt;                     &lt;span style="color: rgb(204, 120, 50);"&gt;Dim&lt;/span&gt; legacyManifest &lt;span style="color: rgb(204, 120, 50);"&gt;As&lt;/span&gt; &lt;span style="color: rgb(204, 120, 50);"&gt;String&lt;/span&gt; = languageWriter.WriteManifest()&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  285&lt;/span&gt;                     &lt;span style="color: rgb(204, 120, 50);"&gt;Dim&lt;/span&gt; legacyDoc &lt;span style="color: rgb(204, 120, 50);"&gt;As&lt;/span&gt; &lt;span style="color: rgb(204, 120, 50);"&gt;New&lt;/span&gt; XPathDocument(&lt;span style="color: rgb(204, 120, 50);"&gt;New&lt;/span&gt; StringReader(legacyManifest))&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  286&lt;/span&gt; &lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  287&lt;/span&gt;                     &lt;span style="color: lime;"&gt;'Parse the package nodes&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  288&lt;/span&gt;                     ProcessPackages(legacyDoc.CreateNavigator().SelectSingleNode(&lt;span style="color: rgb(165, 194, 92); font-weight: normal;"&gt;"dotnetnuke"&lt;/span&gt;))&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  289&lt;/span&gt;             &lt;span style="color: rgb(204, 120, 50);"&gt;End&lt;/span&gt; &lt;span style="color: rgb(204, 120, 50);"&gt;Select&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  290&lt;/span&gt;         &lt;span style="color: rgb(204, 120, 50);"&gt;End&lt;/span&gt; &lt;span style="color: rgb(204, 120, 50);"&gt;Sub&lt;/span&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;In this method an XPathDocument is created from the FileStream.  Note, that we are using an XPathDocument rather than an XmlDocument.  This is because in a read-only scenario these classes perform better. &lt;/p&gt;
&lt;p&gt;The first section of this method determines whether the manifest represents a Legacy LanguagePack, a Legacy Module or a new Package.  In the Select Case statement, if the manifest represents a Legacy Module or a Legacy LanguagePack, the manifests are passed to a "PackageWriter" which reads thje legacy manifest and returns a Package manifest.  In all three cases the resulting manifests are passed to the ProcessPackages method.&lt;/p&gt;
&lt;p&gt;&lt;!--
{\rtf1\ansi\ansicpg\lang1024\noproof1252\uc1 \deff0{\fonttbl{\f0\fnil\fcharset0\fprq1 Consolas;}}{\colortbl;??\red255\green255\blue255;\red0\green0\blue0;\red204\green120\blue50;\red0\green255\blue0;\red165\green194\blue92;}??\fs20 \cf1\cb2\highlight2 {\b         }\cf3 {\b Private}\cf1 {\b  }\cf3 {\b Sub}\cf1 {\b  ProcessPackages(}\cf3 {\b ByVal}\cf1 {\b  rootNav }\cf3 {\b As}\cf1 {\b  XPathNavigator)}\par ??{\b             }\cf4 {\b 'Parse the package nodes}\par ??\cf1 {\b             }\cf3 {\b For}\cf1 {\b  }\cf3 {\b Each}\cf1 {\b  nav }\cf3 {\b As}\cf1 {\b  XPathNavigator }\cf3 {\b In}\cf1 {\b  rootNav.Select(}\cf5 "packages"\cf1 {\b )}\par ??{\b                 }\cf3 {\b Dim}\cf1 {\b  name }\cf3 {\b As}\cf1 {\b  }\cf3 {\b String}\cf1 {\b  = XmlUtils.GetNodeValue(nav, }\cf5 "package/name"\cf1 {\b )}\par ??{\b                 Packages.Add(name, }\cf3 {\b New}\cf1 {\b  PackageInstaller(nav.InnerXml, InstallerInfo))}\par ??{\b             }\cf3 {\b Next}\par ??\cf1 {\b         }\cf3 {\b End}\cf1 {\b  }\cf3 {\b Sub}\par ??}
--&gt;&lt;/p&gt;
&lt;div style="background: black none repeat scroll 0% 50%; font-family: Consolas; font-size: 10pt; color: white; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; font-weight: bold;"&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  246&lt;/span&gt;         &lt;span style="color: rgb(204, 120, 50);"&gt;Private&lt;/span&gt; &lt;span style="color: rgb(204, 120, 50);"&gt;Sub&lt;/span&gt; ProcessPackages(&lt;span style="color: rgb(204, 120, 50);"&gt;ByVal&lt;/span&gt; rootNav &lt;span style="color: rgb(204, 120, 50);"&gt;As&lt;/span&gt; XPathNavigator)&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  247&lt;/span&gt;             &lt;span style="color: lime;"&gt;'Parse the package nodes&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  248&lt;/span&gt;             &lt;span style="color: rgb(204, 120, 50);"&gt;For&lt;/span&gt; &lt;span style="color: rgb(204, 120, 50);"&gt;Each&lt;/span&gt; nav &lt;span style="color: rgb(204, 120, 50);"&gt;As&lt;/span&gt; XPathNavigator &lt;span style="color: rgb(204, 120, 50);"&gt;In&lt;/span&gt; rootNav.Select(&lt;span style="color: rgb(165, 194, 92); font-weight: normal;"&gt;"packages"&lt;/span&gt;)&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  249&lt;/span&gt;                 &lt;span style="color: rgb(204, 120, 50);"&gt;Dim&lt;/span&gt; name &lt;span style="color: rgb(204, 120, 50);"&gt;As&lt;/span&gt; &lt;span style="color: rgb(204, 120, 50);"&gt;String&lt;/span&gt; = XmlUtils.GetNodeValue(nav, &lt;span style="color: rgb(165, 194, 92); font-weight: normal;"&gt;"package/name"&lt;/span&gt;)&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  250&lt;/span&gt;                 Packages.Add(name, &lt;span style="color: rgb(204, 120, 50);"&gt;New&lt;/span&gt; PackageInstaller(nav.InnerXml, InstallerInfo))&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  251&lt;/span&gt;             &lt;span style="color: rgb(204, 120, 50);"&gt;Next&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  252&lt;/span&gt;         &lt;span style="color: rgb(204, 120, 50);"&gt;End&lt;/span&gt; &lt;span style="color: rgb(204, 120, 50);"&gt;Sub&lt;/span&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;In theory a v5.0 manifest can support multiple packages and so this method loops through the packages/package elements to create a PackageInstaller class for each package and add it to the Packages collection.  I said in theory we can have mutiple packages in a manifest (and as you can see this is supported in the Installer Framework), but in practice the Install Wizard currently only supports a single package in a manifest.  The manifest fragment for the package is passed to the constructor of the PackageInstaller.  Note also that the InstallerInfo instance is also passed to the PackageInstaller.&lt;/p&gt;
&lt;p&gt;&lt;!--
{\rtf1\ansi\ansicpg\lang1024\noproof1252\uc1 \deff0{\fonttbl{\f0\fnil\fcharset0\fprq1 Consolas;}}{\colortbl;??\red255\green255\blue255;\red0\green0\blue0;\red204\green120\blue50;\red0\green255\blue0;\red165\green194\blue92;}??\fs20 \cf1\cb2\highlight2 {\b         }\cf3 {\b Public}\cf1 {\b  }\cf3 {\b Sub}\cf1 {\b  }\cf3 {\b New}\cf1 {\b (}\cf3 {\b ByVal}\cf1 {\b  packageManifest }\cf3 {\b As}\cf1 {\b  }\cf3 {\b String}\cf1 {\b , }\cf3 {\b ByVal}\cf1 {\b  info }\cf3 {\b As}\cf1 {\b  InstallerInfo)}\par ??{\b             Package = }\cf3 {\b New}\cf1 {\b  PackageInfo(info)}\par ??{\b             Package.Manifest = packageManifest}\par ??\par ??{\b             }\cf3 {\b If}\cf1 {\b  }\cf3 {\b Not}\cf1 {\b  }\cf3 {\b String}\cf1 {\b .IsNullOrEmpty(packageManifest) }\cf3 {\b Then}\par ??\cf1 {\b                 }\cf4 {\b 'Create an XPathDocument from the Xml}\par ??\cf1 {\b                 }\cf3 {\b Dim}\cf1 {\b  doc }\cf3 {\b As}\cf1 {\b  }\cf3 {\b New}\cf1 {\b  XPathDocument(}\cf3 {\b New}\cf1 {\b  StringReader(packageManifest))}\par ??{\b                 }\cf3 {\b Dim}\cf1 {\b  nav }\cf3 {\b As}\cf1 {\b  XPathNavigator = doc.CreateNavigator().SelectSingleNode(}\cf5 "package"\cf1 {\b )}\par ??{\b                 ReadManifest(nav)}\par ??{\b             }\cf3 {\b End}\cf1 {\b  }\cf3 {\b If}\par ??\cf1 {\b         }\cf3 {\b End}\cf1 {\b  }\cf3 {\b Sub}\par ??}
--&gt;&lt;/p&gt;
&lt;div style="background: black none repeat scroll 0% 50%; font-family: Consolas; font-size: 10pt; color: white; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; font-weight: bold;"&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;   97&lt;/span&gt;         &lt;span style="color: rgb(204, 120, 50);"&gt;Public&lt;/span&gt; &lt;span style="color: rgb(204, 120, 50);"&gt;Sub&lt;/span&gt; &lt;span style="color: rgb(204, 120, 50);"&gt;New&lt;/span&gt;(&lt;span style="color: rgb(204, 120, 50);"&gt;ByVal&lt;/span&gt; packageManifest &lt;span style="color: rgb(204, 120, 50);"&gt;As&lt;/span&gt; &lt;span style="color: rgb(204, 120, 50);"&gt;String&lt;/span&gt;, &lt;span style="color: rgb(204, 120, 50);"&gt;ByVal&lt;/span&gt; info &lt;span style="color: rgb(204, 120, 50);"&gt;As&lt;/span&gt; InstallerInfo)&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;   98&lt;/span&gt;             Package = &lt;span style="color: rgb(204, 120, 50);"&gt;New&lt;/span&gt; PackageInfo(info)&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;   99&lt;/span&gt;             Package.Manifest = packageManifest&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  100&lt;/span&gt; &lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  101&lt;/span&gt;             &lt;span style="color: rgb(204, 120, 50);"&gt;If&lt;/span&gt; &lt;span style="color: rgb(204, 120, 50);"&gt;Not&lt;/span&gt; &lt;span style="color: rgb(204, 120, 50);"&gt;String&lt;/span&gt;.IsNullOrEmpty(packageManifest) &lt;span style="color: rgb(204, 120, 50);"&gt;Then&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  102&lt;/span&gt;                 &lt;span style="color: lime;"&gt;'Create an XPathDocument from the Xml&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  103&lt;/span&gt;                 &lt;span style="color: rgb(204, 120, 50);"&gt;Dim&lt;/span&gt; doc &lt;span style="color: rgb(204, 120, 50);"&gt;As&lt;/span&gt; &lt;span style="color: rgb(204, 120, 50);"&gt;New&lt;/span&gt; XPathDocument(&lt;span style="color: rgb(204, 120, 50);"&gt;New&lt;/span&gt; StringReader(packageManifest))&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  104&lt;/span&gt;                 &lt;span style="color: rgb(204, 120, 50);"&gt;Dim&lt;/span&gt; nav &lt;span style="color: rgb(204, 120, 50);"&gt;As&lt;/span&gt; XPathNavigator = doc.CreateNavigator().SelectSingleNode(&lt;span style="color: rgb(165, 194, 92); font-weight: normal;"&gt;"package"&lt;/span&gt;)&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  105&lt;/span&gt;                 ReadManifest(nav)&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  106&lt;/span&gt;             &lt;span style="color: rgb(204, 120, 50);"&gt;End&lt;/span&gt; &lt;span style="color: rgb(204, 120, 50);"&gt;If&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  107&lt;/span&gt;         &lt;span style="color: rgb(204, 120, 50);"&gt;End&lt;/span&gt; &lt;span style="color: rgb(204, 120, 50);"&gt;Sub&lt;/span&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;The constructor checks that the manifest is not empty and calls its ReadManifest method.&lt;/p&gt;
&lt;p&gt;&lt;!--
{\rtf1\ansi\ansicpg\lang1024\noproof1252\uc1 \deff0{\fonttbl{\f0\fnil\fcharset0\fprq1 Consolas;}}{\colortbl;??\red255\green255\blue255;\red0\green0\blue0;\red204\green120\blue50;\red0\green255\blue0;\red165\green194\blue92;}??\fs20 \cf1\cb2\highlight2 {\b         }\cf3 {\b Public}\cf1 {\b  }\cf3 {\b Overrides}\cf1 {\b  }\cf3 {\b Sub}\cf1 {\b  ReadManifest(}\cf3 {\b ByVal}\cf1 {\b  manifestNav }\cf3 {\b As}\cf1 {\b  XPathNavigator)}\par ??\par ??{\b             }\cf4 {\b 'Get Name Property}\par ??\cf1 {\b             Package.Name = Util.ReadAttribute(manifestNav, }\cf5 "name"\cf1 {\b , Log, Util.EXCEPTION_NameMissing)}\par ??\par ??{\b             }\cf4 {\b 'Attempt to get the Package from the Data Store (see if its installed)}\par ??\cf1 {\b             InstalledPackage = PackageController.GetPackageByName(Package.Name)}\par ??\par ??{\b             }\cf4 {\b 'Get Type}\par ??\cf1 {\b             Package.PackageType = Util.ReadAttribute(manifestNav, }\cf5 "type"\cf1 {\b , Log, Util.EXCEPTION_TypeMissing)}\par ??{\b             CheckSecurity()}\par ??{\b             }\cf3 {\b If}\cf1 {\b  }\cf3 {\b Not}\cf1 {\b  IsValid }\cf3 {\b Then}\par ??\cf1 {\b                 }\cf3 {\b Exit}\cf1 {\b  }\cf3 {\b Sub}\par ??\cf1 {\b             }\cf3 {\b End}\cf1 {\b  }\cf3 {\b If}\par ??\par ??\cf1 {\b             }\cf4 {\b 'Get Version}\par ??\cf1 {\b             }\cf3 {\b Dim}\cf1 {\b  strVersion }\cf3 {\b As}\cf1 {\b  }\cf3 {\b String}\cf1 {\b  = Util.ReadAttribute(manifestNav, }\cf5 "version"\cf1 {\b , Log, Util.EXCEPTION_VersionMissing)}\par ??{\b             ValidateVersion(strVersion)}\par ??{\b             }\cf3 {\b If}\cf1 {\b  }\cf3 {\b Not}\cf1 {\b  IsValid }\cf3 {\b Then}\par ??\cf1 {\b                 }\cf3 {\b Exit}\cf1 {\b  }\cf3 {\b Sub}\par ??\cf1 {\b             }\cf3 {\b End}\cf1 {\b  }\cf3 {\b If}\par ??\par ??\cf1 {\b             Log.AddInfo(Util.DNN_ReadingPackage + }\cf5 " - "\cf1 {\b  + Package.PackageType + }\cf5 " - "\cf1 {\b  + Package.Name)}\par ??\par ??{\b             }\cf4 {\b 'Get Friendly Name}\par ??\cf1 {\b             Package.FriendlyName = Util.ReadElement(manifestNav, }\cf5 "friendlyname"\cf1 {\b , Package.Name)}\par ??\par ??{\b             }\cf4 {\b 'Get Description}\par ??\cf1 {\b             Package.Description = Util.ReadElement(manifestNav, }\cf5 "description"\cf1 {\b )}\par ??\par ??{\b             }\cf4 {\b 'Get Author}\par ??\cf1 {\b             }\cf3 {\b Dim}\cf1 {\b  authorNav }\cf3 {\b As}\cf1 {\b  XPathNavigator = manifestNav.SelectSingleNode(}\cf5 "owner"\cf1 {\b )}\par ??{\b             }\cf3 {\b If}\cf1 {\b  authorNav }\cf3 {\b IsNot}\cf1 {\b  }\cf3 {\b Nothing}\cf1 {\b  }\cf3 {\b Then}\par ??\cf1 {\b                 Package.Owner = Util.ReadElement(authorNav, }\cf5 "name"\cf1 {\b )}\par ??{\b                 Package.Organization = Util.ReadElement(authorNav, }\cf5 "organization"\cf1 {\b )}\par ??{\b                 Package.Url = Util.ReadElement(authorNav, }\cf5 "url"\cf1 {\b )}\par ??{\b                 Package.Email = Util.ReadElement(authorNav, }\cf5 "email"\cf1 {\b )}\par ??{\b             }\cf3 {\b End}\cf1 {\b  }\cf3 {\b If}\par ??\par ??\cf1 {\b             }\cf4 {\b 'Get License}\par ??\cf1 {\b             }\cf3 {\b Dim}\cf1 {\b  licenseNav }\cf3 {\b As}\cf1 {\b  XPathNavigator = manifestNav.SelectSingleNode(}\cf5 "license"\cf1 {\b )}\par ??{\b             }\cf3 {\b If}\cf1 {\b  licenseNav }\cf3 {\b IsNot}\cf1 {\b  }\cf3 {\b Nothing}\cf1 {\b  }\cf3 {\b Then}\par ??\cf1 {\b                 }\cf3 {\b Dim}\cf1 {\b  licenseSrc }\cf3 {\b As}\cf1 {\b  }\cf3 {\b String}\cf1 {\b  = Util.ReadAttribute(licenseNav, }\cf5 "src"\cf1 {\b )}\par ??{\b                 }\cf3 {\b If}\cf1 {\b  }\cf3 {\b String}\cf1 {\b .IsNullOrEmpty(licenseSrc) }\cf3 {\b Then}\par ??\cf1 {\b                     }\cf4 {\b 'Load from element}\par ??\cf1 {\b                     Package.License = licenseNav.Value}\par ??{\b                 }\cf3 {\b Else}\par ??\cf1 {\b                     }\cf4 {\b 'Load from file}\par ??\cf1 {\b                     }\cf3 {\b Dim}\cf1 {\b  objStreamReader }\cf3 {\b As}\cf1 {\b  StreamReader}\par ??{\b                     objStreamReader = File.OpenText(Package.InstallerInfo.TempInstallFolder + }\cf5 "\\"\cf1 {\b  + licenseSrc)}\par ??{\b                     Package.License = objStreamReader.ReadToEnd}\par ??{\b                     objStreamReader.Close()}\par ??{\b                 }\cf3 {\b End}\cf1 {\b  }\cf3 {\b If}\par ??\cf1 {\b             }\cf3 {\b End}\cf1 {\b  }\cf3 {\b If}\par ??\par ??\cf1 {\b             }\cf3 {\b If}\cf1 {\b  }\cf3 {\b String}\cf1 {\b .IsNullOrEmpty(Package.License) }\cf3 {\b Then}\par ??\cf1 {\b                 }\cf4 {\b 'Legacy Packages have no license}\par ??\cf1 {\b                 Package.License = Util.PACKAGE_NoLicense}\par ??{\b             }\cf3 {\b End}\cf1 {\b  }\cf3 {\b If}\par ??\par ??\cf1 {\b             }\cf4 {\b 'Get Release Notes}\par ??\cf1 {\b             }\cf3 {\b Dim}\cf1 {\b  relNotesNav }\cf3 {\b As}\cf1 {\b  XPathNavigator = manifestNav.SelectSingleNode(}\cf5 "releaseNotes"\cf1 {\b )}\par ??{\b             }\cf3 {\b If}\cf1 {\b  relNotesNav }\cf3 {\b IsNot}\cf1 {\b  }\cf3 {\b Nothing}\cf1 {\b  }\cf3 {\b Then}\par ??\cf1 {\b                 }\cf3 {\b Dim}\cf1 {\b  relNotesSrc }\cf3 {\b As}\cf1 {\b  }\cf3 {\b String}\cf1 {\b  = Util.ReadAttribute(relNotesNav, }\cf5 "src"\cf1 {\b )}\par ??{\b                 }\cf3 {\b If}\cf1 {\b  }\cf3 {\b String}\cf1 {\b .IsNullOrEmpty(relNotesSrc) }\cf3 {\b Then}\par ??\cf1 {\b                     }\cf4 {\b 'Load from element}\par ??\cf1 {\b                     Package.ReleaseNotes = relNotesNav.Value}\par ??{\b                 }\cf3 {\b Else}\par ??\cf1 {\b                     }\cf4 {\b 'Load from file}\par ??\cf1 {\b                     }\cf3 {\b Dim}\cf1 {\b  objStreamReader }\cf3 {\b As}\cf1 {\b  StreamReader}\par ??{\b                     objStreamReader = File.OpenText(Package.InstallerInfo.TempInstallFolder + }\cf5 "\\"\cf1 {\b  + relNotesSrc)}\par ??{\b                     Package.ReleaseNotes = objStreamReader.ReadToEnd}\par ??{\b                     objStreamReader.Close()}\par ??{\b                 }\cf3 {\b End}\cf1 {\b  }\cf3 {\b If}\par ??\cf1 {\b             }\cf3 {\b End}\cf1 {\b  }\cf3 {\b If}\par ??\par ??\cf1 {\b             }\cf3 {\b If}\cf1 {\b  }\cf3 {\b String}\cf1 {\b .IsNullOrEmpty(Package.License) }\cf3 {\b Then}\par ??\cf1 {\b                 }\cf4 {\b 'Legacy Packages have no Release Notes}\par ??\cf1 {\b                 Package.License = Util.PACKAGE_NoReleaseNotes}\par ??{\b             }\cf3 {\b End}\cf1 {\b  }\cf3 {\b If}\par ??\par ??\cf1 {\b             }\cf4 {\b 'Parse the Dependencies}\par ??\cf1 {\b             }\cf3 {\b Dim}\cf1 {\b  dependency }\cf3 {\b As}\cf1 {\b  IDependency = }\cf3 {\b Nothing}\par ??\cf1 {\b             }\cf3 {\b For}\cf1 {\b  }\cf3 {\b Each}\cf1 {\b  dependencyNav }\cf3 {\b As}\cf1 {\b  XPathNavigator }\cf3 {\b In}\cf1 {\b  manifestNav.CreateNavigator().Select(}\cf5 "dependencies/dependency"\cf1 {\b )}\par ??{\b                 dependency = DependencyFactory.GetDependency(dependencyNav)}\par ??{\b                 }\cf3 {\b If}\cf1 {\b  }\cf3 {\b Not}\cf1 {\b  dependency.IsValid }\cf3 {\b Then}\par ??\cf1 {\b                     Log.AddFailure(dependency.ErrorMessage)}\par ??{\b                     }\cf3 {\b Exit}\cf1 {\b  }\cf3 {\b Sub}\par ??\cf1 {\b                 }\cf3 {\b End}\cf1 {\b  }\cf3 {\b If}\par ??\cf1 {\b             }\cf3 {\b Next}\par ??\par ??\cf1 {\b             }\cf4 {\b 'Read Components}\par ??\cf1 {\b             ReadComponents(manifestNav)}\par ??{\b         }\cf3 {\b End}\cf1 {\b  }\cf3 {\b Sub}}
--&gt;&lt;/p&gt;
&lt;div style="background: black none repeat scroll 0% 50%; font-family: Consolas; font-size: 10pt; color: white; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; font-weight: bold;"&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  326&lt;/span&gt;         &lt;span style="color: rgb(204, 120, 50);"&gt;Public&lt;/span&gt; &lt;span style="color: rgb(204, 120, 50);"&gt;Overrides&lt;/span&gt; &lt;span style="color: rgb(204, 120, 50);"&gt;Sub&lt;/span&gt; ReadManifest(&lt;span style="color: rgb(204, 120, 50);"&gt;ByVal&lt;/span&gt; manifestNav &lt;span style="color: rgb(204, 120, 50);"&gt;As&lt;/span&gt; XPathNavigator)&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  327&lt;/span&gt; &lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  328&lt;/span&gt;             .....&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  416&lt;/span&gt; &lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  417&lt;/span&gt;             &lt;span style="color: lime;"&gt;'Read Components&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  418&lt;/span&gt;             ReadComponents(manifestNav)&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  419&lt;/span&gt;         &lt;span style="color: rgb(204, 120, 50);"&gt;End&lt;/span&gt; &lt;span style="color: rgb(204, 120, 50);"&gt;Sub&lt;/span&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;The ReadManifest method is quite long as it processes the manifest elements for the package, but the last statement of the method calls the ReadComponents method.&lt;/p&gt;
&lt;p&gt;&lt;!--
{\rtf1\ansi\ansicpg\lang1024\noproof1252\uc1 \deff0{\fonttbl{\f0\fnil\fcharset0\fprq1 Consolas;}}{\colortbl;??\red255\green255\blue255;\red0\green0\blue0;\red204\green120\blue50;\red0\green255\blue0;\red165\green194\blue92;}??\fs20 \cf1\cb2\highlight2 {\b         }\cf3 {\b Private}\cf1 {\b  }\cf3 {\b Sub}\cf1 {\b  ReadComponents(}\cf3 {\b ByVal}\cf1 {\b  manifestNav }\cf3 {\b As}\cf1 {\b  XPathNavigator)}\par ??{\b             }\cf4 {\b 'Parse the component nodes}\par ??\cf1 {\b             }\cf3 {\b For}\cf1 {\b  }\cf3 {\b Each}\cf1 {\b  componentNav }\cf3 {\b As}\cf1 {\b  XPathNavigator }\cf3 {\b In}\cf1 {\b  manifestNav.CreateNavigator().Select(}\cf5 "components/component"\cf1 {\b )}\par ??{\b                 }\cf4 {\b 'Set default order to next value (ie the same as the size of the collection)}\par ??\cf1 {\b                 }\cf3 {\b Dim}\cf1 {\b  order }\cf3 {\b As}\cf1 {\b  }\cf3 {\b Integer}\cf1 {\b  = ComponentInstallers.Count}\par ??\par ??{\b                 }\cf3 {\b Dim}\cf1 {\b  type }\cf3 {\b As}\cf1 {\b  }\cf3 {\b String}\cf1 {\b  = componentNav.GetAttribute(}\cf5 "type"\cf1 {\b , }\cf5 ""\cf1 {\b )}\par ??\par ??{\b                 }\cf3 {\b If}\cf1 {\b  InstallMode = InstallMode.Install }\cf3 {\b Then}\par ??\cf1 {\b                     }\cf3 {\b Dim}\cf1 {\b  installOrder }\cf3 {\b As}\cf1 {\b  }\cf3 {\b String}\cf1 {\b  = componentNav.GetAttribute(}\cf5 "installOrder"\cf1 {\b , }\cf5 ""\cf1 {\b )}\par ??{\b                     }\cf3 {\b If}\cf1 {\b  }\cf3 {\b Not}\cf1 {\b  }\cf3 {\b String}\cf1 {\b .IsNullOrEmpty(installOrder) }\cf3 {\b Then}\par ??\cf1 {\b                         order = }\cf3 {\b Integer}\cf1 {\b .Parse(installOrder)}\par ??{\b                     }\cf3 {\b End}\cf1 {\b  }\cf3 {\b If}\par ??\cf1 {\b                 }\cf3 {\b Else}\par ??\cf1 {\b                     }\cf3 {\b Dim}\cf1 {\b  unInstallOrder }\cf3 {\b As}\cf1 {\b  }\cf3 {\b String}\cf1 {\b  = componentNav.GetAttribute(}\cf5 "unInstallOrder"\cf1 {\b , }\cf5 ""\cf1 {\b )}\par ??{\b                     }\cf3 {\b If}\cf1 {\b  }\cf3 {\b Not}\cf1 {\b  }\cf3 {\b String}\cf1 {\b .IsNullOrEmpty(unInstallOrder) }\cf3 {\b Then}\par ??\cf1 {\b                         order = }\cf3 {\b Integer}\cf1 {\b .Parse(unInstallOrder)}\par ??{\b                     }\cf3 {\b End}\cf1 {\b  }\cf3 {\b If}\par ??\cf1 {\b                 }\cf3 {\b End}\cf1 {\b  }\cf3 {\b If}\par ??\par ??\cf1 {\b                 }\cf3 {\b If}\cf1 {\b  Package.InstallerInfo }\cf3 {\b IsNot}\cf1 {\b  }\cf3 {\b Nothing}\cf1 {\b  }\cf3 {\b Then}\par ??\cf1 {\b                     Log.AddInfo(Util.DNN_ReadingComponent + }\cf5 " - "\cf1 {\b  + type)}\par ??{\b                 }\cf3 {\b End}\cf1 {\b  }\cf3 {\b If}\par ??\par ??\cf1 {\b                 }\cf3 {\b Dim}\cf1 {\b  installer }\cf3 {\b As}\cf1 {\b  ComponentInstallerBase = InstallerFactory.GetInstaller(componentNav, Package)}\par ??{\b                 }\cf3 {\b If}\cf1 {\b  installer }\cf3 {\b Is}\cf1 {\b  }\cf3 {\b Nothing}\cf1 {\b  }\cf3 {\b Then}\par ??\cf1 {\b                     Log.AddFailure(Util.EXCEPTION_InstallerCreate)}\par ??{\b                 }\cf3 {\b End}\cf1 {\b  }\cf3 {\b If}\par ??\par ??\cf1 {\b                 ComponentInstallers.Add(order, installer)}\par ??{\b                 }\cf3 {\b Me}\cf1 {\b .Package.InstallerInfo.AllowableFiles += }\cf5 ", "\cf1 {\b  + installer.AllowableFiles}\par ??{\b             }\cf3 {\b Next}\par ??\cf1 {\b         }\cf3 {\b End}\cf1 {\b  }\cf3 {\b Sub}\par ??}
--&gt;&lt;/p&gt;
&lt;div style="background: black none repeat scroll 0% 50%; font-family: Consolas; font-size: 10pt; color: white; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; font-weight: bold;"&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  186&lt;/span&gt;         &lt;span style="color: rgb(204, 120, 50);"&gt;Private&lt;/span&gt; &lt;span style="color: rgb(204, 120, 50);"&gt;Sub&lt;/span&gt; ReadComponents(&lt;span style="color: rgb(204, 120, 50);"&gt;ByVal&lt;/span&gt; manifestNav &lt;span style="color: rgb(204, 120, 50);"&gt;As&lt;/span&gt; XPathNavigator)&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  187&lt;/span&gt;             &lt;span style="color: lime;"&gt;'Parse the component nodes&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  188&lt;/span&gt;             &lt;span style="color: rgb(204, 120, 50);"&gt;For&lt;/span&gt; &lt;span style="color: rgb(204, 120, 50);"&gt;Each&lt;/span&gt; componentNav &lt;span style="color: rgb(204, 120, 50);"&gt;As&lt;/span&gt; XPathNavigator &lt;span style="color: rgb(204, 120, 50);"&gt;In&lt;/span&gt; manifestNav.CreateNavigator().Select(&lt;span style="color: rgb(165, 194, 92); font-weight: normal;"&gt;"components/component"&lt;/span&gt;)&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  189&lt;/span&gt;                 &lt;span style="color: lime;"&gt;'Set default order to next value (ie the same as the size of the collection)&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  190&lt;/span&gt;                 &lt;span style="color: rgb(204, 120, 50);"&gt;Dim&lt;/span&gt; order &lt;span style="color: rgb(204, 120, 50);"&gt;As&lt;/span&gt; &lt;span style="color: rgb(204, 120, 50);"&gt;Integer&lt;/span&gt; = ComponentInstallers.Count&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  191&lt;/span&gt; &lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  192&lt;/span&gt;                 &lt;span style="color: rgb(204, 120, 50);"&gt;Dim&lt;/span&gt; type &lt;span style="color: rgb(204, 120, 50);"&gt;As&lt;/span&gt; &lt;span style="color: rgb(204, 120, 50);"&gt;String&lt;/span&gt; = componentNav.GetAttribute(&lt;span style="color: rgb(165, 194, 92); font-weight: normal;"&gt;"type"&lt;/span&gt;, &lt;span style="color: rgb(165, 194, 92); font-weight: normal;"&gt;""&lt;/span&gt;)&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  193&lt;/span&gt; &lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  194&lt;/span&gt;                 &lt;span style="color: rgb(204, 120, 50);"&gt;If&lt;/span&gt; InstallMode = InstallMode.Install &lt;span style="color: rgb(204, 120, 50);"&gt;Then&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  195&lt;/span&gt;                     &lt;span style="color: rgb(204, 120, 50);"&gt;Dim&lt;/span&gt; installOrder &lt;span style="color: rgb(204, 120, 50);"&gt;As&lt;/span&gt; &lt;span style="color: rgb(204, 120, 50);"&gt;String&lt;/span&gt; = componentNav.GetAttribute(&lt;span style="color: rgb(165, 194, 92); font-weight: normal;"&gt;"installOrder"&lt;/span&gt;, &lt;span style="color: rgb(165, 194, 92); font-weight: normal;"&gt;""&lt;/span&gt;)&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  196&lt;/span&gt;                     &lt;span style="color: rgb(204, 120, 50);"&gt;If&lt;/span&gt; &lt;span style="color: rgb(204, 120, 50);"&gt;Not&lt;/span&gt; &lt;span style="color: rgb(204, 120, 50);"&gt;String&lt;/span&gt;.IsNullOrEmpty(installOrder) &lt;span style="color: rgb(204, 120, 50);"&gt;Then&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  197&lt;/span&gt;                         order = &lt;span style="color: rgb(204, 120, 50);"&gt;Integer&lt;/span&gt;.Parse(installOrder)&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  198&lt;/span&gt;                     &lt;span style="color: rgb(204, 120, 50);"&gt;End&lt;/span&gt; &lt;span style="color: rgb(204, 120, 50);"&gt;If&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  199&lt;/span&gt;                 &lt;span style="color: rgb(204, 120, 50);"&gt;Else&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  200&lt;/span&gt;                     &lt;span style="color: rgb(204, 120, 50);"&gt;Dim&lt;/span&gt; unInstallOrder &lt;span style="color: rgb(204, 120, 50);"&gt;As&lt;/span&gt; &lt;span style="color: rgb(204, 120, 50);"&gt;String&lt;/span&gt; = componentNav.GetAttribute(&lt;span style="color: rgb(165, 194, 92); font-weight: normal;"&gt;"unInstallOrder"&lt;/span&gt;, &lt;span style="color: rgb(165, 194, 92); font-weight: normal;"&gt;""&lt;/span&gt;)&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  201&lt;/span&gt;                     &lt;span style="color: rgb(204, 120, 50);"&gt;If&lt;/span&gt; &lt;span style="color: rgb(204, 120, 50);"&gt;Not&lt;/span&gt; &lt;span style="color: rgb(204, 120, 50);"&gt;String&lt;/span&gt;.IsNullOrEmpty(unInstallOrder) &lt;span style="color: rgb(204, 120, 50);"&gt;Then&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  202&lt;/span&gt;                         order = &lt;span style="color: rgb(204, 120, 50);"&gt;Integer&lt;/span&gt;.Parse(unInstallOrder)&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  203&lt;/span&gt;                     &lt;span style="color: rgb(204, 120, 50);"&gt;End&lt;/span&gt; &lt;span style="color: rgb(204, 120, 50);"&gt;If&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  204&lt;/span&gt;                 &lt;span style="color: rgb(204, 120, 50);"&gt;End&lt;/span&gt; &lt;span style="color: rgb(204, 120, 50);"&gt;If&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  205&lt;/span&gt; &lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  206&lt;/span&gt;                 &lt;span style="color: rgb(204, 120, 50);"&gt;If&lt;/span&gt; Package.InstallerInfo &lt;span style="color: rgb(204, 120, 50);"&gt;IsNot&lt;/span&gt; &lt;span style="color: rgb(204, 120, 50);"&gt;Nothing&lt;/span&gt; &lt;span style="color: rgb(204, 120, 50);"&gt;Then&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  207&lt;/span&gt;                     Log.AddInfo(Util.DNN_ReadingComponent + &lt;span style="color: rgb(165, 194, 92); font-weight: normal;"&gt;" - "&lt;/span&gt; + type)&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  208&lt;/span&gt;                 &lt;span style="color: rgb(204, 120, 50);"&gt;End&lt;/span&gt; &lt;span style="color: rgb(204, 120, 50);"&gt;If&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  209&lt;/span&gt; &lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  210&lt;/span&gt;                 &lt;span style="color: rgb(204, 120, 50);"&gt;Dim&lt;/span&gt; installer &lt;span style="color: rgb(204, 120, 50);"&gt;As&lt;/span&gt; ComponentInstallerBase = InstallerFactory.GetInstaller(componentNav, Package)&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  211&lt;/span&gt;                 &lt;span style="color: rgb(204, 120, 50);"&gt;If&lt;/span&gt; installer &lt;span style="color: rgb(204, 120, 50);"&gt;Is&lt;/span&gt; &lt;span style="color: rgb(204, 120, 50);"&gt;Nothing&lt;/span&gt; &lt;span style="color: rgb(204, 120, 50);"&gt;Then&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  212&lt;/span&gt;                     Log.AddFailure(Util.EXCEPTION_InstallerCreate)&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  213&lt;/span&gt;                 &lt;span style="color: rgb(204, 120, 50);"&gt;End&lt;/span&gt; &lt;span style="color: rgb(204, 120, 50);"&gt;If&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  214&lt;/span&gt; &lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  215&lt;/span&gt;                 ComponentInstallers.Add(order, installer)&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  216&lt;/span&gt;                 &lt;span style="color: rgb(204, 120, 50);"&gt;Me&lt;/span&gt;.Package.InstallerInfo.AllowableFiles += &lt;span style="color: rgb(165, 194, 92); font-weight: normal;"&gt;", "&lt;/span&gt; + installer.AllowableFiles&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  217&lt;/span&gt;             &lt;span style="color: rgb(204, 120, 50);"&gt;Next&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  218&lt;/span&gt;         &lt;span style="color: rgb(204, 120, 50);"&gt;End&lt;/span&gt; &lt;span style="color: rgb(204, 120, 50);"&gt;Sub&lt;/span&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;This method demonstrates one of the most important features of the new Installer.  It reads the individual component sections of the manifest and uses a Factory Class to create the appropriate ComponentInstaller (line 210).  The factory class inspects the manifest passed to it and returns a ComponentInstaller which is added to the ComponentInstallers collection.  This collection is a SortedList.  In most situations the components are added to the SortedList in the order in which they are processed in the manifest, but the manifest supports the use of an "installOrder" and "uninstallOrder" attribute which can be used to control the order of installation of the components.&lt;/p&gt;
&lt;p&gt;Lets look at the Factory Class.&lt;/p&gt;
&lt;p&gt;&lt;!--
{\rtf1\ansi\ansicpg\lang1024\noproof1252\uc1 \deff0{\fonttbl{\f0\fnil\fcharset0\fprq1 Consolas;}}{\colortbl;??\red255\green255\blue255;\red0\green0\blue0;\red204\green120\blue50;\red165\green194\blue92;\red0\green255\blue0;}??\fs20 \cf1\cb2\highlight2 {\b         }\cf3 {\b Public}\cf1 {\b  }\cf3 {\b Shared}\cf1 {\b  }\cf3 {\b Function}\cf1 {\b  GetInstaller(}\cf3 {\b ByVal}\cf1 {\b  manifestNav }\cf3 {\b As}\cf1 {\b  XPathNavigator, }\cf3 {\b ByVal}\cf1 {\b  package }\cf3 {\b As}\cf1 {\b  PackageInfo) }\cf3 {\b As}\cf1 {\b  ComponentInstallerBase}\par ??{\b             }\cf3 {\b Dim}\cf1 {\b  installerType }\cf3 {\b As}\cf1 {\b  }\cf3 {\b String}\cf1 {\b  = Util.ReadAttribute(manifestNav, }\cf4 "type"\cf1 {\b )}\par ??{\b             }\cf3 {\b Dim}\cf1 {\b  componentVersion }\cf3 {\b As}\cf1 {\b  }\cf3 {\b String}\cf1 {\b  = Util.ReadAttribute(manifestNav, }\cf4 "version"\cf1 {\b )}\par ??\par ??{\b             }\cf3 {\b Dim}\cf1 {\b  installer }\cf3 {\b As}\cf1 {\b  ComponentInstallerBase = GetInstaller(installerType)}\par ??\par ??{\b             }\cf3 {\b If}\cf1 {\b  installer }\cf3 {\b IsNot}\cf1 {\b  }\cf3 {\b Nothing}\cf1 {\b  }\cf3 {\b Then}\par ??\cf1 {\b                 }\cf5 {\b 'Set package}\par ??\cf1 {\b                 installer.Package = package}\par ??\par ??{\b                 }\cf5 {\b 'Set type}\par ??\cf1 {\b                 installer.Type = installerType}\par ??\par ??{\b                 }\cf3 {\b If}\cf1 {\b  }\cf3 {\b Not}\cf1 {\b  }\cf3 {\b String}\cf1 {\b .IsNullOrEmpty(componentVersion) }\cf3 {\b Then}\par ??\cf1 {\b                     installer.Version = }\cf3 {\b New}\cf1 {\b  Version(componentVersion)}\par ??{\b                 }\cf3 {\b Else}\par ??\cf1 {\b                     installer.Version = package.Version}\par ??{\b                 }\cf3 {\b End}\cf1 {\b  }\cf3 {\b If}\par ??\par ??\cf1 {\b                 }\cf5 {\b 'Read Manifest}\par ??\cf1 {\b                 }\cf3 {\b If}\cf1 {\b  package.InstallerInfo.InstallMode &lt;&gt; InstallMode.ManifestOnly }\cf3 {\b OrElse}\cf1 {\b  installer.SupportsManifestOnlyInstall }\cf3 {\b Then}\par ??\cf1 {\b                     installer.ReadManifest(manifestNav)}\par ??{\b                 }\cf3 {\b End}\cf1 {\b  }\cf3 {\b If}\par ??\cf1 {\b             }\cf3 {\b End}\cf1 {\b  }\cf3 {\b If}\par ??\par ??\cf1 {\b             }\cf3 {\b Return}\cf1 {\b  installer}\par ??\par ??{\b         }\cf3 {\b End}\cf1 {\b  }\cf3 {\b Function}\par ??}
--&gt;&lt;/p&gt;
&lt;div style="background: black none repeat scroll 0% 50%; font-family: Consolas; font-size: 10pt; color: white; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; font-weight: bold;"&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  107&lt;/span&gt;         &lt;span style="color: rgb(204, 120, 50);"&gt;Public&lt;/span&gt; &lt;span style="color: rgb(204, 120, 50);"&gt;Shared&lt;/span&gt; &lt;span style="color: rgb(204, 120, 50);"&gt;Function&lt;/span&gt; GetInstaller(&lt;span style="color: rgb(204, 120, 50);"&gt;ByVal&lt;/span&gt; manifestNav &lt;span style="color: rgb(204, 120, 50);"&gt;As&lt;/span&gt; XPathNavigator, &lt;span style="color: rgb(204, 120, 50);"&gt;ByVal&lt;/span&gt; package &lt;span style="color: rgb(204, 120, 50);"&gt;As&lt;/span&gt; PackageInfo) &lt;span style="color: rgb(204, 120, 50);"&gt;As&lt;/span&gt; ComponentInstallerBase&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  108&lt;/span&gt;             &lt;span style="color: rgb(204, 120, 50);"&gt;Dim&lt;/span&gt; installerType &lt;span style="color: rgb(204, 120, 50);"&gt;As&lt;/span&gt; &lt;span style="color: rgb(204, 120, 50);"&gt;String&lt;/span&gt; = Util.ReadAttribute(manifestNav, &lt;span style="color: rgb(165, 194, 92); font-weight: normal;"&gt;"type"&lt;/span&gt;)&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  109&lt;/span&gt;             &lt;span style="color: rgb(204, 120, 50);"&gt;Dim&lt;/span&gt; componentVersion &lt;span style="color: rgb(204, 120, 50);"&gt;As&lt;/span&gt; &lt;span style="color: rgb(204, 120, 50);"&gt;String&lt;/span&gt; = Util.ReadAttribute(manifestNav, &lt;span style="color: rgb(165, 194, 92); font-weight: normal;"&gt;"version"&lt;/span&gt;)&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  110&lt;/span&gt; &lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  111&lt;/span&gt;             &lt;span style="color: rgb(204, 120, 50);"&gt;Dim&lt;/span&gt; installer &lt;span style="color: rgb(204, 120, 50);"&gt;As&lt;/span&gt; ComponentInstallerBase = GetInstaller(installerType)&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  112&lt;/span&gt; &lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  113&lt;/span&gt;             &lt;span style="color: rgb(204, 120, 50);"&gt;If&lt;/span&gt; installer &lt;span style="color: rgb(204, 120, 50);"&gt;IsNot&lt;/span&gt; &lt;span style="color: rgb(204, 120, 50);"&gt;Nothing&lt;/span&gt; &lt;span style="color: rgb(204, 120, 50);"&gt;Then&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  114&lt;/span&gt;                 &lt;span style="color: lime;"&gt;'Set package&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  115&lt;/span&gt;                 installer.Package = package&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  116&lt;/span&gt; &lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  117&lt;/span&gt;                 &lt;span style="color: lime;"&gt;'Set type&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  118&lt;/span&gt;                 installer.Type = installerType&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  119&lt;/span&gt; &lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  120&lt;/span&gt;                 &lt;span style="color: rgb(204, 120, 50);"&gt;If&lt;/span&gt; &lt;span style="color: rgb(204, 120, 50);"&gt;Not&lt;/span&gt; &lt;span style="color: rgb(204, 120, 50);"&gt;String&lt;/span&gt;.IsNullOrEmpty(componentVersion) &lt;span style="color: rgb(204, 120, 50);"&gt;Then&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  121&lt;/span&gt;                     installer.Version = &lt;span style="color: rgb(204, 120, 50);"&gt;New&lt;/span&gt; Version(componentVersion)&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  122&lt;/span&gt;                 &lt;span style="color: rgb(204, 120, 50);"&gt;Else&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  123&lt;/span&gt;                     installer.Version = package.Version&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  124&lt;/span&gt;                 &lt;span style="color: rgb(204, 120, 50);"&gt;End&lt;/span&gt; &lt;span style="color: rgb(204, 120, 50);"&gt;If&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  125&lt;/span&gt; &lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  126&lt;/span&gt;                 &lt;span style="color: lime;"&gt;'Read Manifest&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  127&lt;/span&gt;                 &lt;span style="color: rgb(204, 120, 50);"&gt;If&lt;/span&gt; package.InstallerInfo.InstallMode &lt;&gt; InstallMode.ManifestOnly &lt;span style="color: rgb(204, 120, 50);"&gt;OrElse&lt;/span&gt; installer.SupportsManifestOnlyInstall &lt;span style="color: rgb(204, 120, 50);"&gt;Then&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin: 0px;"&gt;&lt;span style="color: silver; font-weight: normal;"&gt;  128&lt;/span&gt;                     installer.ReadManifest(manifestNav)&lt;/p&gt;
&lt;p style