_ _ _____ ______
| | | | | __ \ | ____|
| | ___ ___ __ _| | | | | | _____ __ |__ _ ____ __
| | / _ \ / __/ _` | | | | | |/ _ \ \ / / __| | '_ \ \ / /
| |____ (_) | (__ (_| | | | |__| | __/\ V /| |____| | | \ V /
|______\___/ \___\__,_|_| |_____/ \___| \_/ |______|_| |_|\_/
This script will create a docker based local development environment for your project.
NOTE: You need to have Docker installed, configured and be able to create Business Central containers for this to work.
If this fails, you can setup a cloud based development environment by running cloudDevEnv.ps1
All apps and test apps will be compiled and published to the environment in the development scope.
The script will also modify launch.json to have a Local Sandbox configuration point to your environment.
Checking .github\AL-Go-Settings.json
Reading .github\AL-Go-Settings.json
Checking .AL-Go\settings.json
Reading .AL-Go\settings.json
Checking .github\.settings.json
Checking .AL-Go\.settings.json
Checking .AL-Go\ataeschner.settings.json
Checking System Requirements
Container name
--------------
Please enter the name of the container to create (default bcserver) algo
algo selected
Authentication mechanism for container
--------------------------------------
a Windows Authentication
b Username/Password authentication
Select authentication mechanism for container (default b)
Username/Password authentication selected
LicenseFileUrl
--------------
When developing PTEs, you can optionally specify a developer licensefile with permissions to object IDs of your dependant apps
Local path or a secure download URL to license file (default none)
none selected
Downloading BcContainerHelper latest version
Using 7zip
BcContainerHelper version 3.0.7
BcContainerHelper emits usage statistics telemetry to Microsoft
Checking .github\AL-Go-Settings.json
Reading .github\AL-Go-Settings.json
Checking .AL-Go\settings.json
Reading .AL-Go\settings.json
Checking .github\localDevEnv.settings.json
Checking .AL-Go\localDevEnv.settings.json
Checking .AL-Go\ataeschner.settings.json
Checking type
Checking appFolders and testFolders
Application Dependency 19.0.0.0
Checking artifact setting
Downloading artifacts from https://bcartifacts.azureedge.net/sandbox/20.0.37253.40114/us
Updating app- and test Dependencies
Analyzing Test App Dependencies
WARNING: No test apps found in testFolders in .AL-Go\settings.json
_____ _
| __ \ | |
| |__) |_ _ _ __ __ _ _ __ ___ ___| |_ ___ _ __ ___
| ___/ _` | '__/ _` | '_ ` _ \ / _ \ __/ _ \ '__/ __|
| | | (_| | | | (_| | | | | | | __/ |_ __/ | \__ \
|_| \__,_|_| \__,_|_| |_| |_|\___|\__\___|_| |___/
Pipeline name localDevEnv
Container name algo
Image name
ArtifactUrl https://bcartifacts.azureedge.net/sandbox/20.0.37253.40114/us
SasToken Not Specified
BcAuthContext Not Specified
Environment
ReUseContainer False
KeepContainer True
Auth UserPassword
Credential Specified
CompanyName
MemoryLimit 8G
Enable Task Scheduler False
Assign Premium Plan False
Install Test Runner False
Install Test Framework False
Install Test Libraries False
Install Perf. Toolkit False
InstallOnlyReferencedApps True
generateDependencyArtifact False
CopySymbolsFromContainer False
enableCodeCop False
enableAppSourceCop False
enableUICop False
enablePerTenantExtensionCop True
doNotPerformUpgrade False
uninstallRemovedApps False
escapeFromCops False
doNotBuildTests False
doNotRunTests True
doNotRunBcptTests False
useDefaultAppSourceRuleSet False
rulesetFile
azureDevOps False
gitLab False
gitHubActions False
License file Not specified
CodeSignCertPfxFile Not specified
CodeSignCertPfxPassword Not specified
CodeSignCertIsSelfSigned False
KeyVaultCertPfxFile Not specified
KeyVaultCertPfxPassword Not specified
KeyVaultClientId
BuildOutputFile C:\Users\ataeschner\Documents\AL\shiny-octo-computing-machine\BuildOutput.txt
TestResultsFile C:\Users\ataeschner\Documents\AL\shiny-octo-computing-machine\TestResults.xml
BcptTestResultsFile C:\Users\ataeschner\Documents\AL\shiny-octo-computing-machine\bcptTestResults.json
TestResultsFormat JUnit
AdditionalCountries
PackagesFolder
OutputFolder
BuildArtifactFolder
CreateRuntimePackages False
AppVersion
AppBuild 0
AppRevision 0
Install Apps
- None
Install Test Apps
- None
Previous Apps
- None
Application folders
- C:\Users\ataeschner\Documents\AL\shiny-octo-computing-machine\MySpecialApp
Test application folders
- None
BCPT Test application folders
- None
Custom CodeCops
- None
_____ _ _ _ _ _
| __ \ | | (_) (_) (_)
| |__) | _| | |_ _ __ __ _ __ _ ___ _ __ ___ _ __ _ ___ _ _ __ ___ __ _ __ _ ___
| ___/ | | | | | | '_ \ / _` | / _` |/ _ \ '_ \ / _ \ '__| |/ __| | | '_ ` _ \ / _` |/ _` |/ _ \
| | | |_| | | | | | | | (_| | | (_| | __/ | | | __/ | | | (__ | | | | | | | (_| | (_| | __/
|_| \__,_|_|_|_|_| |_|\__, | \__, |\___|_| |_|\___|_| |_|\___| |_|_| |_| |_|\__,_|\__, |\___|
__/ | __/ | __/ |
|___/ |___/ |___/
Pulling mcr.microsoft.com/businesscentral:10.0.20348.643
Pulling generic image took 2 seconds
_____ _ _ _ _
/ ____| | | (_) | | (_)
| | _ __ ___ __ _| |_ _ _ __ __ _ ___ ___ _ __ | |_ __ _ _ _ __ ___ _ __
| | | '__/ _ \/ _` | __| | '_ \ / _` | / __/ _ \| '_ \| __/ _` | | '_ \ / _ \ '__|
| |____| | | __/ (_| | |_| | | | | (_| | | (__ (_) | | | | |_ (_| | | | | | __/ |
\_____|_| \___|\__,_|\__|_|_| |_|\__, | \___\___/|_| |_|\__\__,_|_|_| |_|\___|_|
__/ |
|___/
BcContainerHelper is version 3.0.7
BcContainerHelper is running as administrator
Hyper-V is Enabled
Host is Microsoft Windows 11 Enterprise - 21H2
Docker Client Version is 20.10.13
Docker Server Version is 20.10.13
Removing container algo
Removing algo from container hosts file
Removing algo-* from container hosts file
Removing C:\ProgramData\BcContainerHelper\Extensions\algo
Fetching all docker images
Fetching all docker volumes
Using image mcr.microsoft.com/businesscentral:10.0.20348.643
Creating Container algo
Style: sandbox
Multitenant: Yes
Version: 20.0.37253.40114
Platform: 20.0.37114.40052
Generic Tag: 1.0.2.1
Container OS Version: 10.0.20348.643 (ltsc2022)
Host OS Version: 10.0.22000.613 (21H2)
Using process isolation
Using locale en-US
Disabling the standard eventlog dump to container log every 2 seconds (use -dumpEventLog to enable)
Additional Parameters:
--volume "C:\Users\ataeschner\Documents\AL\shiny-octo-computing-machine:c:\sources"
--env customNavSettings=EnableTaskScheduler=False
Files in C:\ProgramData\BcContainerHelper\Extensions\algo\my:
- AdditionalOutput.ps1
- MainLoop.ps1
- SetupVariables.ps1
- updatehosts.ps1
Creating container algo from image mcr.microsoft.com/businesscentral:10.0.20348.643
13efafcf541a721bb3cb236216a1ad5b5bf69713f4d4028d42e00a6a89904033
Waiting for container algo to be ready
Using artifactUrl https://bcartifacts.azureedge.net/sandbox/20.0.37253.40114/us
Using installer from C:\Run\150-new
Installing Business Central
Installing from artifacts
Starting Local SQL Server
Starting Internet Information Server
Copying Service Tier Files
c:\dl\sandbox\20.0.37253.40114\platform\ServiceTier\Program Files
c:\dl\sandbox\20.0.37253.40114\platform\ServiceTier\System64Folder
Copying PowerShell Scripts
c:\dl\sandbox\20.0.37253.40114\platform\WindowsPowerShellScripts\Cloud\NAVAdministration
c:\dl\sandbox\20.0.37253.40114\platform\WindowsPowerShellScripts\WebSearch
Copying dependencies
Copying ReportBuilder
Importing PowerShell Modules
Determining Database Collation from c:\dl\sandbox\20.0.37253.40114\us\BusinessCentral-US.bak
Initializing...
Setting host.docker.internal to 192.168.244.169 in container hosts file (copy from host hosts file)
Setting gateway.docker.internal to 192.168.244.169 in container hosts file (copy from host hosts file)
Setting kubernetes.docker.internal to 127.0.0.1 in container hosts file (copy from host hosts file)
Setting host.containerhelper.internal to 172.30.192.1 in container hosts file
Starting Container
Hostname is algo
PublicDnsName is algo
Using NavUserPassword Authentication
Starting Local SQL Server
Starting Internet Information Server
Copying Database on localhost\SQLEXPRESS from CRONUS to tenant
Taking database CRONUS offline
Warning, exception when running: ALTER DATABASE [CRONUS] SET OFFLINE WITH ROLLBACK IMMEDIATE
Waiting... - retrying
Warning, exception when running: ALTER DATABASE [CRONUS] SET OFFLINE WITH ROLLBACK IMMEDIATE
Waiting...... - retrying
Error when running: ALTER DATABASE [CRONUS] SET OFFLINE WITH ROLLBACK IMMEDIATE
Putting database CRONUS back online
Warning, exception when running: ALTER DATABASE [CRONUS] SET ONLINE
Waiting... - retrying
Warning, exception when running: ALTER DATABASE [CRONUS] SET ONLINE
Waiting...... - retrying
Error when running: ALTER DATABASE [CRONUS] SET ONLINE
User does not have permission to alter database 'CRONUS', the database does not exist, or the database is not in a state that allows access checks.
ALTER DATABASE statement failed.
at Invoke-SqlCmdWithRetry, C:\Run\HelperFunctions.ps1: line 434
at Copy-NavDatabase, C:\Run\HelperFunctions.ps1: line 203
at <ScriptBlock>, C:\Run\SetupDatabase.ps1: line 166
at <ScriptBlock>, C:\Run\navstart.ps1: line 122
at <ScriptBlock>, C:\Run\start.ps1: line 363
at <ScriptBlock>, <No file>: line 1Error
Using artifactUrl https://bcartifacts.azureedge.net/sandbox/20.0.37253.40114/us
Using installer from C:\Run\150-new
Installing Business Central
Installing from artifacts
Starting Local SQL Server
Starting Internet Information Server
Copying Service Tier Files
c:\dl\sandbox\20.0.37253.40114\platform\ServiceTier\Program Files
c:\dl\sandbox\20.0.37253.40114\platform\ServiceTier\System64Folder
Copying PowerShell Scripts
c:\dl\sandbox\20.0.37253.40114\platform\WindowsPowerShellScripts\Cloud\NAVAdministration
c:\dl\sandbox\20.0.37253.40114\platform\WindowsPowerShellScripts\WebSearch
Copying dependencies
Copying ReportBuilder
Importing PowerShell Modules
Determining Database Collation from c:\dl\sandbox\20.0.37253.40114\us\BusinessCentral-US.bak
Initializing...
Setting host.docker.internal to 192.168.244.169 in container hosts file (copy from host hosts file)
Setting gateway.docker.internal to 192.168.244.169 in container hosts file (copy from host hosts file)
Setting kubernetes.docker.internal to 127.0.0.1 in container hosts file (copy from host hosts file)
Setting host.containerhelper.internal to 172.30.192.1 in container hosts file
Starting Container
Hostname is algo
PublicDnsName is algo
Using NavUserPassword Authentication
Starting Local SQL Server
Starting Internet Information Server
Copying Database on localhost\SQLEXPRESS from CRONUS to tenant
Taking database CRONUS offline
Warning, exception when running: ALTER DATABASE [CRONUS] SET OFFLINE WITH ROLLBACK IMMEDIATE
Waiting... - retrying
Warning, exception when running: ALTER DATABASE [CRONUS] SET OFFLINE WITH ROLLBACK IMMEDIATE
Waiting...... - retrying
Error when running: ALTER DATABASE [CRONUS] SET OFFLINE WITH ROLLBACK IMMEDIATE
Putting database CRONUS back online
Warning, exception when running: ALTER DATABASE [CRONUS] SET ONLINE
Waiting... - retrying
Warning, exception when running: ALTER DATABASE [CRONUS] SET ONLINE
Waiting...... - retrying
Error when running: ALTER DATABASE [CRONUS] SET ONLINE
User does not have permission to alter database 'CRONUS', the database does not exist, or the database is not in a state that allows access checks.
ALTER DATABASE statement failed.
at Invoke-SqlCmdWithRetry, C:\Run\HelperFunctions.ps1: line 434
at Copy-NavDatabase, C:\Run\HelperFunctions.ps1: line 203
at <ScriptBlock>, C:\Run\SetupDatabase.ps1: line 166
at <ScriptBlock>, C:\Run\navstart.ps1: line 122
at <ScriptBlock>, C:\Run\start.ps1: line 363
at <ScriptBlock>, <No file>: line 1
New-BcContainer Telemetry Correlation Id: 3367781c-2e3e-4b8c-b9df-3b56ee41f0bc
Run-AlPipeline Telemetry Correlation Id: a548a9e5-4182-48fe-a105-574897d800c6
Removing BcContainerHelper
Press ENTER to close this window:
$accept_eula = $true
$auth = "UserPassword"
$credential = get-credential -UserName $env:USERNAME -Message "Using $auth Authentication. Please enter your Windows credentials."
$artifactUrl = Get-BCArtifactUrl -country de
$containerName = "runtest4"
$licenseFile = "##############"
New-BcContainer -accept_eula `
-containerName $containerName `
-artifactUrl $artifactUrl `
-auth $auth `
-credential $credential `
-licenseFile $licenseFile `
-updateHosts `
-isolation hyperv `
-assignPremiumPlan `
-multitenant:$false