Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The 'Expand-Archive' command was found in the module 'Microsoft.PowerShell.Archive', #3522

Closed
rdebath opened this issue Apr 29, 2024 · 19 comments · Fixed by #3524
Closed

The 'Expand-Archive' command was found in the module 'Microsoft.PowerShell.Archive', #3522

rdebath opened this issue Apr 29, 2024 · 19 comments · Fixed by #3524

Comments

@rdebath
Copy link

rdebath commented Apr 29, 2024

Describe the issue
I'm getting this error from Compile-AppInBCContainer, this only happens with V23 (not V24 or V25, haven't tested earlier).
Google says this is likely a version skew. ... Hmmm.

It happens with baseimage:ltsc2022 on Windows10 when using HyperV.
It does happen When using baseimage:2004 on Windows10 in process mode.
It does NOT happen when using baseimage:ltsc2022 on Windows-server-2022 in process mode.
It started in 6.0.16, locking the agents on 6.0.15 gives no error.
Is that a DLL copied from the host ?

2024-04-29T07:51:42.4021739Z The 'Expand-Archive' command was found in the module 'Microsoft.PowerShell.Archive', but the module could not be loaded. For more information, run 'Import-Module Microsoft.PowerShell.Archive'.

I did this on a Win11 agent.

Also nothing from a default shell in the image.

PS C:\WINDOWS\system32> docker run -it --rm navimage:secondtolastmajor-gb.1 powershell
Windows PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.

Install the latest PowerShell for new features and improvements! https://aka.ms/PSWindows

PS C:\> Import-Module Microsoft.PowerShell.Archive
PS C:\> exit
PS C:\WINDOWS\system32> docker run -it --rm navimage:secondtolastmajor-gb.1 pwsh
PowerShell 7.4.1
PS C:\> Import-Module Microsoft.PowerShell.Archive
PS C:\> exit

But If I add the command Import-Module Microsoft.PowerShell.Archive into C:\Program Files\WindowsPowerShell\Modules\BcContainerHelper\6.0.16\AppHandling\Compile-AppInNavContainer.ps1 at line 313,
I get this:

Cannot find the Windows PowerShell data file 'ArchiveResources.psd1' in directory 'C:\Windows\system32\WindowsPowerShell\v1.0\Modules\Microsoft.PowerShell.Archive\en-GB\', or in any parent culture directories.

in this:

2024-04-29T08:26:37.3508574Z Sort AppFolders By Dependencies
2024-04-29T08:26:37.4213403Z appProjectFolder: C:\Agent\_work\1\s\Self
2024-04-29T08:26:37.4337604Z Checking for precompiled 'C:\Agent\_work\1\s\Self\Extension Name.app'
2024-04-29T08:26:37.4353729Z Compiling Self
2024-04-29T08:26:37.5275570Z ### Using version 1.0.0.8503 in C:\Agent\_work\1\s\Self\app.json ###
2024-04-29T08:26:39.2327587Z Copying DLLs from C:\Program Files\Microsoft Dynamics NAV\230\Service to assemblyProbingPath
2024-04-29T08:26:40.2113230Z Removing dotnet Framework Assemblies
2024-04-29T08:26:40.3427981Z Using Symbols Folder: C:\Agent\_work\1\s\.alPackages
2024-04-29T08:26:40.4444750Z Cannot find the Windows PowerShell data file 'ArchiveResources.psd1' in directory 'C:\Windows\system32\WindowsPowerShell\v1.0\Modules\Microsoft.PowerShell.Archive\en-GB\', or in any parent culture directories.
2024-04-29T08:26:40.4447678Z 
2024-04-29T08:26:40.4463520Z Exception Script Stack Trace:
2024-04-29T08:26:40.4479841Z at <ScriptBlock>, C:\Windows\system32\WindowsPowerShell\v1.0\Modules\Microsoft.PowerShell.Archive\Microsoft.PowerShell.Archive.psm1: line 28
2024-04-29T08:26:40.4480368Z at <ScriptBlock>, <No file>: line 3
2024-04-29T08:26:40.4484677Z 
2024-04-29T08:26:40.4488055Z PowerShell Call Stack:
2024-04-29T08:26:40.4499361Z at Invoke-ScriptInBcContainer, C:\Program Files\WindowsPowerShell\Modules\BcContainerHelper\6.0.16\ContainerHandling\Invoke-ScriptInNavContainer.ps1: line 71
2024-04-29T08:26:40.4501763Z at Compile-AppInBcContainer, C:\Program Files\WindowsPowerShell\Modules\BcContainerHelper\6.0.16\AppHandling\Compile-AppInNavContainer.ps1: line 311
2024-04-29T08:26:40.4504499Z at <ScriptBlock>, C:\Agent\_work\1\s\BuildTools\Scripts\Compile-App.ps1: line 139
2024-04-29T08:26:40.4507713Z at <ScriptBlock>, C:\Program Files\WindowsPowerShell\Modules\BcContainerHelper\6.0.16\AppHandling\Sort-AppFoldersByDependencies.ps1: line 129
2024-04-29T08:26:40.4510664Z at Sort-AppFoldersByDependencies, C:\Program Files\WindowsPowerShell\Modules\BcContainerHelper\6.0.16\AppHandling\Sort-AppFoldersByDependencies.ps1: line 128
2024-04-29T08:26:40.4513319Z at <ScriptBlock>, C:\Agent\_work\1\s\BuildTools\Scripts\Compile-App.ps1: line 96
2024-04-29T08:26:40.4516302Z at <ScriptBlock>, C:\Agent\_work\_temp\2b53eaba-fde9-44e4-8a1c-95372ccce37a.ps1: line 4
2024-04-29T08:26:40.4519102Z at <ScriptBlock>, <No file>: line 1
2024-04-29T08:26:41.0900212Z 
2024-04-29T08:26:41.0901273Z Container Free Physical Memory: 8.3Gb
2024-04-29T08:26:41.0904078Z 
2024-04-29T08:26:41.0905116Z Services in container Build-S3B28503A160:
2024-04-29T08:26:41.0909411Z - MicrosoftDynamicsNavServer$BC is Running
2024-04-29T08:26:41.0911767Z - MSSQL$SQLEXPRESS is Running
2024-04-29T08:26:41.0912520Z 
2024-04-29T08:26:41.5929446Z Cannot find the Windows PowerShell data file 'ArchiveResources.psd1' in directory 
2024-04-29T08:26:41.5931821Z 'C:\Windows\system32\WindowsPowerShell\v1.0\Modules\Microsoft.PowerShell.Archive\en-GB\', or in any parent culture 
2024-04-29T08:26:41.5933434Z directories.
2024-04-29T08:26:41.5933792Z At C:\Program 
2024-04-29T08:26:41.5935462Z Files\WindowsPowerShell\Modules\BcContainerHelper\6.0.16\ContainerHandling\Invoke-ScriptInNavContainer.ps1:112 char:13
2024-04-29T08:26:41.5936642Z +             throw $errorMessage
2024-04-29T08:26:41.5937038Z +             ~~~~~~~~~~~~~~~~~~~
2024-04-29T08:26:41.5938218Z     + CategoryInfo          : OperationStopped: (Cannot find the...re directories.:String) [], RuntimeException
2024-04-29T08:26:41.5940781Z     + FullyQualifiedErrorId : Cannot find the Windows PowerShell data file 'ArchiveResources.psd1' in directory 'C:\Wi 
2024-04-29T08:26:41.5944071Z    ndows\system32\WindowsPowerShell\v1.0\Modules\Microsoft.PowerShell.Archive\en-GB\', or in any parent culture direc  
2024-04-29T08:26:41.5945922Z   tories.
2024-04-29T08:26:41.5946302Z  
2024-04-29T08:26:41.6980960Z ##[error]PowerShell exited with code '1'.

Scripts used to create container and cause the issue

$appFolders = 'Self';
Sort-AppFoldersByDependencies -appFolders $appFolders.Split(',') -baseFolder $buildProjectFolder -WarningAction SilentlyContinue | ForEach-Object { 
...

                $defs = @('TEST_BUILD','TEST_BUILD_MAIN')
                $appFile = Compile-AppInBCContainer `
                    -containerName $containerName `
                    -credential $credential `
                    -appProjectFolder $appProjectFolder `
                    -appSymbolsFolder $buildSymbolsFolder `
                    -appOutputFolder (Join-Path $buildArtifactFolder $_) `
                    -UpdateSymbols:$false `
                    -AzureDevOps:$true `
                    -FailOn 'none' `
                    -EnablePerTenantExtensionCop:$true `
                    -EnableAppSourceCop:$false `
                    -EnableCodeCop `
                    -EnableUICop `
                    -rulesetFile $rulesetFile `
                    -CustomCodeCops $CustomCodeCops `
                    -preProcessorSymbols $defs
}


Full output of scripts

2024-04-29T07:35:40.7597231Z ##[section]Starting: Compile For previous version
2024-04-29T07:35:40.9060768Z ##[section]Starting: Initialize job
2024-04-29T07:35:40.9062513Z Agent name: 'FA0253B'
2024-04-29T07:35:40.9062716Z Agent machine name: 'FA0253B'
2024-04-29T07:35:40.9062838Z Current agent version: '3.227.2'
2024-04-29T07:35:40.9076664Z Agent running as: 'FA0253B$'
2024-04-29T07:35:40.9102687Z Prepare build directory.
2024-04-29T07:35:40.9642906Z Set build variables.
2024-04-29T07:35:40.9665544Z Download all required tasks.
2024-04-29T07:35:40.9924892Z Checking job knob settings.
2024-04-29T07:35:40.9931259Z    Knob: DockerActionRetries = true Source: $(VSTSAGENT_DOCKER_ACTION_RETRIES) 
2024-04-29T07:35:40.9932836Z    Knob: AgentEnablePipelineArtifactLargeChunkSize = true Source: $(AGENT_ENABLE_PIPELINEARTIFACT_LARGE_CHUNK_SIZE) 
2024-04-29T07:35:40.9934313Z    Knob: ContinueAfterCancelProcessTreeKillAttempt = true Source: $(VSTSAGENT_CONTINUE_AFTER_CANCEL_PROCESSTREEKILL_ATTEMPT) 
2024-04-29T07:35:40.9935108Z    Knob: ProcessHandlerSecureArguments = false Source: $(AZP_75787_ENABLE_NEW_LOGIC) 
2024-04-29T07:35:40.9935660Z    Knob: ProcessHandlerSecureArguments = false Source: $(AZP_75787_ENABLE_NEW_LOGIC_LOG) 
2024-04-29T07:35:40.9936167Z    Knob: ProcessHandlerTelemetry = true Source: $(AZP_75787_ENABLE_COLLECT) 
2024-04-29T07:35:40.9936844Z    Knob: IgnoreVSTSTaskLib = true Source: $(AZP_AGENT_IGNORE_VSTSTASKLIB) 
2024-04-29T07:35:40.9937099Z Finished checking job knob settings.
2024-04-29T07:35:41.0163715Z Start tracking orphan processes.
2024-04-29T07:35:41.0235723Z ##[section]Finishing: Initialize job
2024-04-29T07:35:41.0359104Z ##[section]Async Command Start: DetectDockerContainer
2024-04-29T07:35:41.0359475Z ##[section]Async Command End: DetectDockerContainer
2024-04-29T07:35:41.0359976Z ##[section]Async Command Start: DetectDockerContainer
2024-04-29T07:35:41.0360292Z ##[section]Async Command End: DetectDockerContainer
2024-04-29T07:35:41.0468184Z ##[section]Starting: Checkout Tvision Template@master to s/Self
2024-04-29T07:35:41.0842047Z ==============================================================================
2024-04-29T07:35:41.0842529Z Task         : Get sources
2024-04-29T07:35:41.0842707Z Description  : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.
2024-04-29T07:35:41.0843018Z Version      : 1.0.0
2024-04-29T07:35:41.0843155Z Author       : Microsoft
2024-04-29T07:35:41.0843377Z Help         : [More Information](https://go.microsoft.com/fwlink/?LinkId=798199)
2024-04-29T07:35:41.0843630Z ==============================================================================
2024-04-29T07:35:41.4046933Z Syncing repository: Tvision Template (Git)
2024-04-29T07:35:41.4127434Z Prepending Path environment variable with directory containing 'git.exe'.
2024-04-29T07:35:41.4134102Z ##[command]git version
2024-04-29T07:35:41.4533078Z git version 2.39.1.windows.1
2024-04-29T07:35:41.4547340Z ##[command]git lfs version
2024-04-29T07:35:41.5266120Z git-lfs/3.3.0 (GitHub; windows amd64; go 1.19.3; git 77deabdf)
2024-04-29T07:35:41.5399555Z ##[command]git init "C:\Agent\_work\1\s\Self"
2024-04-29T07:35:41.5731777Z Initialized empty Git repository in C:/Agent/_work/1/s/Self/.git/
2024-04-29T07:35:41.5768596Z ##[command]git remote add origin https://TVisionDev@dev.azure.com/TVisionDev/TVT%AZP2520Extensions/_git/Tvision%AZP2520Template
2024-04-29T07:35:41.6061485Z ##[command]git config gc.auto 0
2024-04-29T07:35:41.6354783Z ##[command]git config --get-all http.https://TVisionDev@dev.azure.com/TVisionDev/TVT%AZP2520Extensions/_git/Tvision%AZP2520Template.extraheader
2024-04-29T07:35:41.6634361Z ##[command]git config --get-all http.extraheader
2024-04-29T07:35:41.6915699Z ##[command]git config --get-regexp .*extraheader
2024-04-29T07:35:41.7196966Z ##[command]git config --get-all http.proxy
2024-04-29T07:35:41.7476709Z ##[command]git config http.version HTTP/1.1
2024-04-29T07:35:41.7856852Z ##[command]git --config-env=http.extraheader=env_var_http.extraheader fetch --force --tags --prune --prune-tags --progress --no-recurse-submodules origin --depth=1 +eba68318be3baf66edb189cd62bf4badde52c95c:refs/remotes/origin/eba68318be3baf66edb189cd62bf4badde52c95c
2024-04-29T07:35:42.0700977Z remote: Azure Repos        
2024-04-29T07:35:42.1523452Z remote: 
2024-04-29T07:35:42.1524000Z remote: Found 89 objects to send. (83 ms)        
2024-04-29T07:35:42.4781372Z From https://dev.azure.com/TVisionDev/TVT%20Extensions/_git/Tvision%20Template
2024-04-29T07:35:42.4782459Z  * [new ref]         eba68318be3baf66edb189cd62bf4badde52c95c -> origin/eba68318be3baf66edb189cd62bf4badde52c95c
2024-04-29T07:35:42.4782970Z  * [new tag]         DemoProject -> DemoProject
2024-04-29T07:35:42.4783251Z  * [new tag]         TemplateV14 -> TemplateV14
2024-04-29T07:35:42.4783541Z  * [new tag]         TemplateV15 -> TemplateV15
2024-04-29T07:35:42.4783823Z  * [new tag]         TemplateV16 -> TemplateV16
2024-04-29T07:35:42.5244612Z ##[command]git --config-env=http.extraheader=env_var_http.extraheader fetch --force --tags --prune --prune-tags --progress --no-recurse-submodules origin --depth=1 +eba68318be3baf66edb189cd62bf4badde52c95c
2024-04-29T07:35:42.8635292Z remote: Azure Repos        
2024-04-29T07:35:42.8635567Z remote: 
2024-04-29T07:35:42.8635705Z remote: Found 0 objects to send. (0 ms)        
2024-04-29T07:35:42.8996125Z From https://dev.azure.com/TVisionDev/TVT%20Extensions/_git/Tvision%20Template
2024-04-29T07:35:42.8997032Z  * branch            eba68318be3baf66edb189cd62bf4badde52c95c -> FETCH_HEAD
2024-04-29T07:35:42.9471171Z ##[command]git checkout --progress --force refs/remotes/origin/eba68318be3baf66edb189cd62bf4badde52c95c
2024-04-29T07:35:42.9550570Z Note: switching to 'refs/remotes/origin/eba68318be3baf66edb189cd62bf4badde52c95c'.
2024-04-29T07:35:42.9551091Z 
2024-04-29T07:35:42.9551506Z You are in 'detached HEAD' state. You can look around, make experimental
2024-04-29T07:35:42.9553251Z changes and commit them, and you can discard any commits you make in this
2024-04-29T07:35:42.9553626Z state without impacting any branches by switching back to a branch.
2024-04-29T07:35:42.9553821Z 
2024-04-29T07:35:42.9553983Z If you want to create a new branch to retain commits you create, you may
2024-04-29T07:35:42.9554431Z do so (now or later) by using -c with the switch command. Example:
2024-04-29T07:35:42.9554608Z 
2024-04-29T07:35:42.9554754Z   git switch -c <new-branch-name>
2024-04-29T07:35:42.9554857Z 
2024-04-29T07:35:42.9554951Z Or undo this operation with:
2024-04-29T07:35:42.9555040Z 
2024-04-29T07:35:42.9555123Z   git switch -
2024-04-29T07:35:42.9555171Z 
2024-04-29T07:35:42.9555372Z Turn off this advice by setting config variable advice.detachedHead to false
2024-04-29T07:35:42.9555623Z 
2024-04-29T07:35:42.9555742Z HEAD is now at eba6831 Update .azureDevOps
2024-04-29T07:35:42.9593255Z ##[command]git config http.https://TVisionDev@dev.azure.com/TVisionDev/TVT%AZP2520Extensions/_git/Tvision%AZP2520Template.extraheader "AUTHORIZATION: placeholder_7a6b4b00-90ed-4617-a36d-9fea0acb4a57"
2024-04-29T07:35:43.0034554Z ##[section]Finishing: Checkout Tvision Template@master to s/Self
2024-04-29T07:35:43.0054744Z ##[section]Starting: Checkout Tvision Template@build-tools to s/BuildTools
2024-04-29T07:35:43.0140928Z ==============================================================================
2024-04-29T07:35:43.0141109Z Task         : Get sources
2024-04-29T07:35:43.0141181Z Description  : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.
2024-04-29T07:35:43.0141408Z Version      : 1.0.0
2024-04-29T07:35:43.0141469Z Author       : Microsoft
2024-04-29T07:35:43.0141529Z Help         : [More Information](https://go.microsoft.com/fwlink/?LinkId=798199)
2024-04-29T07:35:43.0141710Z ==============================================================================
2024-04-29T07:35:43.2777036Z Syncing repository: Tvision Template (git)
2024-04-29T07:35:43.2780596Z Prepending Path environment variable with directory containing 'git.exe'.
2024-04-29T07:35:43.2783643Z ##[command]git version
2024-04-29T07:35:43.3246549Z git version 2.39.1.windows.1
2024-04-29T07:35:43.3262337Z ##[command]git lfs version
2024-04-29T07:35:43.3870960Z git-lfs/3.3.0 (GitHub; windows amd64; go 1.19.3; git 77deabdf)
2024-04-29T07:35:43.4014616Z ##[command]git init "C:\Agent\_work\1\s\BuildTools"
2024-04-29T07:35:43.4338086Z Initialized empty Git repository in C:/Agent/_work/1/s/BuildTools/.git/
2024-04-29T07:35:43.4373447Z ##[command]git remote add origin https://TVisionDev@dev.azure.com/TVisionDev/TVT%AZP2520Extensions/_git/Tvision%AZP2520Template
2024-04-29T07:35:43.4664538Z ##[command]git config gc.auto 0
2024-04-29T07:35:43.4941533Z ##[command]git config --get-all http.https://TVisionDev@dev.azure.com/TVisionDev/TVT%AZP2520Extensions/_git/Tvision%AZP2520Template.extraheader
2024-04-29T07:35:43.5215442Z ##[command]git config --get-all http.extraheader
2024-04-29T07:35:43.5495559Z ##[command]git config --get-regexp .*extraheader
2024-04-29T07:35:43.5784618Z ##[command]git config --get-all http.proxy
2024-04-29T07:35:43.6055002Z ##[command]git config http.version HTTP/1.1
2024-04-29T07:35:43.6431326Z ##[command]git --config-env=http.extraheader=env_var_http.extraheader fetch --force --tags --prune --prune-tags --progress --no-recurse-submodules origin --depth=1 +c4985e6b5cb8a2cb3d8885b12082b0c78c66d641:refs/remotes/origin/c4985e6b5cb8a2cb3d8885b12082b0c78c66d641
2024-04-29T07:35:43.9521038Z remote: Azure Repos        
2024-04-29T07:35:43.9890138Z remote: 
2024-04-29T07:35:43.9891938Z remote: Found 183 objects to send. (27 ms)        
2024-04-29T07:35:44.0579364Z Receiving objects:   0% (1/183)
2024-04-29T07:35:44.0810302Z Receiving objects:   1% (2/183)
2024-04-29T07:35:44.0810741Z Receiving objects:   2% (4/183)
2024-04-29T07:35:44.0811165Z Receiving objects:   3% (6/183)
2024-04-29T07:35:44.0813117Z Receiving objects:   4% (8/183)
2024-04-29T07:35:44.0813595Z Receiving objects:   5% (10/183)
2024-04-29T07:35:44.0813896Z Receiving objects:   6% (11/183)
2024-04-29T07:35:44.0814216Z Receiving objects:   7% (13/183)
2024-04-29T07:35:44.0816787Z Receiving objects:   8% (15/183)
2024-04-29T07:35:44.0817445Z Receiving objects:   9% (17/183)
2024-04-29T07:35:44.0818012Z Receiving objects:  10% (19/183)
2024-04-29T07:35:44.0818572Z Receiving objects:  11% (21/183)
2024-04-29T07:35:44.0969167Z Receiving objects:  12% (22/183)
2024-04-29T07:35:44.0970130Z Receiving objects:  13% (24/183)
2024-04-29T07:35:44.0970774Z Receiving objects:  14% (26/183)
2024-04-29T07:35:44.0971388Z Receiving objects:  15% (28/183)
2024-04-29T07:35:44.0972007Z Receiving objects:  16% (30/183)
2024-04-29T07:35:44.0972581Z Receiving objects:  17% (32/183)
2024-04-29T07:35:44.0972982Z Receiving objects:  18% (33/183)
2024-04-29T07:35:44.0973401Z Receiving objects:  19% (35/183)
2024-04-29T07:35:44.0977158Z Receiving objects:  20% (37/183)
2024-04-29T07:35:44.0977776Z Receiving objects:  21% (39/183)
2024-04-29T07:35:44.0978185Z Receiving objects:  22% (41/183)
2024-04-29T07:35:44.0984203Z Receiving objects:  23% (43/183)
2024-04-29T07:35:44.0985805Z Receiving objects:  24% (44/183)
2024-04-29T07:35:44.0989216Z Receiving objects:  25% (46/183)
2024-04-29T07:35:44.0994178Z Receiving objects:  26% (48/183)
2024-04-29T07:35:44.0994982Z Receiving objects:  27% (50/183)
2024-04-29T07:35:44.0995729Z Receiving objects:  28% (52/183)
2024-04-29T07:35:44.0997615Z Receiving objects:  29% (54/183)
2024-04-29T07:35:44.0998640Z Receiving objects:  30% (55/183)
2024-04-29T07:35:44.0999164Z Receiving objects:  31% (57/183)
2024-04-29T07:35:44.1001906Z Receiving objects:  32% (59/183)
2024-04-29T07:35:44.1002931Z Receiving objects:  33% (61/183)
2024-04-29T07:35:44.1003456Z Receiving objects:  34% (63/183)
2024-04-29T07:35:44.1005680Z Receiving objects:  35% (65/183)
2024-04-29T07:35:44.1006638Z Receiving objects:  36% (66/183)
2024-04-29T07:35:44.1007015Z Receiving objects:  37% (68/183)
2024-04-29T07:35:44.1007327Z Receiving objects:  38% (70/183)
2024-04-29T07:35:44.1013704Z Receiving objects:  39% (72/183)
2024-04-29T07:35:44.1015316Z Receiving objects:  40% (74/183)
2024-04-29T07:35:44.1015616Z Receiving objects:  41% (76/183)
2024-04-29T07:35:44.1015793Z Receiving objects:  42% (77/183)
2024-04-29T07:35:44.1016088Z Receiving objects:  43% (79/183)
2024-04-29T07:35:44.1018828Z Receiving objects:  44% (81/183)
2024-04-29T07:35:44.1019926Z Receiving objects:  45% (83/183)
2024-04-29T07:35:44.1020196Z Receiving objects:  46% (85/183)
2024-04-29T07:35:44.1020413Z Receiving objects:  47% (87/183)
2024-04-29T07:35:44.1020636Z Receiving objects:  48% (88/183)
2024-04-29T07:35:44.1020856Z Receiving objects:  49% (90/183)
2024-04-29T07:35:44.1021070Z Receiving objects:  50% (92/183)
2024-04-29T07:35:44.1022184Z Receiving objects:  51% (94/183)
2024-04-29T07:35:44.1023921Z Receiving objects:  52% (96/183)
2024-04-29T07:35:44.1024270Z Receiving objects:  53% (97/183)
2024-04-29T07:35:44.1026103Z Receiving objects:  54% (99/183)
2024-04-29T07:35:44.1026585Z Receiving objects:  55% (101/183)
2024-04-29T07:35:44.1026851Z Receiving objects:  56% (103/183)
2024-04-29T07:35:44.1027002Z Receiving objects:  57% (105/183)
2024-04-29T07:35:44.1027148Z Receiving objects:  58% (107/183)
2024-04-29T07:35:44.1028643Z Receiving objects:  59% (108/183)
2024-04-29T07:35:44.1029875Z Receiving objects:  60% (110/183)
2024-04-29T07:35:44.1030120Z Receiving objects:  61% (112/183)
2024-04-29T07:35:44.1030422Z Receiving objects:  62% (114/183)
2024-04-29T07:35:44.1030676Z Receiving objects:  63% (116/183)
2024-04-29T07:35:44.1077369Z Receiving objects:  64% (118/183)
2024-04-29T07:35:44.1078140Z Receiving objects:  65% (119/183)
2024-04-29T07:35:44.1080053Z Receiving objects:  66% (121/183)
2024-04-29T07:35:44.1082388Z Receiving objects:  67% (123/183)
2024-04-29T07:35:44.1083183Z Receiving objects:  68% (125/183)
2024-04-29T07:35:44.1083674Z Receiving objects:  69% (127/183)
2024-04-29T07:35:44.1084103Z Receiving objects:  70% (129/183)
2024-04-29T07:35:44.1085105Z Receiving objects:  71% (130/183)
2024-04-29T07:35:44.1087003Z Receiving objects:  72% (132/183)
2024-04-29T07:35:44.1088249Z Receiving objects:  73% (134/183)
2024-04-29T07:35:44.1090273Z Receiving objects:  74% (136/183)
2024-04-29T07:35:44.1090761Z Receiving objects:  75% (138/183)
2024-04-29T07:35:44.1092999Z Receiving objects:  76% (140/183)
2024-04-29T07:35:44.1093316Z Receiving objects:  77% (141/183)
2024-04-29T07:35:44.1093597Z Receiving objects:  78% (143/183)
2024-04-29T07:35:44.1095661Z Receiving objects:  79% (145/183)
2024-04-29T07:35:44.1095886Z Receiving objects:  80% (147/183)
2024-04-29T07:35:44.1096035Z Receiving objects:  81% (149/183)
2024-04-29T07:35:44.1097358Z Receiving objects:  82% (151/183)
2024-04-29T07:35:44.1098475Z Receiving objects:  83% (152/183)
2024-04-29T07:35:44.1099827Z Receiving objects:  84% (154/183)
2024-04-29T07:35:44.1100119Z Receiving objects:  85% (156/183)
2024-04-29T07:35:44.1100949Z Receiving objects:  86% (158/183)
2024-04-29T07:35:44.1101114Z Receiving objects:  87% (160/183)
2024-04-29T07:35:44.1103116Z Receiving objects:  88% (162/183)
2024-04-29T07:35:44.1117609Z Receiving objects:  89% (163/183)
2024-04-29T07:35:44.1118064Z Receiving objects:  90% (165/183)
2024-04-29T07:35:44.1118366Z Receiving objects:  91% (167/183)
2024-04-29T07:35:44.1119843Z Receiving objects:  92% (169/183)
2024-04-29T07:35:44.1121109Z Receiving objects:  93% (171/183)
2024-04-29T07:35:44.1121337Z Receiving objects:  94% (173/183)
2024-04-29T07:35:44.1121481Z Receiving objects:  95% (174/183)
2024-04-29T07:35:44.1122904Z Receiving objects:  96% (176/183)
2024-04-29T07:35:44.1123316Z Receiving objects:  97% (178/183)
2024-04-29T07:35:44.1123524Z Receiving objects:  98% (180/183)
2024-04-29T07:35:44.1124935Z Receiving objects:  99% (182/183)
2024-04-29T07:35:44.1125946Z Receiving objects: 100% (183/183)
2024-04-29T07:35:44.1126429Z Receiving objects: 100% (183/183), 276.48 KiB | 4.94 MiB/s, done.
2024-04-29T07:35:44.1133486Z Resolving deltas:   0% (0/21)
2024-04-29T07:35:44.1133798Z Resolving deltas:   4% (1/21)
2024-04-29T07:35:44.1134748Z Resolving deltas:   9% (2/21)
2024-04-29T07:35:44.1136783Z Resolving deltas:  14% (3/21)
2024-04-29T07:35:44.1137072Z Resolving deltas:  19% (4/21)
2024-04-29T07:35:44.1137547Z Resolving deltas:  28% (6/21)
2024-04-29T07:35:44.1137808Z Resolving deltas:  33% (7/21)
2024-04-29T07:35:44.1138006Z Resolving deltas:  38% (8/21)
2024-04-29T07:35:44.1138208Z Resolving deltas:  42% (9/21)
2024-04-29T07:35:44.1139333Z Resolving deltas:  47% (10/21)
2024-04-29T07:35:44.1139988Z Resolving deltas:  52% (11/21)
2024-04-29T07:35:44.1140216Z Resolving deltas:  57% (12/21)
2024-04-29T07:35:44.1140431Z Resolving deltas:  61% (13/21)
2024-04-29T07:35:44.1140648Z Resolving deltas:  66% (14/21)
2024-04-29T07:35:44.1142516Z Resolving deltas:  71% (15/21)
2024-04-29T07:35:44.1142815Z Resolving deltas:  76% (16/21)
2024-04-29T07:35:44.1143924Z Resolving deltas:  80% (17/21)
2024-04-29T07:35:44.1145373Z Resolving deltas:  90% (19/21)
2024-04-29T07:35:44.1145637Z Resolving deltas:  95% (20/21)
2024-04-29T07:35:44.1148091Z Resolving deltas: 100% (21/21)
2024-04-29T07:35:44.1148296Z Resolving deltas: 100% (21/21), done.
2024-04-29T07:35:44.1517730Z From https://dev.azure.com/TVisionDev/TVT%20Extensions/_git/Tvision%20Template
2024-04-29T07:35:44.1518814Z  * [new ref]         c4985e6b5cb8a2cb3d8885b12082b0c78c66d641 -> origin/c4985e6b5cb8a2cb3d8885b12082b0c78c66d641
2024-04-29T07:35:44.1519349Z  * [new tag]         DemoProject -> DemoProject
2024-04-29T07:35:44.1519620Z  * [new tag]         TemplateV14 -> TemplateV14
2024-04-29T07:35:44.1519862Z  * [new tag]         TemplateV15 -> TemplateV15
2024-04-29T07:35:44.1520107Z  * [new tag]         TemplateV16 -> TemplateV16
2024-04-29T07:35:44.2172195Z ##[command]git --config-env=http.extraheader=env_var_http.extraheader fetch --force --tags --prune --prune-tags --progress --no-recurse-submodules origin --depth=1 +c4985e6b5cb8a2cb3d8885b12082b0c78c66d641
2024-04-29T07:35:44.5517404Z remote: Azure Repos        
2024-04-29T07:35:44.5540178Z remote: 
2024-04-29T07:35:44.5540934Z remote: Found 0 objects to send. (12 ms)        
2024-04-29T07:35:44.5970783Z From https://dev.azure.com/TVisionDev/TVT%20Extensions/_git/Tvision%20Template
2024-04-29T07:35:44.5971731Z  * branch            c4985e6b5cb8a2cb3d8885b12082b0c78c66d641 -> FETCH_HEAD
2024-04-29T07:35:44.6553370Z ##[command]git checkout --progress --force refs/remotes/origin/c4985e6b5cb8a2cb3d8885b12082b0c78c66d641
2024-04-29T07:35:44.6817699Z Note: switching to 'refs/remotes/origin/c4985e6b5cb8a2cb3d8885b12082b0c78c66d641'.
2024-04-29T07:35:44.6818196Z 
2024-04-29T07:35:44.6818615Z You are in 'detached HEAD' state. You can look around, make experimental
2024-04-29T07:35:44.6819135Z changes and commit them, and you can discard any commits you make in this
2024-04-29T07:35:44.6819640Z state without impacting any branches by switching back to a branch.
2024-04-29T07:35:44.6819924Z 
2024-04-29T07:35:44.6820171Z If you want to create a new branch to retain commits you create, you may
2024-04-29T07:35:44.6820975Z do so (now or later) by using -c with the switch command. Example:
2024-04-29T07:35:44.6821262Z 
2024-04-29T07:35:44.6821467Z   git switch -c <new-branch-name>
2024-04-29T07:35:44.6821608Z 
2024-04-29T07:35:44.6821735Z Or undo this operation with:
2024-04-29T07:35:44.6821860Z 
2024-04-29T07:35:44.6821970Z   git switch -
2024-04-29T07:35:44.6822045Z 
2024-04-29T07:35:44.6822301Z Turn off this advice by setting config variable advice.detachedHead to false
2024-04-29T07:35:44.6822588Z 
2024-04-29T07:35:44.6822678Z HEAD is now at c4985e6 Pin version 6.0.15
2024-04-29T07:35:44.6944976Z ##[section]Finishing: Checkout Tvision Template@build-tools to s/BuildTools
2024-04-29T07:35:44.6961871Z ##[section]Starting: Install BCContainerHelper
2024-04-29T07:35:44.7047039Z ==============================================================================
2024-04-29T07:35:44.7047202Z Task         : PowerShell
2024-04-29T07:35:44.7047275Z Description  : Run a PowerShell script on Linux, macOS, or Windows
2024-04-29T07:35:44.7047952Z Version      : 2.237.5
2024-04-29T07:35:44.7048016Z Author       : Microsoft Corporation
2024-04-29T07:35:44.7048104Z Help         : https://docs.microsoft.com/azure/devops/pipelines/tasks/utility/powershell
2024-04-29T07:35:44.7048329Z ==============================================================================
2024-04-29T07:35:45.8754335Z Generating script.
2024-04-29T07:35:45.9087088Z Formatted command: . 'C:\Agent\_work\1\s\BuildTools\Scripts\Install-BCContainerHelper.ps1'
2024-04-29T07:35:45.9313905Z ========================== Starting Command Output ===========================
2024-04-29T07:35:45.9490269Z ##[command]"C:\WINDOWS\System32\WindowsPowerShell\v1.0\powershell.exe" -NoLogo -NoProfile -NonInteractive -ExecutionPolicy Unrestricted -Command ". 'C:\Agent\_work\_temp\7b058d98-0606-44e6-83a6-4d6acfc05663.ps1'"
2024-04-29T07:35:46.1850714Z scriptFolder: C:\Agent\_work\1/s/BuildTools/Scripts
2024-04-29T07:35:46.1901202Z BcContainerHelper Version: current
2024-04-29T07:35:50.2475250Z Installing BcContainerHelper
2024-04-29T07:36:01.0611121Z BcContainerHelper 6.0.16 installed
2024-04-29T07:36:01.4832426Z Enabling Hyper-V containers by default for Client SKU
2024-04-29T07:36:01.4841997Z Querying status of Windows feature: Containers...
2024-04-29T07:36:01.9542686Z Feature Containers is already enabled.
2024-04-29T07:36:02.0491620Z Querying status of Windows feature: Hyper-V...
2024-04-29T07:36:02.2268503Z Feature Hyper-V is already enabled.
2024-04-29T07:36:03.4554419Z Docker is already installed.
2024-04-29T07:36:03.4575292Z Script complete!
2024-04-29T07:36:03.5328678Z ##[section]Finishing: Install BCContainerHelper
2024-04-29T07:36:03.5378987Z ##[section]Starting: Download Generic Image
2024-04-29T07:36:03.5547726Z ==============================================================================
2024-04-29T07:36:03.5548246Z Task         : PowerShell
2024-04-29T07:36:03.5548457Z Description  : Run a PowerShell script on Linux, macOS, or Windows
2024-04-29T07:36:03.5549007Z Version      : 2.237.5
2024-04-29T07:36:03.5549188Z Author       : Microsoft Corporation
2024-04-29T07:36:03.5549476Z Help         : https://docs.microsoft.com/azure/devops/pipelines/tasks/utility/powershell
2024-04-29T07:36:03.5550173Z ==============================================================================
2024-04-29T07:36:04.7661681Z Generating script.
2024-04-29T07:36:04.8002163Z Formatted command: . 'C:\Agent\_work\1\s\BuildTools\Scripts\Download-Generic.ps1'
2024-04-29T07:36:04.8218342Z ========================== Starting Command Output ===========================
2024-04-29T07:36:04.8386157Z ##[command]"C:\WINDOWS\System32\WindowsPowerShell\v1.0\powershell.exe" -NoLogo -NoProfile -NonInteractive -ExecutionPolicy Unrestricted -Command ". 'C:\Agent\_work\_temp\2a7bf773-043b-4d2b-a874-f2935ff098ea.ps1'"
2024-04-29T07:36:05.3635505Z BcContainerHelper version 6.0.16
2024-04-29T07:36:05.6767827Z Setting MicrosoftTelemetryConnectionString = 
2024-04-29T07:36:06.3438781Z Running on Windows, PowerShell 5.1.22621.2506
2024-04-29T07:36:24.0656355Z ### Downloading generic image ###
2024-04-29T07:36:24.7798453Z ltsc2022: Pulling from businesscentral
2024-04-29T07:36:25.3025962Z 7c76e5cf7755: Already exists
2024-04-29T07:36:25.3098396Z 197484daab96: Already exists
2024-04-29T07:36:25.3146440Z afcbe0bee67a: Already exists
2024-04-29T07:36:25.3196432Z 6e328f6a3036: Already exists
2024-04-29T07:36:25.3254211Z 61ec7b46ed6f: Pulling fs layer
2024-04-29T07:36:25.3261669Z da1da32a1cce: Pulling fs layer
2024-04-29T07:36:25.3267032Z ed9bd95cf416: Pulling fs layer
2024-04-29T07:36:25.3271688Z 059d45609d4c: Pulling fs layer
2024-04-29T07:36:25.3276200Z a832c04be7b7: Pulling fs layer
2024-04-29T07:36:25.3280586Z b44616238af4: Pulling fs layer
2024-04-29T07:36:25.3285099Z e7ffbc4feeb4: Pulling fs layer
2024-04-29T07:36:25.3289652Z b57509b7609b: Pulling fs layer
2024-04-29T07:36:25.3294309Z 541e0f948e11: Pulling fs layer
2024-04-29T07:36:25.3303880Z 49c5ef8ce01b: Pulling fs layer
2024-04-29T07:36:25.3309522Z 059d45609d4c: Waiting
2024-04-29T07:36:25.3321360Z a832c04be7b7: Waiting
2024-04-29T07:36:25.3326926Z b44616238af4: Waiting
2024-04-29T07:36:25.3332154Z e7ffbc4feeb4: Waiting
2024-04-29T07:36:25.3337342Z 49c5ef8ce01b: Waiting
2024-04-29T07:36:25.3343414Z b57509b7609b: Waiting
2024-04-29T07:36:25.3349162Z 541e0f948e11: Waiting
2024-04-29T07:36:25.5197436Z 61ec7b46ed6f: Verifying Checksum
2024-04-29T07:36:25.5218500Z 61ec7b46ed6f: Download complete
2024-04-29T07:36:25.5243557Z ed9bd95cf416: Verifying Checksum
2024-04-29T07:36:25.5265419Z ed9bd95cf416: Download complete
2024-04-29T07:36:25.5513421Z da1da32a1cce: Verifying Checksum
2024-04-29T07:36:25.5520355Z da1da32a1cce: Download complete
2024-04-29T07:36:25.7088304Z 61ec7b46ed6f: Pull complete
2024-04-29T07:36:25.8619245Z 059d45609d4c: Verifying Checksum
2024-04-29T07:36:25.8630209Z 059d45609d4c: Download complete
2024-04-29T07:36:25.8735480Z da1da32a1cce: Pull complete
2024-04-29T07:36:26.0517956Z ed9bd95cf416: Pull complete
2024-04-29T07:36:26.2851705Z 059d45609d4c: Pull complete
2024-04-29T07:36:26.6947594Z e7ffbc4feeb4: Verifying Checksum
2024-04-29T07:36:26.6964820Z e7ffbc4feeb4: Download complete
2024-04-29T07:36:27.0435348Z b57509b7609b: Verifying Checksum
2024-04-29T07:36:27.0450833Z b57509b7609b: Download complete
2024-04-29T07:36:27.4989206Z 541e0f948e11: Verifying Checksum
2024-04-29T07:36:27.5008961Z 541e0f948e11: Download complete
2024-04-29T07:36:27.9408060Z 49c5ef8ce01b: Verifying Checksum
2024-04-29T07:36:27.9423422Z 49c5ef8ce01b: Download complete
2024-04-29T07:36:50.5978836Z b44616238af4: Download complete
2024-04-29T07:42:43.2725180Z a832c04be7b7: Verifying Checksum
2024-04-29T07:42:43.2746256Z a832c04be7b7: Download complete
2024-04-29T07:43:30.4145827Z a832c04be7b7: Pull complete
2024-04-29T07:43:36.3629383Z b44616238af4: Pull complete
2024-04-29T07:43:36.5776443Z e7ffbc4feeb4: Pull complete
2024-04-29T07:43:36.7775220Z b57509b7609b: Pull complete
2024-04-29T07:43:36.9801968Z 541e0f948e11: Pull complete
2024-04-29T07:43:37.1965553Z 49c5ef8ce01b: Pull complete
2024-04-29T07:43:37.2294474Z Digest: sha256:af300ae9ffe5a91d4b185713c2e75542c65fb8e07e1d46edc41d1e3569ebb6fd
2024-04-29T07:43:37.2369126Z Status: Downloaded newer image for mcr.microsoft.com/businesscentral:ltsc2022
2024-04-29T07:43:37.2438936Z mcr.microsoft.com/businesscentral:ltsc2022
2024-04-29T07:43:37.2555150Z ### Exit Download-Generic.ps1
2024-04-29T07:43:37.3268846Z ##[section]Finishing: Download Generic Image
2024-04-29T07:43:37.3319083Z ##[section]Starting: Create Build Image
2024-04-29T07:43:37.3475995Z ==============================================================================
2024-04-29T07:43:37.3476152Z Task         : PowerShell
2024-04-29T07:43:37.3476226Z Description  : Run a PowerShell script on Linux, macOS, or Windows
2024-04-29T07:43:37.3476394Z Version      : 2.237.5
2024-04-29T07:43:37.3476452Z Author       : Microsoft Corporation
2024-04-29T07:43:37.3476549Z Help         : https://docs.microsoft.com/azure/devops/pipelines/tasks/utility/powershell
2024-04-29T07:43:37.3476780Z ==============================================================================
2024-04-29T07:43:38.5922072Z Generating script.
2024-04-29T07:43:38.6247804Z Formatted command: . 'C:\Agent\_work\1\s\BuildTools\Scripts\Create-Image.ps1'
2024-04-29T07:43:38.6462218Z ========================== Starting Command Output ===========================
2024-04-29T07:43:38.6624035Z ##[command]"C:\WINDOWS\System32\WindowsPowerShell\v1.0\powershell.exe" -NoLogo -NoProfile -NonInteractive -ExecutionPolicy Unrestricted -Command ". 'C:\Agent\_work\_temp\e3c815fa-b9a4-46b8-aca4-39a4dd762cce.ps1'"
2024-04-29T07:43:38.9081565Z ### Artifact country gb ###
2024-04-29T07:43:38.9091965Z ### Artifact version  ###
2024-04-29T07:43:38.9098567Z ### Artifact type sandbox ###
2024-04-29T07:43:38.9104705Z ### Artifact select SecondToLastMajor ###
2024-04-29T07:43:38.9190216Z ### Using Docker image navimage:secondtolastmajor-gb.1 ###
2024-04-29T07:43:39.1566721Z BcContainerHelper version 6.0.16
2024-04-29T07:43:39.4747785Z Setting MicrosoftTelemetryConnectionString = 
2024-04-29T07:43:40.1657750Z Running on Windows, PowerShell 5.1.22621.2506
2024-04-29T07:43:56.0984689Z >>> Locking image build  + Global\RunningBCImage
2024-04-29T07:43:56.1177636Z Search for 'SecondToLastMajor', Image date: 04/27/2024 00:00:00
2024-04-29T07:44:35.1584484Z ### Using Artifact  https://bcartifacts-exdbf9fwegejdqak.b02.azurefd.net/sandbox/23.5.16502.18950/gb  ###
2024-04-29T07:44:35.4946946Z Untagged: navimagev:24.0.16410.18949-gb
2024-04-29T07:44:35.4979010Z Untagged: navimagev:25.0.18915.0-gb
2024-04-29T07:44:35.5019895Z ### Running New-Bcimage ###
2024-04-29T07:44:35.7558987Z ### Using base image  mcr.microsoft.com/businesscentral:ltsc2022  ###
2024-04-29T07:44:36.4052302Z navimage:secondtolastmajor-gb.1
2024-04-29T07:44:36.4143961Z Fetching all docker images
2024-04-29T07:44:36.4614829Z Building image navimage:secondtolastmajor-gb.1 based on mcr.microsoft.com/businesscentral:ltsc2022 with https://bcartifacts-exdbf9fwegejdqak.b02.azurefd.net/sandbox/23.5.16502.18950/gb
2024-04-29T07:44:36.4624038Z Pulling latest image mcr.microsoft.com/businesscentral:ltsc2022
2024-04-29T07:44:36.8197072Z ltsc2022: Pulling from businesscentral
2024-04-29T07:44:36.8215912Z Digest: sha256:af300ae9ffe5a91d4b185713c2e75542c65fb8e07e1d46edc41d1e3569ebb6fd
2024-04-29T07:44:36.9128562Z Generic Tag: 1.0.2.20
2024-04-29T07:44:36.9548672Z Container OS Version: 10.0.20348.2402 (ltsc2022)
2024-04-29T07:44:36.9555733Z Host OS Version: 10.0.22631.3296 (23H2)
2024-04-29T07:44:36.9626943Z WARNING: Container and host OS build is 20348 or above, defaulting to process isolation. If you encounter issues, you could try to install HyperV.
2024-04-29T07:44:36.9636083Z Using process isolation
2024-04-29T07:44:36.9739730Z Files in c:\bcartifacts.cache\u4jgxon2.tq0\my:
2024-04-29T07:44:36.9790989Z Copying Platform Artifacts
2024-04-29T07:44:36.9840696Z c:\bcartifacts.cache\sandbox\23.5.16502.18950\platform
2024-04-29T07:44:40.4661348Z Copying Database
2024-04-29T07:44:41.0145486Z Copying Licensefile
2024-04-29T07:44:41.0262211Z Copying ConfigurationPackages
2024-04-29T07:44:41.0271295Z C:\bcartifacts.cache\sandbox\23.5.16502.18950\gb\ConfigurationPackages
2024-04-29T07:44:41.0678034Z Copying Extensions
2024-04-29T07:44:41.0686209Z C:\bcartifacts.cache\sandbox\23.5.16502.18950\gb\Extensions
2024-04-29T07:44:41.2989146Z Copying Applications.GB
2024-04-29T07:44:41.2998164Z C:\bcartifacts.cache\sandbox\23.5.16502.18950\gb\Applications.GB
2024-04-29T07:44:41.4967637Z c:\bcartifacts.cache\u4jgxon2.tq0
2024-04-29T07:44:55.5394348Z Sending build context to Docker daemon  2.562GB
2024-04-29T07:44:55.5399804Z 
2024-04-29T07:44:55.6068601Z Step 1/6 : FROM mcr.microsoft.com/businesscentral:ltsc2022
2024-04-29T07:44:55.6079498Z  ---> ecde5c41c6e6
2024-04-29T07:44:55.6090350Z Step 2/6 : ENV DatabaseServer=localhost DatabaseInstance=SQLEXPRESS DatabaseName=CRONUS IsBcSandbox=Y artifactUrl=https://bcartifacts-exdbf9fwegejdqak.b02.azurefd.net/sandbox/23.5.16502.18950/gb filesOnly=False
2024-04-29T07:44:55.8545362Z  ---> Running in cf5a8eb2b3cb
2024-04-29T07:44:56.1908312Z Removing intermediate container cf5a8eb2b3cb
2024-04-29T07:44:56.1916743Z  ---> aa93b8d70d4f
2024-04-29T07:44:56.1924792Z Step 3/6 : COPY my /run/
2024-04-29T07:44:56.6453247Z  ---> 512031513ed8
2024-04-29T07:44:56.6480548Z Step 4/6 : COPY NAVDVD /NAVDVD/
2024-04-29T07:45:35.3961179Z  ---> 3f0865bf612c
2024-04-29T07:45:35.3979248Z Step 5/6 : RUN \Run\start.ps1 -installOnly -multitenant -includeTestToolkit -includeTestLibrariesOnly
2024-04-29T07:45:35.5274034Z  ---> Running in 7784fcf44cd4
2024-04-29T07:45:40.1097989Z c:\run\my folder doesn't exist, creating it
2024-04-29T07:45:40.3483692Z Using DVD installer from C:\Run\210-new
2024-04-29T07:45:40.4428869Z Installing Business Central: multitenant=True, installOnly=True, filesOnly=False, includeTestToolkit=True, includeTestLibrariesOnly=True, includeTestFrameworkOnly=False, includePerformanceToolkit=False, appArtifactPath=, platformArtifactPath=, databasePath=, licenseFilePath=, rebootContainer=False
2024-04-29T07:45:40.4674516Z Installing from DVD
2024-04-29T07:45:40.4783453Z Starting Local SQL Server
2024-04-29T07:45:42.3115743Z Starting Internet Information Server
2024-04-29T07:45:42.6402929Z Copying Service Tier Files
2024-04-29T07:45:42.6553104Z C:\NAVDVD\ServiceTier\Program Files
2024-04-29T07:45:43.7259025Z C:\NAVDVD\ServiceTier\System64Folder
2024-04-29T07:45:43.7546736Z Copying PowerShell Scripts
2024-04-29T07:45:43.7567642Z C:\NAVDVD\WindowsPowerShellScripts\Cloud\NAVAdministration
2024-04-29T07:45:43.7930358Z C:\NAVDVD\WindowsPowerShellScripts\WebSearch
2024-04-29T07:45:43.8128088Z Copying Web Client Files
2024-04-29T07:45:43.8144186Z C:\NAVDVD\WebClient\Microsoft Dynamics NAV
2024-04-29T07:45:45.9592176Z Copying ModernDev Files
2024-04-29T07:45:45.9605527Z C:\NAVDVD
2024-04-29T07:45:45.9818471Z C:\NAVDVD\ModernDev\program files\Microsoft Dynamics NAV
2024-04-29T07:45:46.2975705Z Copying additional files
2024-04-29T07:45:46.3078596Z Copying ConfigurationPackages
2024-04-29T07:45:46.3091074Z C:\NAVDVD\ConfigurationPackages
2024-04-29T07:45:46.3402877Z Copying Test Assemblies
2024-04-29T07:45:46.3426575Z C:\NAVDVD\Test Assemblies
2024-04-29T07:45:46.3895686Z Copying Extensions
2024-04-29T07:45:46.3941922Z C:\NAVDVD\Extensions
2024-04-29T07:45:46.5844977Z Copying Applications
2024-04-29T07:45:46.5857408Z C:\NAVDVD\Applications
2024-04-29T07:45:47.6866805Z Copying Applications.GB
2024-04-29T07:45:47.6880892Z C:\NAVDVD\Applications.GB
2024-04-29T07:45:47.8013012Z Copying dependencies
2024-04-29T07:45:47.8104180Z Copying ReportBuilder
2024-04-29T07:45:57.4429010Z Importing PowerShell Modules
2024-04-29T07:45:59.8249102Z Restoring CRONUS Demo Database
2024-04-29T07:46:01.6647799Z Setting CompatibilityLevel for tenant on localhost\SQLEXPRESS
2024-04-29T07:46:02.5101306Z Exporting Application to CRONUS
2024-04-29T07:46:26.2600285Z Removing Application from tenant
2024-04-29T07:46:31.9830409Z Modifying Business Central Service Tier Config File for Docker
2024-04-29T07:46:32.0413388Z Creating Business Central Service Tier
2024-04-29T07:46:32.1299200Z Installing SIP crypto provider: 'C:\Windows\System32\NavSip.dll'
2024-04-29T07:46:32.5243992Z Starting Business Central Service Tier
2024-04-29T07:46:37.8553371Z Importing CRONUS license file
2024-04-29T07:46:39.3026399Z Copying Database on localhost\SQLEXPRESS from tenant to default
2024-04-29T07:46:39.3072056Z Taking database tenant offline
2024-04-29T07:46:39.3975016Z Copying database files
2024-04-29T07:46:39.9584060Z Attaching files as new Database default
2024-04-29T07:46:40.7255300Z Putting database tenant back online
2024-04-29T07:46:40.8866064Z Mounting tenant database
2024-04-29T07:46:40.9161442Z Mounting Database for default on server localhost\SQLEXPRESS with AllowAppDatabaseWrite = False
2024-04-29T07:47:57.7158346Z Sync'ing Tenant
2024-04-29T07:47:59.4326769Z Tenant is Operational
2024-04-29T07:48:00.0484194Z Permissions Mock is already published
2024-04-29T07:48:00.0503118Z Synchronizing Permissions Mock
2024-04-29T07:48:00.3930396Z Installing Permissions Mock
2024-04-29T07:48:05.5877342Z Test Runner is already published
2024-04-29T07:48:05.5885656Z Synchronizing Test Runner
2024-04-29T07:48:05.8023811Z Installing Test Runner
2024-04-29T07:48:06.1019499Z Any is already published
2024-04-29T07:48:06.1028701Z Synchronizing Any
2024-04-29T07:48:06.1717530Z Installing Any
2024-04-29T07:48:06.3542387Z Library Assert is already published
2024-04-29T07:48:06.3558501Z Synchronizing Library Assert
2024-04-29T07:48:06.4306245Z Installing Library Assert
2024-04-29T07:48:06.6006400Z Skipping Permissions Mock as it is already installed
2024-04-29T07:48:06.6620551Z Library Variable Storage is already published
2024-04-29T07:48:06.6649451Z Synchronizing Library Variable Storage
2024-04-29T07:48:06.7511285Z Installing Library Variable Storage
2024-04-29T07:48:06.9229250Z Publishing C:\Applications.GB\Microsoft_System Application Test Library_23.5.16502.18950.app
2024-04-29T07:48:11.2661567Z Synchronizing System Application Test Library
2024-04-29T07:48:11.8574446Z Installing System Application Test Library
2024-04-29T07:48:13.6507716Z Publishing C:\Applications.GB\Microsoft_Tests-TestLibraries_23.5.16502.18950.app
2024-04-29T07:48:21.1115898Z Synchronizing Tests-TestLibraries
2024-04-29T07:48:21.8291237Z Installing Tests-TestLibraries
2024-04-29T07:48:24.3351313Z Stopping Business Central Service Tier
2024-04-29T07:48:24.6031464Z Installation took 164 seconds
2024-04-29T07:48:24.6047535Z Installation complete
2024-04-29T07:49:40.5997752Z Removing intermediate container 7784fcf44cd4
2024-04-29T07:49:40.6006140Z  ---> 92d0b44f52a6
2024-04-29T07:49:40.6012450Z Step 6/6 : LABEL legal="http://go.microsoft.com/fwlink/?LinkId=837447"       created="202404290744"       nav=""       cu=""       multitenant="Y"       country="GB"       version="23.5.16502.18950"       platform="23.0.18933.0"
2024-04-29T07:49:40.6966199Z  ---> Running in d4e51c740a4c
2024-04-29T07:49:40.9527653Z Removing intermediate container d4e51c740a4c
2024-04-29T07:49:40.9537911Z  ---> 7ad53dcabbe5
2024-04-29T07:49:42.3931351Z Successfully built 7ad53dcabbe5
2024-04-29T07:49:42.3980472Z Successfully tagged navimage:secondtolastmajor-gb.1
2024-04-29T07:49:42.4084326Z Building image took 306 seconds
2024-04-29T07:49:46.3678949Z >>> Unlocking image build
2024-04-29T07:49:46.3685077Z ### Exit Create-Image.ps1
2024-04-29T07:49:46.4398367Z ##[section]Finishing: Create Build Image
2024-04-29T07:49:46.4420782Z ##[section]Starting: Start Build Container
2024-04-29T07:49:46.4562899Z ==============================================================================
2024-04-29T07:49:46.4563108Z Task         : PowerShell
2024-04-29T07:49:46.4563193Z Description  : Run a PowerShell script on Linux, macOS, or Windows
2024-04-29T07:49:46.4563393Z Version      : 2.237.5
2024-04-29T07:49:46.4563480Z Author       : Microsoft Corporation
2024-04-29T07:49:46.4563586Z Help         : https://docs.microsoft.com/azure/devops/pipelines/tasks/utility/powershell
2024-04-29T07:49:46.4563853Z ==============================================================================
2024-04-29T07:49:47.7382412Z Generating script.
2024-04-29T07:49:47.7719369Z Formatted command: . 'C:\Agent\_work\1\s\BuildTools\Scripts\Start-Container.ps1'
2024-04-29T07:49:47.7935704Z ========================== Starting Command Output ===========================
2024-04-29T07:49:47.8150866Z ##[command]"C:\WINDOWS\System32\WindowsPowerShell\v1.0\powershell.exe" -NoLogo -NoProfile -NonInteractive -ExecutionPolicy Unrestricted -Command ". 'C:\Agent\_work\_temp\33fff06d-ed94-438f-914c-833f0f19b834.ps1'"
2024-04-29T07:49:48.0775107Z ### Fetching artifact name for Container Build-S3B28502A160 ###
2024-04-29T07:49:48.0782466Z ### Artifact country gb ###
2024-04-29T07:49:48.0790881Z ### Artifact type sandbox ###
2024-04-29T07:49:48.0797454Z ### Artifact select SecondToLastMajor ###
2024-04-29T07:49:48.0875323Z ### Using Docker image navimage:secondtolastmajor-gb.1 ###
2024-04-29T07:49:48.0931233Z >>> Locking container build  + Global\RunningBCContainersecondtolastmajor
2024-04-29T07:49:48.7230372Z ### Running New-BCContainer
2024-04-29T07:49:49.2089654Z BcContainerHelper version 6.0.16
2024-04-29T07:49:49.7971752Z Setting MicrosoftTelemetryConnectionString = 
2024-04-29T07:49:50.4828988Z Running on Windows, PowerShell 5.1.22621.2506
2024-04-29T07:50:09.1918616Z WARNING: Container name should not exceed 15 characters
2024-04-29T07:50:09.7976759Z BcContainerHelper is version 6.0.16
2024-04-29T07:50:09.7984805Z BcContainerHelper is running as administrator
2024-04-29T07:50:09.9829194Z HyperV is Enabled
2024-04-29T07:50:09.9865462Z UsePsSession is True
2024-04-29T07:50:09.9894319Z UsePwshForBc24 is True
2024-04-29T07:50:09.9920086Z Host is Microsoft Windows 11 Enterprise - 10.0.22631.3296
2024-04-29T07:50:10.0493147Z Docker Client Version is 24.0.7
2024-04-29T07:50:10.0507089Z Docker Server Version is 24.0.7
2024-04-29T07:50:10.3152511Z Removing Desktop shortcuts
2024-04-29T07:50:10.3774692Z Fetching all docker images
2024-04-29T07:50:10.4331538Z Fetching all docker volumes
2024-04-29T07:50:10.4784139Z Using image navimage:secondtolastmajor-gb.1
2024-04-29T07:50:10.5442958Z Disabling Health Check (always report healthy)
2024-04-29T07:50:10.5779978Z Creating Container Build-S3B28502A160
2024-04-29T07:50:10.5881750Z Style: sandbox
2024-04-29T07:50:10.5895505Z Multitenant: No
2024-04-29T07:50:10.5925655Z Version: 23.5.16502.18950
2024-04-29T07:50:10.5999824Z Platform: 23.0.18933.0
2024-04-29T07:50:10.6035583Z Generic Tag: 1.0.2.20
2024-04-29T07:50:10.6074429Z Container OS Version: 10.0.20348.2402 (ltsc2022)
2024-04-29T07:50:10.6087012Z Host OS Version: 10.0.22631.3296 (23H2)
2024-04-29T07:50:10.6235457Z WARNING: Container and host OS build is 20348 or above, defaulting to process isolation. If you encounter issues, you could try to install HyperV.
2024-04-29T07:50:10.6247631Z Using process isolation
2024-04-29T07:50:10.6324943Z Using locale en-GB
2024-04-29T07:50:10.6381551Z Disabling the standard eventlog dump to container log every 2 seconds (use -dumpEventLog to enable)
2024-04-29T07:50:10.7256878Z Additional Parameters:
2024-04-29T07:50:10.7271162Z --volume "C:\Agent:C:\agents"
2024-04-29T07:50:10.7279346Z --expose 5986
2024-04-29T07:50:10.7287566Z --env customNavSettings=EnableTaskScheduler=False
2024-04-29T07:50:10.7297346Z Files in C:\ProgramData\BcContainerHelper\Extensions\Build-S3B28502A160\my:
2024-04-29T07:50:10.7345283Z - AdditionalOutput.ps1
2024-04-29T07:50:10.7351893Z - AdditionalSetup.ps1
2024-04-29T07:50:10.7358465Z - HelperFunctions.ps1
2024-04-29T07:50:10.7364997Z - MainLoop.ps1
2024-04-29T07:50:10.7372741Z - SetupVariables.ps1
2024-04-29T07:50:10.7378674Z - updatecontainerhosts.ps1
2024-04-29T07:50:10.7384457Z Creating container Build-S3B28502A160 from image navimage:secondtolastmajor-gb.1
2024-04-29T07:50:10.9165734Z d6b82b19d05ae2e9fcd6ff5832a8c45304b7a09ea481b10f14a0cb0cb6d2c680
2024-04-29T07:50:12.1726796Z Waiting for container Build-S3B28502A160 to be ready
2024-04-29T07:50:14.2703182Z Adding BUILD-S3B28502A to hosts file
2024-04-29T07:50:14.2703475Z Initializing...
2024-04-29T07:50:15.3214444Z Setting host.containerhelper.internal to 172.27.64.1 in container hosts file
2024-04-29T07:50:15.3214795Z Starting Container
2024-04-29T07:50:15.3215138Z Hostname is Build-S3B28502A160
2024-04-29T07:50:15.3215326Z PublicDnsName is Build-S3B28502A160
2024-04-29T07:50:15.3215500Z Using NavUserPassword Authentication
2024-04-29T07:50:17.4453464Z Starting Local SQL Server
2024-04-29T07:50:18.4944122Z Starting Internet Information Server
2024-04-29T07:50:18.4944553Z Creating Self Signed Certificate
2024-04-29T07:50:18.4944964Z Self Signed Certificate Thumbprint 34667D67CE7450AB273C99FBEF3AADFF91043D8C
2024-04-29T07:50:18.4945722Z DNS identity Build-S3B28502A160
2024-04-29T07:50:18.4946100Z Modifying Service Tier Config File with Instance Specific Settings
2024-04-29T07:50:18.4946637Z Modifying Service Tier Config File with settings from environment variable
2024-04-29T07:50:19.5411776Z Setting EnableTaskScheduler to False
2024-04-29T07:50:28.0063659Z Starting Service Tier
2024-04-29T07:50:28.0064321Z Registering event sources
2024-04-29T07:50:28.0064585Z Creating DotNetCore Web Server Instance
2024-04-29T07:50:28.0065602Z Using application pool name: BC
2024-04-29T07:50:28.0067975Z Using default container name: NavWebApplicationContainer
2024-04-29T07:50:30.1038685Z Copy files to WWW root C:\inetpub\wwwroot\BC
2024-04-29T07:50:30.1038971Z Create the application pool BC
2024-04-29T07:50:32.2011266Z Create website: NavWebApplicationContainer without SSL
2024-04-29T07:50:32.2011599Z Update configuration: navsettings.json
2024-04-29T07:50:32.2011757Z Done Configuring Web Client
2024-04-29T07:50:32.2011883Z Enabling Financials User Experience
2024-04-29T07:50:34.3179277Z Dismounting Tenant
2024-04-29T07:50:34.3180374Z Mounting Tenant
2024-04-29T07:50:43.7935827Z Mounting Database for default on server localhost\SQLEXPRESS with AllowAppDatabaseWrite = False
2024-04-29T07:50:45.8858210Z Sync'ing Tenant
2024-04-29T07:50:45.8858497Z Tenant is Operational
2024-04-29T07:50:45.8858669Z Creating http download site
2024-04-29T07:50:45.8858826Z Setting SA Password and enabling SA
2024-04-29T07:50:46.9344606Z Creating TVision as SQL User and add to sysadmin
2024-04-29T07:50:47.9809217Z Creating SUPER user
2024-04-29T07:51:12.3198171Z Enable PSRemoting and setup user for winrm
2024-04-29T07:51:13.3865891Z Creating self-signed certificate for winrm
2024-04-29T07:51:13.3866470Z Container IP Address: 172.27.76.1
2024-04-29T07:51:13.3866915Z Container Hostname  : Build-S3B28502A160
2024-04-29T07:51:13.3867387Z Container Dns Name  : Build-S3B28502A160
2024-04-29T07:51:13.3868005Z Web Client          : http://Build-S3B28502A160/BC/?tenant=default
2024-04-29T07:51:13.3868761Z Dev. Server         : http://Build-S3B28502A160
2024-04-29T07:51:13.3869179Z Dev. ServerInstance : BC
2024-04-29T07:51:13.3869475Z Dev. Server Tenant  : default
2024-04-29T07:51:14.4404159Z Setting Build-S3B28502A160-default to 127.0.0.1 in container hosts file
2024-04-29T07:51:14.4404488Z 
2024-04-29T07:51:14.4404623Z Files:
2024-04-29T07:51:14.4405626Z http://Build-S3B28502A160:8080/ALLanguage.vsix
2024-04-29T07:51:14.4405828Z 
2024-04-29T07:51:14.4405985Z Container Total Physical Memory is 15.8Gb
2024-04-29T07:51:14.4406244Z Container Free Physical Memory is 8.4Gb
2024-04-29T07:51:14.4406417Z 
2024-04-29T07:51:14.4407329Z Initialization took 60 seconds
2024-04-29T07:51:14.4410728Z Ready for connections!
2024-04-29T07:51:16.0898013Z Reading CustomSettings.config from Build-S3B28502A160
2024-04-29T07:51:16.5110532Z Cleanup old dotnet core assemblies
2024-04-29T07:51:16.5136508Z Container Build-S3B28502A160 successfully created
2024-04-29T07:51:16.5138521Z 
2024-04-29T07:51:16.5144783Z Use:
2024-04-29T07:51:16.5152565Z Get-BcContainerEventLog -containerName Build-S3B28502A160 to retrieve a snapshot of the event log from the container
2024-04-29T07:51:16.5159574Z Get-BcContainerDebugInfo -containerName Build-S3B28502A160 to get debug information about the container
2024-04-29T07:51:16.5166560Z Enter-BcContainer -containerName Build-S3B28502A160 to open a PowerShell prompt inside the container
2024-04-29T07:51:16.5173161Z Remove-BcContainer -containerName Build-S3B28502A160 to remove the container again
2024-04-29T07:51:16.5180258Z docker logs Build-S3B28502A160 to retrieve information about URL's again
2024-04-29T07:51:16.9993355Z There are 100 apps
2024-04-29T07:51:17.0181083Z 
2024-04-29T07:51:17.0446331Z Name                                                IsInstalled IsPublished SyncState Scope  Version         
...
2024-04-29T07:51:17.0701029Z >>> Unlocking container build
2024-04-29T07:51:17.0721406Z ### Exit Create-Container.ps1
2024-04-29T07:51:17.1512032Z ##[section]Finishing: Start Build Container
2024-04-29T07:51:17.1555392Z ##[section]Starting: Compile Apps
2024-04-29T07:51:17.1728012Z ==============================================================================
2024-04-29T07:51:17.1728186Z Task         : PowerShell
2024-04-29T07:51:17.1728247Z Description  : Run a PowerShell script on Linux, macOS, or Windows
2024-04-29T07:51:17.1728412Z Version      : 2.237.5
2024-04-29T07:51:17.1728476Z Author       : Microsoft Corporation
2024-04-29T07:51:17.1728564Z Help         : https://docs.microsoft.com/azure/devops/pipelines/tasks/utility/powershell
2024-04-29T07:51:17.1728785Z ==============================================================================
2024-04-29T07:51:18.4776477Z Generating script.
2024-04-29T07:51:18.5192610Z Formatted command: . 'C:\Agent\_work\1\s\BuildTools\Scripts\Compile-App.ps1' -FailOn none -buildProjectFolder C:\Agent\_work\1/s
2024-04-29T07:51:18.5416206Z ========================== Starting Command Output ===========================
2024-04-29T07:51:18.5581122Z ##[command]"C:\WINDOWS\System32\WindowsPowerShell\v1.0\powershell.exe" -NoLogo -NoProfile -NonInteractive -ExecutionPolicy Unrestricted -Command ". 'C:\Agent\_work\_temp\51dcd76a-3b51-4e9a-9b37-25b31e98331a.ps1'"
2024-04-29T07:51:18.8524883Z appFolders: Self
2024-04-29T07:51:18.8545570Z buildProjectFolder: C:\Agent\_work\1/s
2024-04-29T07:51:18.8554852Z buildSymbolsFolder: C:\Agent\_work\1\s\.alPackages
2024-04-29T07:51:18.8561965Z buildArtifactFolder: C:\Agent\_work\1\a
2024-04-29T07:51:18.8579846Z Fail On: none
2024-04-29T07:51:18.8596640Z Custom Code Cops: 
2024-04-29T07:51:19.0486198Z BcContainerHelper version 6.0.16
2024-04-29T07:51:19.4001309Z Setting MicrosoftTelemetryConnectionString = 
2024-04-29T07:51:20.1610982Z Running on Windows, PowerShell 5.1.22621.2506
2024-04-29T07:51:39.1919763Z Sort AppFolders By Dependencies
2024-04-29T07:51:39.3217139Z appProjectFolder: C:\Agent\_work\1\s\Self
2024-04-29T07:51:39.3328347Z Checking for precompiled 'C:\Agent\_work\1\s\Self\Extension Name.app'
2024-04-29T07:51:39.3339752Z Compiling Self
2024-04-29T07:51:39.4523967Z ### Using version 1.0.0.8502 in C:\Agent\_work\1\s\Self\app.json ###
2024-04-29T07:51:41.1000658Z Copying DLLs from C:\Program Files\Microsoft Dynamics NAV\230\Service to assemblyProbingPath
2024-04-29T07:51:42.0286329Z Removing dotnet Framework Assemblies
2024-04-29T07:51:42.1891903Z Using Symbols Folder: C:\Agent\_work\1\s\.alPackages
2024-04-29T07:51:42.4021739Z The 'Expand-Archive' command was found in the module 'Microsoft.PowerShell.Archive', but the module could not be loaded. For more information, run 'Import-Module Microsoft.PowerShell.Archive'.
2024-04-29T07:51:42.4024815Z 
2024-04-29T07:51:42.4030789Z Exception Script Stack Trace:
2024-04-29T07:51:42.4062744Z at <ScriptBlock>, <No file>: line 5
2024-04-29T07:51:42.4069308Z 
2024-04-29T07:51:42.4081374Z PowerShell Call Stack:
2024-04-29T07:51:42.4110356Z at Invoke-ScriptInBcContainer, C:\Program Files\WindowsPowerShell\Modules\BcContainerHelper\6.0.16\ContainerHandling\Invoke-ScriptInNavContainer.ps1: line 71
2024-04-29T07:51:42.4120431Z at Compile-AppInBcContainer, C:\Program Files\WindowsPowerShell\Modules\BcContainerHelper\6.0.16\AppHandling\Compile-AppInNavContainer.ps1: line 311
2024-04-29T07:51:42.4129738Z at <ScriptBlock>, C:\Agent\_work\1\s\BuildTools\Scripts\Compile-App.ps1: line 139
2024-04-29T07:51:42.4139813Z at <ScriptBlock>, C:\Program Files\WindowsPowerShell\Modules\BcContainerHelper\6.0.16\AppHandling\Sort-AppFoldersByDependencies.ps1: line 129
2024-04-29T07:51:42.4149830Z at Sort-AppFoldersByDependencies, C:\Program Files\WindowsPowerShell\Modules\BcContainerHelper\6.0.16\AppHandling\Sort-AppFoldersByDependencies.ps1: line 128
2024-04-29T07:51:42.4158619Z at <ScriptBlock>, C:\Agent\_work\1\s\BuildTools\Scripts\Compile-App.ps1: line 96
2024-04-29T07:51:42.4167019Z at <ScriptBlock>, C:\Agent\_work\_temp\51dcd76a-3b51-4e9a-9b37-25b31e98331a.ps1: line 4
2024-04-29T07:51:42.4175035Z at <ScriptBlock>, <No file>: line 1
2024-04-29T07:51:43.0558390Z 
2024-04-29T07:51:43.0561725Z Container Free Physical Memory: 8.0Gb
2024-04-29T07:51:43.0562078Z 
2024-04-29T07:51:43.0562733Z Services in container Build-S3B28502A160:
2024-04-29T07:51:43.0565657Z - MicrosoftDynamicsNavServer$BC is Running
2024-04-29T07:51:43.0569147Z - MSSQL$SQLEXPRESS is Running
2024-04-29T07:51:43.0569365Z 
2024-04-29T07:51:43.6824870Z The 'Expand-Archive' command was found in the module 'Microsoft.PowerShell.Archive', but the module could not be 
2024-04-29T07:51:43.6825675Z loaded. For more information, run 'Import-Module Microsoft.PowerShell.Archive'.
2024-04-29T07:51:43.6826167Z At C:\Program 
2024-04-29T07:51:43.6826908Z Files\WindowsPowerShell\Modules\BcContainerHelper\6.0.16\ContainerHandling\Invoke-ScriptInNavContainer.ps1:112 char:13
2024-04-29T07:51:43.6869005Z +             throw $errorMessage
2024-04-29T07:51:43.6869329Z +             ~~~~~~~~~~~~~~~~~~~
2024-04-29T07:51:43.6870121Z     + CategoryInfo          : OperationStopped: (The 'Expand-Arc...Shell.Archive'.:String) [], RuntimeException
2024-04-29T07:51:43.6870858Z     + FullyQualifiedErrorId : The 'Expand-Archive' command was found in the module 'Microsoft.PowerShell.Archive', but 
2024-04-29T07:51:43.6921111Z     the module could not be loaded. For more information, run 'Import-Module Microsoft.PowerShell.Archive'.
2024-04-29T07:51:43.6921770Z  
2024-04-29T07:51:43.7848722Z ##[error]PowerShell exited with code '1'.
2024-04-29T07:51:43.8381992Z ##[section]Async Command Start: Update Build Number
2024-04-29T07:51:43.8382425Z Update build number to 1.0.0.8502 for build 28502
2024-04-29T07:51:43.8382586Z ##[section]Async Command End: Update Build Number
2024-04-29T07:51:43.8383047Z ##[section]Finishing: Compile Apps

Screenshots
If applicable, add screenshots to help explain your problem.

Additional context

  • does it happen all the time? For 6.0.16
  • did it use to work? Yes for 6.0.15

BTW: There was an error creating your Issue: body is too long (maximum is 65536 characters).

@freddydk
Copy link
Contributor

freddydk commented Apr 29, 2024

The module is there - but for some reason, your session is looking for the en-GB version:
image

The module is there in en-US.

What does this return in your container:
image

Both in BC23 and BC24?

and what does this return:
image

both in BC23 and BC24?

@freddydk
Copy link
Contributor

I have earlier seen people having issues with culture - let's see if we can fix this now

@freddydk
Copy link
Contributor

if you add -locale 'en-US' when starting the container - does it work then?

@freddydk
Copy link
Contributor

similar issue #3330

@ngiessel
Copy link

ngiessel commented Apr 29, 2024

Similar problem here, it is expecting a de-DE folder in the Powershell Module.
Not sure I can confirm the observations mentioned, it seems to work fine on Windows 11 with BcContainerHelper 6.0.16. On our agents (Server 2022), however, it has been throwing that error during compilation recently.

Edit: Can confirm it works on 6.0.15

@freddydk
Copy link
Contributor

I think I have found the root cause.

It seems like this fix (PowerShell/Microsoft.PowerShell.Archive#46) never made it into the Windows Containers - even though it is 7 years old...

Now, the reason why 6.0.15 (and earlier versions) have worked is that they don't use a configurationName when creating a PowerShell session to the container. That however means that it cannot create a PS7 session - only a PS5 session. Now, I am using a configurationName, which causes the UI culture to be different. Looking at #3330 - this also could happen before.

The fix could be to patch the powershell archive module during startup.
Please try this. Grab these 3 lines:

# Patch Microsoft.PowerShell.Archive to use en-US UI Culture (see https://github.com/PowerShell/Microsoft.PowerShell.Archive/pull/46)
$psarchiveModule = 'C:\Windows\System32\WindowsPowerShell\v1.0\Modules\Microsoft.PowerShell.Archive\Microsoft.PowerShell.Archive.psm1'
Set-Content -path $psarchiveModule -value (Get-Content -encoding utf8 -raw -path $psarchiveModule).Replace("`r`nImport-LocalizedData  LocalizedData -filename ArchiveResources`r`n","`r`nImport-LocalizedData LocalizedData -filename ArchiveResources -UICulture 'en-US'`r`n")

and place them in a local file called AdditionalSetup.ps1
Then add this file to your New-BcContainer in -myscripts @('full path of file')

If you can confirm this works, then I will check this in

@rdebath
Copy link
Author

rdebath commented Apr 29, 2024

Adding the -locale en-US argument does not allow the program to run.

Removing dotnet Framework Assemblies
Using Symbols Folder: C:\Agent\_work\1\s\.alPackages

LCID             Name             DisplayName                                                                          
----             ----             -----------                                                                          
2057             en-GB            English (United Kingdom)                                                             



LCID             Name             DisplayName                                                                          
----             ----             -----------                                                                          
1033             en-US            English (United States)                                                              


The 'Expand-Archive' command was found in the module 'Microsoft.PowerShell.Archive', but the module could not be loaded. For more information, run 'Import-Module Microsoft.PowerShell.Archive'.

Exception Script Stack Trace:

The get-culture changes from en-GB to en-US. The get-uiculture stays as en-GB.

The -locale en-US changes the get-culture but not the get-uiculture
Without the argument locales in Invoke-scriptInBcContainer are all en-GB.
This ALSO applies to V24.

The session data differs for V23 and V24, V24 uses powershell7 and V23 uses default powershell.
For V23 the session data is ...


Session data ...


State                  : Opened
IdleTimeout            : -1
OutputBufferingMode    : 
DisconnectedOn         : 
ExpiresOn              : 
ComputerType           : Container
ComputerName           : 2ce21018dcc7c559b980da33fe03fa14bec50389520c4b25ab405d0abc812539
ContainerId            : 2ce21018dcc7c559b980da33fe03fa14bec50389520c4b25ab405d0abc812539
VMName                 : 
VMId                   : 
ConfigurationName      : Microsoft.PowerShell
InstanceId             : a3e3c0bb-3feb-4fd3-a7a3-53a5fb9caef5
Id                     : 1
Name                   : WinRM1
Availability           : Available
ApplicationPrivateData : {DebugMode, DebugStop, UnhandledBreakpointMode, PSVersionTable...}
Runspace               : System.Management.Automation.RemoteRunspace

For V24

Session data ...


State                  : Opened
IdleTimeout            : -1
OutputBufferingMode    : 
DisconnectedOn         : 
ExpiresOn              : 
ComputerType           : Container
ComputerName           : 45122b0a79705c2fbf4c4c229615f74c968ede2b31939f1bdfa4dd50a10ec342
ContainerId            : 45122b0a79705c2fbf4c4c229615f74c968ede2b31939f1bdfa4dd50a10ec342
VMName                 : 
VMId                   : 
ConfigurationName      : PowerShell.7
InstanceId             : 6ce6df48-ed20-40ea-a21a-b67bc2994cd8
Id                     : 1
Name                   : WinRM1
Availability           : Available
ApplicationPrivateData : {DebugMode, DebugStop, UnhandledBreakpointMode, PSVersionTable...}
Runspace               : System.Management.Automation.RemoteRunspace

WinRM has been turned on on that machine. So I turned it off and ignored the error.

Session V23 with WinRM turned off. (Turning WinRM off did not fix it.)

Session data ...


State                  : Opened
IdleTimeout            : -1
OutputBufferingMode    : 
DisconnectedOn         : 
ExpiresOn              : 
ComputerType           : Container
ComputerName           : 90aba899952e1773d7ee0adce679cf5b69e99646d4880b16b5c2ee85a9632787
ContainerId            : 90aba899952e1773d7ee0adce679cf5b69e99646d4880b16b5c2ee85a9632787
VMName                 : 
VMId                   : 
ConfigurationName      : Microsoft.PowerShell
InstanceId             : f54f2209-a6e5-4ec6-8f7f-b9285fa93505
Id                     : 1
Name                   : WinRM1
Availability           : Available
ApplicationPrivateData : {DebugMode, DebugStop, UnhandledBreakpointMode, PSVersionTable...}
Runspace               : System.Management.Automation.RemoteRunspace

All four combinations (23,24 and powershell, pwsh) return en-US when running a powershell with the bc-image just using docker.

PS C:\> get-uiculture ; get-culture

LCID             Name             DisplayName
----             ----             -----------
1033             en-US            English (United States)
1033             en-US            English (United States)

Host returns

PS C:\> get-uiculture ; get-culture

LCID             Name             DisplayName
----             ----             -----------
2057             en-GB            English (United Kingdom)
2057             en-GB            English (United Kingdom)

@rdebath
Copy link
Author

rdebath commented Apr 29, 2024

Grrrr.

Creating TVision as SQL User and add to sysadmin
Creating SUPER user
Access to the path 'C:\Windows\System32\WindowsPowerShell\v1.0\Modules\Microsoft.PowerShell.Archive\Microsoft.PowerShell.Archive.psm1' is denied.
at <ScriptBlock>, C:\Run\my\AdditionalSetup.ps1: line 3
at <ScriptBlock>, C:\Run\navstart.ps1: line 243
at <ScriptBlock>, C:\Run\start.ps1: line 390
at <ScriptBlock>, <No file>: line 1
Initialization of container Build-S3B28523A160 failed
At C:\Program Files\WindowsPowerShell\Modules\BcContainerHelper\6.0.16\ContainerHandling\Wait-NavContainerReady.ps1:42 
char:17
+ ...             throw "Initialization of container $containerName failed" ...
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : OperationStopped: (Initialization ...8523A160 failed:String) [], RuntimeException
    + FullyQualifiedErrorId : Initialization of container Build-S3B28523A160 failed
 
##[error]PowerShell exited with code '1'.
Finishing: Start Build Container

@freddydk
Copy link
Contributor

Ok, then maybe

# Patch Microsoft.PowerShell.Archive to use en-US UI Culture (see https://github.com/PowerShell/Microsoft.PowerShell.Archive/pull/46)
$psarchiveModule = 'C:\Windows\System32\WindowsPowerShell\v1.0\Modules\Microsoft.PowerShell.Archive\Microsoft.PowerShell.Archive.psm1'
$rule = New-Object System.Security.AccessControl.FileSystemAccessRule((whoami),'Modify', 'Allow')
$acl = Get-Acl -Path $psarchiveModule; $acl.AddAccessRule($rule); Set-Acl -Path $psarchiveModule -AclObject $acl
if (Test-Path $psarchiveModule) { Set-Content -path $psarchiveModule -value (Get-Content -encoding utf8 -raw -path $psarchiveModule).Replace("`r`nImport-LocalizedData  LocalizedData -filename ArchiveResources`r`n","`r`nImport-LocalizedData LocalizedData -filename ArchiveResources -UICulture 'en-US'`r`n") }

@freddydk
Copy link
Contributor

Another thing I would like you to try is to set

$bcContainerHelperConfig.useWinRmSession = 'always'

in the latest 6.0.17 preview without the above overwrite and tell me if that fixes the issue.
It will then not use the standard containerized connection, but instead always winrm, where I set the culture to en-US in the session.

@rdebath
Copy link
Author

rdebath commented Apr 29, 2024

Success!
We were allowed to modify the permissions and the compile succeeded.

@ngiessel
Copy link

Thank you!

While using just 6.0.17-preview1193 without the overwrite does not seem to work on my end, it does work with the overwrite.

@rdebath
Copy link
Author

rdebath commented Apr 29, 2024

Setting json config.

"always" fails.
"never" fails
After adding: "winrm quickconfig -force" on the host.
"always" succeeds
"never" fails
"allow" (default no configuration) fails.

{"MicrosoftTelemetryConnectionString": "",
"useWinRmSession": "always"}

This fails no winrm set always

### Running New-BCContainer
BcContainerHelper version 6.0.17-preview1193
Setting MicrosoftTelemetryConnectionString = 
Setting useWinRmSession = always
WinRM service is not running, will not try to use WinRM sessions
Running on Windows, PowerShell 5.1.22621.2506
WARNING: Container name should not exceed 15 characters
BcContainerHelper is version 6.0.17-preview1193
BcContainerHelper is running as administrator
HyperV is Enabled
Host is Microsoft Windows 11 Enterprise - 10.0.22631.3296
UsePsSession is True
UsePwshForBc24 is True
UseWinRmSession is never
UseSslForWinRmSession is True
Docker Client Version is 24.0.7
Docker Server Version is 24.0.7

This fails no winrm set never

### Running New-BCContainer
BcContainerHelper version 6.0.17-preview1193
Setting MicrosoftTelemetryConnectionString = 
Setting useWinRmSession = never
Running on Windows, PowerShell 5.1.22621.2506
WARNING: Container name should not exceed 15 characters
BcContainerHelper is version 6.0.17-preview1193
BcContainerHelper is running as administrator
HyperV is Enabled
Host is Microsoft Windows 11 Enterprise - 10.0.22631.3296
UsePsSession is True
UsePwshForBc24 is True
UseWinRmSession is never
UseSslForWinRmSession is True
Docker Client Version is 24.0.7
Docker Server Version is 24.0.7

Host WinRM enabled, set "always" success

### Running New-BCContainer
BcContainerHelper version 6.0.17-preview1193
Setting MicrosoftTelemetryConnectionString = 
Setting useWinRmSession = always
Running on Windows, PowerShell 5.1.22621.2506
WARNING: Container name should not exceed 15 characters
BcContainerHelper is version 6.0.17-preview1193
BcContainerHelper is running as administrator
HyperV is Enabled
Host is Microsoft Windows 11 Enterprise - 10.0.22631.3296
UsePsSession is True
UsePwshForBc24 is True
UseWinRmSession is always
UseSslForWinRmSession is True
Docker Client Version is 24.0.7
Docker Server Version is 24.0.7

Host WinRM enabled, set "never" fails

### Running New-BCContainer
BcContainerHelper version 6.0.17-preview1193
Running on Windows, PowerShell 5.1.22621.2506
WARNING: Container name should not exceed 15 characters
BcContainerHelper is version 6.0.17-preview1193
BcContainerHelper is running as administrator
HyperV is Enabled
Host is Microsoft Windows 11 Enterprise - 10.0.22631.3296
UsePsSession is True
UsePwshForBc24 is True
UseWinRmSession is never
UseSslForWinRmSession is True
Docker Client Version is 24.0.7
Docker Server Version is 24.0.7

WinRM enabled, setting is default, fails

### Running New-BCContainer
Running on Windows, PowerShell 5.1.22621.2506
WARNING: Container name should not exceed 15 characters
BcContainerHelper is version 6.0.17-preview1193
BcContainerHelper is running as administrator
HyperV is Enabled
Host is Microsoft Windows 11 Enterprise - 10.0.22631.3296
UsePsSession is True
UsePwshForBc24 is True
UseWinRmSession is allow
UseSslForWinRmSession is True
Docker Client Version is 24.0.7
Docker Server Version is 24.0.7

@freddydk
Copy link
Contributor

OK - I also expect that setting "usePSSession" to false then works without the override.

It seems like the problem is only on getting a session using the containerId with a configurationName set

I think I have enough to make a fix.
I will patch the Archice module in the generic image 1.0.2.21
I will add the patch to containerhelper if using generic image 1.0.2.20 or earlier

@freddydk freddydk mentioned this issue Apr 29, 2024
freddydk added a commit that referenced this issue Apr 29, 2024
Fixes #3522
Fixes #3523

Co-authored-by: freddydk <freddydk@users.noreply.github.com>
@freddydk
Copy link
Contributor

Shipped in preview

@freddydk
Copy link
Contributor

Please test the latest preview, thanks

@ngiessel
Copy link

Looks good here!

@rdebath
Copy link
Author

rdebath commented Apr 30, 2024

Looks good, "BcContainerHelper version 6.0.17-preview1194" is running fine with defaults, no WinRM on host.

@freddydk
Copy link
Contributor

shipped 6.0.17

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants