Project Changes
All notable changes to the scaffolded project scripts will be documented here.
Runtime apps for Business Central are no longer necessary (2024-06-12)
From Business Central 22.0, runtime versions of the Business Central apps are no longer necessary and may cause licensing issues. This means that you can now use the standard Business Central apps in your projects.
To remove the runtime apps from your project, follow these steps:
- In GetLsCentralPackages.ps1 and NewBundlePackage.ps1, rename the following packages:
- bc-base-application-LOCALIZATION-runtime -> bc-base-application-LOCALIZATION
- bc-system-application-runtime -> bc-system-application
- bc-application-runtime -> bc-application
Business Central Management module moved (2023-05-30)
In Business Central 22.0, the PowerShell management module has been relocated to a subdirectory called management, whereas in earlier versions it was located in the same directory as the service tier executable. This change may impact scripts that reference the module.
Previously, the path to the module was: path\to\servicetier\Microsoft.Dynamics.Nav.Management.dll, but it is now path\to\servicetier\management\Microsoft.Dynamics.Nav.Management.dll.
As a result, the UpdatePosMaster.ps1 script needs to be updated as follows:
Before:
Import-Module (Join-Path $BcServer.Info.ServerDir 'Microsoft.Dynamics.Nav.Management.dll')
After:
$ModuleDir = $BcServer.Info.ServerDir
if (!(Test-Path (Join-Path $ModuleDir 'Microsoft.Dynamics.Nav.Management.dll')))
{
$ModuleDir = Join-Path $BcServer.Info.ServerDir 'Management'
}
Import-Module (Join-Path $ModuleDir 'Microsoft.Dynamics.Nav.Management.dll')
Support for .bclicense files (2023-04-18)
You can now generate a license package that includes both the new .bclicense type and the older .flf type. The appropriate license type will be applied based on the Business Central version in use.
To incorporate support for this in your current project, simply replace your existing NewLicensePackage.ps1 script with the one provided below. Remember to retain the version number from your original script and update it accordingly in the new script. You must also update the package ls-package-tools to version 0.8.2 or later.
param(
$Path,
[switch] $Import,
$Server,
$Port,
[switch] $Force
)
$ErrorActionPreference = 'stop'
Import-Module LsPackageTools\LicensePackageCreator
Import-Module (Join-Path $PSScriptRoot 'Utils.psm1')
$Config = Get-ProjectConfig
if (!$Path)
{
$Path = Join-Path $Config.InputDir 'License'
}
$Arguments = @{
Id = "$($Config.PackageIdPrefix)-license"
Name = "$($Config.Name) License"
Version = '1.0.0'
LicensePath = $Config.InputDir
OutputDir = $Config.OutputDir
}
$Package = New-LicensePackage @Arguments -Force:$Force
$Package
if ($Import)
{
$Package | Import-UssPackage -Server $Server -Port $Port -Force:$Force
}
DLL's removed in 20.5 (2022-10-08)
In LS Central 20.5, the toolbox add-in was removed and therefore no longer needed. Previously, the Data Director add-in was also removed.
When updating to LS Central 20.5, you must remove any references to the packages ls-central-toolbox-server
and ls-dd-server-addin
in your project.
- In GetLsCentralPackages.ps1 and NewBundlePackage.ps1, remove any lines where
ls-central-toolbox-server
andls-dd-server-addin
occur. - If you have extended the project with more bundles or scripts:
- Open the root folder (i.e. C:\LS Retail\My Project) with VS Code.
- Press CTRL + SHIFT + F, and type in
ls-central-toolbox-server
- Remove any references to package.
- Repeat step 2. for
ls-dd-server-addin
.
- Continue with updating the application and platform.
Localization app changes (2021-06-16)
There have been changes to the localized LS Central apps. In general, now there are up to two apps for each locale, one app for the languages and one app for localized functionality.
These apps are available in Update Service as ls-central-LANGUAGENAME-language and ls-central-app-LOCALE, respectively. In addition to the new LS Central localization apps, we have also included the Business Central language apps in Update Service, bc-base-application-is-is-language.
To simplify the selection of available localization apps in Update Service, we introduce a new locale package called locale/ls-central-LOCALE-runtime (where LOCALE is a locale).
The locale packages bear some similarities to bundle packages, as they only have dependencies on the relevant packages for the specific locale. For example:
- IS Locale: locale/ls-central-is-runtime has dependencies to
- ls-central-icelandic-language (IS specific)
- bc-base-application-is-is-language (IS specific)
- ls-central-app-runtime
- bc-base-application-is-runtime (IS specific)
- bc-system-application-runtime
- US Locale: locale/ls-central-us-runtime has dependencies to
- ls-central-app-na-runtime (NA specific)
- ls-central-north-america-languages (NA specific)
- bc-base-application-en-us-language (US specific)
- ls-central-app-runtime
- bc-base-application-us-runtime (US specific)
- bc-system-application-runtime
Update Project lifecycle and Hybrid cloud components project
The following guide describes how to upgrade your existing project to use the new locale/ls-central-LOCALE-runtime packages instead of the old localization app.
Steps
- In your project directory, change the following package ID:
- ls-central-app-xx-runtime to locale/ls-central-xx-runtime
- Replace xx with your preferred locale.
- In the following files:
- GetLsCentralPackages.ps1
- NewBundlePackage.ps1
- Get LS Package, to download the new packages to your server.
- Update POS bundle, to include the new locale package in your bundle.
New script NewAppPackages.ps1 (2021-06-16)
With the latest version of ls-package-tools, when scaffolding projects for Business Central 15.0 and above, a new scripts called NewAppPackages.ps1 is created instead of NewAppPackage.ps1 (notice plural/singular). The new script uses New-AppPackageFromContext
instead of New-AppPackage
and can create packages for multiple apps and automatically adds dependencies to them.
To get the new script, NewAppPackages.ps1:
Update ls-packages-tools to the latest version:
Install-UscPackage -Id 'ls-package-tools'
- Scaffold a new project.
- Copy the new script NewAppPackages.ps1 to your existing project.
- See here for usage.
Upgrade from NA to CA, MX or US
In Business Central 17.0, Microsoft released three localizations CA, MX or US which replace the NA localization.
The following guide describes how to upgrade existing project from NA to CA, MX or US. No actions are required if the project was started in 17.0 or later.
Make sure to:
- Update to the latest Update Service server.
- Get the latest version of ls-setup-helper:
Copy-UssPackageFromServer -Id 'ls-setup-helper' -Version '' -SourceServer 'gocurrent.lsretail.com' -SourcePort 443 -SourceUseSsl -SourceIdentity 'lsretail.com'
- Or using Server to Server in the Update Service Server management portal.
- Update the client to the latest version, before upgrading an instance to CA, MX or US.
In your project directory, change the following package IDs:
- bc-base-application-xx-runtime to bc-base-application-xx-runtime
- ls-central-app-xx-runtime to locale/ls-central-xx-runtime
- Where xx can be ca, mx or us
In the following files:
- GetLsCentralPackages.ps1
- NewBundlePackage.ps1
Then proceed with updating the application and platform as instructed here.