Upgrading v6.9.5 Packages to V7

Author:Amanda A
Last Updated:December 06, 2021 5:03 PM

Master Repository Updates

  1. Go to the master repo for the package you are upgrading (i.e. Themes, Themes.Reflex.Core, Modules.CommonScripts) 
  2. Create v7 branch: Add v7 branch to master repo w/comment: “Created v7 branch” and click Create Branch
  3. Open the master repository at M:\_tpi\ClientSDK\Current and diff to master repo for your package SDK. There are four major file changes you will need to make here:
    • ./.vs/config/applicationhost.template.config
    • ./_LocalPlatform/App_Data/InstanceData/InstanceConfig.template.json
    • ./Dependencies/CommonAssemblyInfo
    • ./Deployment/SDK.config.json:
      1. Update package name, version and description
      2. Update package dependency versions. The min version should be set to the latest preRelease build for the dependent packages (7.0.0.x), and the max version should be 8.0.0.0.
      3. Update database script dependency versions. For database script dependencies, the min and max versions are relative to the installed version of the package you are building. (For example, the min and max versions of my package that the v7 upgrade script should run are 7.0.0.0).
      4. Update roots for Blocks and Page Layouts
      {
          "displayName":  "Single Sign-on Block",
          "internalName":  "NWS.Titan.Blocks.SingleSignOn",
          "packageVersion":  {
                                 "majorVersion":  7,
                                 "minorVersion":  0,
                                 "buildNumber":  0,
                                 "revision":  -1
                             },
          "preRelease":  "false",
          "shortDescription":  "Single Sign-on Block by NWS",
          "longDescription":  "Titan CMS Block Supporting Single Sign-on",
          "packageFilePath":  "\\\\northwoodsoft.com\\src\\_tpi\\Packages\\NWS\\Blocks\\NWS.Titan.Blocks.SingleSignOn_7.0.0.0.zip",
          "deletePackageIfExists":  true,
          "dependencies":  [
                               {
                                   "internalName":  "NWS.Titan.Base",
                                   "minimumVersion":  {
                                                          "majorVersion":  7,
                                                          "minorVersion":  1,
                                                          "buildNumber":  6,
                                                          "revision":  0
                                                      },
                                   "maximumVersion":  {
                                                          "majorVersion":  8,
                                                          "minorVersion":  0,
                                                          "buildNumber":  0,
                                                          "revision":  0
                                                      }
                               },
                               {
                                   "internalName":  "NWS.Titan.Common.Utilities",
                                   "minimumVersion":  {
                                                          "majorVersion":  7,
                                                          "minorVersion":  0,
                                                          "buildNumber":  1,
                                                          "revision":  0
                                                      },
                                   "maximumVersion":  {
                                                          "majorVersion":  8,
                                                          "minorVersion":  0,
                                                          "buildNumber":  0,
                                                          "revision":  0
                                                      }
                               },
                               {
                                   "internalName":  "NWS.Titan.Blocks",
                                   "minimumVersion":  {
                                                          "majorVersion":  7,
                                                          "minorVersion":  0,
                                                          "buildNumber":  1,
                                                          "revision":  0
                                                      },
                                   "maximumVersion":  {
                                                          "majorVersion":  8,
                                                          "minorVersion":  0,
                                                          "buildNumber":  0,
                                                          "revision":  0
                                                      }
                               }
                           ]
      }
      
      
      
      
      BLOCKS
            {
              "root": "BlockViews",
              "sourcePath": "$RootPath\\UISupport\\",
              "targetPath": null,
              "rules": [
                {
                  "action": "Exclude",
                  "pattern": "^web\\..*config$"
                },
                {
                  "action": "Exclude",
                  "pattern": "^bin\\\\"
                }
              ]
            },
      
      
      PAGE LAYOUTS
            {
              "root": "PageLayoutViews",
              "sourcePath": "$RootPath\\Wkst\\ContentMgmt\\PageLayouts\\",
              "targetPath": null,
              "rules": null
            },
      
  4. Commit changes to master repo: "Updated SDK version info for V7"

[Optional]: Removing the SDK from Your Machine

  1. If this is an existing package that you've worked on before...
    • Delete your local DB
    • Delete logins for that SDK. (NWS_Titan_Blocks_SearchBar_AdminUser and NWS_Titan_Blocks_SearchBar_User)
    • Delete or rename the local SDK. You will be cloning down a fresh copy.
  2. Run the install client SDK script with the following parameters: -TargetTitanV7 $true

Upgrading the SDK

Now you can work locally. You will need to upgrade the following things:

  • XSLs and other templates
  • Upgrade JavaScript patterns in XSLs and custom code. View the V7 JavaScript upgrade guide.
  • Page layouts for themes/client instances must be converted to razor files.
  • Upgrade ASMX web services from Custom Web Services project to WCF Services
    • WCF Service
    • WCF Service Proxy
    • WCF Service Contract
    • Add endpoint to web configs: (i.e. /_LocalDisplay/web.config)
      <endpoint binding="basicHttpBinding" bindingConfiguration="BasicHttpsBindingConfig" name="DistributorLocatorSupportService" address="https://local-services.titanclient.com/CustomServices/DistributorLocatorSupportService.svc" contract="Gehls.Titan.Public.WcfContracts.IDistributorLocatorSupportService, Gehls.Titan.Public.WcfContracts" />
      
      
      
      
       
    • Add endpoint to config transforms: (i.e. /Deployment/ConfigFileTransforms/display.web.config.xsl)
      <xsl:if test="not(endpoint[@name='DistributorLocatorSupportService'])">
            <endpoint binding="basicHttpBinding" bindingConfiguration="BasicHttpsBindingConfig" name="DistributorLocatorSupportService" address="{$ServicesUrl}/CustomServices/DistributorLocatorSupportService.svc" contract="Gehls.Titan.Public.WcfContracts.IDistributorLocatorSupportService, Gehls.Titan.Public.WcfContracts" />
      </xsl:if>
      
      
      
      
  • Custom blocks - view comprehensive block upgrade guide
  • Any other custom code, including handlers, etc. - View the App Block Upgrade Guide

Deploying the Package

Once you're ready to deploy your package, open the Package Manager Console and run .\Deployment\Deploy-SDK.ps1.

  • Update the Type [T] parameter to the appropriate package type.
  • Set the Branch to Deploy [B] parameter to v7. Ignore the warning message, it just shows up when you deploy a non-default branch.
  • Set the Release parameter to True. Only deploy in prerelease mode until the package has been fully tested.
  • Deploy your package.
  • Upload the package to your TPI environment and install. (If the package is a preRelease, update your Package listing options to show preRelease packages.)
  • Test to make sure everything is working.
  • You did it! 
top