Using AdvaniaGIT – How to configure licenses

When NAV environments are built a development license is uploaded to the development database.

Make sure to save your development licenses in your AdvaniaGIT license folder.

There are two ways to configure which license is used.  First with the “licenseFile” property of GITSettings.json in your AdvaniaGIT data folder.

{
  "ftpServer": "ftp://ftp02.hysing.is/",
  "ftpUser": "ftp_sourcetree",
  "ftpPass": "******",
  "licenseFile": "Advania.flf",
  "workFolder": "C:\\AdvaniaGIT\\Workspace",
  "patchNoFunction": "Display-PatchDayNo",
  "defaultDatabaseServer": "localhost",
  "defaultDatabaseInstance": "",
  "objectsNotToDelete": "(14125500..14125600)",
  "sigToolExecutable": "C:\\Program Files (x86)\\Windows Kits\\10\\bin\\x64\\signtool.exe",
  "codeSigningCertificate": "",
  "codeSigningCertificatePassword": "",
  "setupPath": "setup.json",
  "objectsPath": "Objects",
  "deltasPath": "Deltas",
  "reverseDeltasPath": "ReverseDeltas",
  "extensionPath": "Extension1",
  "imagesPath": "Images",
  "screenshotsPath": "ScreenShots",
  "permissionSetsPath": "PermissionSets",
  "addinsPath": "Addins",
  "languagePath": "Languages",
  "tableDataPath": "TableDatas",
  "customReportLayoutsPath": "CustomReportLayouts",
  "webServicesPath": "WebServices",
  "binaryPath": "Binaries",
  "targetPlatform": "DynamicsNAV",
  "VSCodePath": "AL",
  "NewSyntaxPrefix": "NewSyntax"
}

Just specify the file name in the license folder.

The license configured in GITSettings.json will be used as default for all builds.  However, as mentioned earlier, every settings in GITSettings.json can be overwritten by the settings in each branch.

The settings file in each branch is named according to the “setupPath” parameter in GITSettings.json.  If we take a look at the setup.json file for my G/L Source Names solution.

{
  "branchId": "479e77f3-031a-49fe-bb6a-314464c6a9a8",
  "navVersion": "10.0.15052.0",
  "navSolution": "W1",
  "projectName": "GLSOURCENAMES",
  "baseBranch": "master",
  "storeAllObjects": "false",
  "uidOffset": "70009200",  
  "licenseFile": "Kappi.flf",
  "versionList": "GLSN10.0",
  "objectProperties": "true",
  "datetimeCulture": "is-IS",
  "targetPlatform": "Dynamics365",
  "appId": "479e77f3-031a-49fe-bb6a-314464c6a9a8",
  "appName": "G/L Source Names",
  "appPublisher": "Objects4NAV",
  "appVersion": "1.0.0.1",
  "appCompatibilityId": "",
  "appManifestName": "G/L Source Names",
  "appManifestDescription": "G/L Source Names adds the source name to the G/L Entries page.  Source Name is the customer in sales transaction and the vendor in purchase transactions", 
  "appBriefDescription": "Source Names in G/L Entries",
  "appPrivacyStatement": "http://objects4nav.com/privacy",
  "appEula": "http://objects4nav.com/terms",
  "appHelp": "http://objects4nav.com/glsourcenames",
  "appUrl": "http://objects4nav.com",
  "appIcon": "Logo250x250",  
  "appDependencies":
    [
  
    ],
  "appPrerequisites":
    [
  
    ],
  "permissionSets":
    [
  		{"id": "G/L-SOURCE NAMES",    "description": "Read G/L Source Names"},
  		{"id": "G/L-SOURCE NAMES, E", "description": "Update G/L Source Names"},
  		{"id": "G/L-SOURCE NAMES, S", "description": "Setup G/L Source Names"}
  	],
  "webServices":
    [
    
    ],
  "dotnetAddins":
    [
  
    ],
  "tableDatas":
    [
   
    ]
}

Here I need to use another license file.  The one used when I applied for the object range for my extension.

Licenses are not to be stored in SQL backups used by AdvaniaGIT.  When using AdvaniaGIT to create SQL backups the license is removed before creating the backup and reinstalled afterwards.

The first function that is executed after SQL database restore is a database upgrade with the development environment.  This must be done to make sure that the database fits the service version being used.  For this database upgrade function to be successful, first either make sure that the database does not contain expired license, and make sure that you have a valid license in the master database.

There are a few ways of doing this.  First, there is an option when installing NAV to upload the license.

Secondly, in the development environment you can upload a license, going through Tools and License Information.

But make sure that the database your development environment is connected to does not have the “Save license in database” set like here, going through File, Database and Alter.

The third option is to use the server administrative shell.

Hope this helps.  More to come soon.  Stay tuned…

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.