microsoft / navcontainerhelper

Official Microsoft repository for BcContainerHelper, a PowerShell module, which makes it easier to work with Business Central Containers on Docker.
MIT License
384 stars 247 forks source link

Using Compile-AppInBcContainer in a -filesOnly container does not respect the -vsixFile parameter and uses the compiler shipped with the BC artifacts instead #2259

Closed rvanbekkum closed 2 years ago

rvanbekkum commented 2 years ago

PLEASE DO NOT INCLUDE ANY PASSWORDS OR TOKENS IN YOUR ISSUE!!!

Describe the issue The Compile-AppInBcContainer function has a -CustomCodeCops parameter to which you can pass additional code analyzer DLLs. This works perfectly fine when compiling against a 'regular' container, but it fails when compiling against a -filesOnly container.

Scripts used to create container and cause the issue UPDATE: Create-Container.ps1

Param(
    [string] $containerImage = "",
    [Parameter(Mandatory=$true)]
    [string] $containerName,
    [Parameter(Mandatory=$true)]
    [pscredential] $credential,
    [string] $licenseFile = "",
    [string] $databaseServer = "",
    [string] $databaseInstance = "",
    [string] $databaseName = "",
    [pscredential] $databaseCredential = $null,
    [string] $memoryLimit = "4G",
    [switch] $alwaysPull,
    [string] $artifactUrl = "",
    $artifactParams = @{},
    [switch] $enableSymbolLoading,
    [switch] $useLatestVsix,
    [switch] $filesOnly
)

Write-Verbose "Passed parameters:`n$($PsBoundParameters | Out-String)";

if ((-not $containerImage) -and (-not $artifactUrl)) {
    $artifactUrl = Get-BCArtifactUrl @artifactParams
}
if ($containerImage) {
    Write-Host "Image used: $containerImage"
}
if ($artifactUrl) {
    Write-Host "Artifact used: $artifactUrl"
}

$parameters = @{
                "accept_eula" = $true;
                "accept_outdated" = $true
               }

$segments = "$PSScriptRoot".Split('\')
$rootFolder = "$($segments[0])\$($segments[1])"
$additionalParameters = @("--volume ""$($rootFolder):C:\Agent""")
$myscripts = @(@{'MainLoop.ps1' = 'while ($true) { start-sleep -seconds 10 }'})
$shortcuts = "None"

$vsixFile = ""
if ($useLatestVsix) {
    $vsixFile = Get-LatestAlLanguageExtensionUrl
    Write-Host "Using VSIX File: $vsixFile"
}

New-BCContainer @parameters `
                -containerName $containerName `
                -imageName $containerImage `
                -artifactUrl $artifactUrl `
                -auth NAVUserPassword `
                -credential $credential `
                -alwaysPull:$alwaysPull `
                -updateHosts `
                -doNotExportObjectsToText `
                -shortcuts $shortcuts `
                -licenseFile $licenseFile `
                -databaseServer $databaseServer `
                -databaseInstance $databaseInstance `
                -databaseName $databaseName `
                -databaseCredential $databaseCredential `
                -enableSymbolLoading:$enableSymbolLoading `
                -memoryLimit $memoryLimit `
                -useBestContainerOS `
                -additionalParameters $additionalParameters `
                -myScripts $myscripts `
                -vsixFile $vsixFile `
                -enableTaskScheduler:$false `
                -filesOnly:$filesOnly
## Invoke Create-Container with -filesOnly and -useLatestVsix
## Invoke Compile-AppInBcContainer with -CustomCodeCops parameter

Example for reproducing this manually:

$artifactUrl = Get-BCArtifactUrl -country base -version 19.0

New-BCContainer -accept_eula -artifactURL $artifactUrl -containerName 'apx-filesonly' -licenseFile 'C:\temp\myLicense.flf' -updateHosts -alwaysPull -memoryLimit 12G -accept_outdated -dns '8.8.8.8' -Auth NavUserPassword -Credential ([PSCredential]::new("123", (ConvertTo-SecureString -String "123" -AsPlainText -Force))) -includeTestToolkit -enableTaskScheduler:$false -filesOnly -vsixFile (Get-LatestAlLanguageExtensionUrl)

Compile-AppInBcContainer -containerName apx-filesonly -credential ([PSCredential]::new("123", (ConvertTo-SecureString -String "123" -AsPlainText -Force))) -CopySymbolsFromContainer -appProjectFolder C:\ProgramData\BcContainerHelper\Extensions\apx-filesonly\my\MyAwesomeProject\App\ -appSymbolsFolder C:\ProgramData\BcContainerHelper\Extensions\apx-filesonly\my\.alPackages\ -CustomCodeCops @("C:\ProgramData\BcContainerHelper\Extensions\apx-filesonly\my\BusinessCentral.LinterCop.dll")

Full output of scripts

Using Symbols Folder: D:\agent\BA01\_work\447\s\.alPackages
Copying System.app from Container
Copying Microsoft_Application.app from Container
Copying Microsoft_Base Application.app from Container
Copying Microsoft_System Application.app from Container
WARNING: You have to specify AuthContext and Environment if you are compiling in a filesOnly container in order to download dependencies
Compiling...
.\alc.exe /project:"C:\Agent\BA01\_work\447\s\App" /packagecachepath:"C:\Agent\BA01\_work\447\s\.alPackages" /out:"C:\Agent\BA01\_work\447\a\App\<Publisher Name>_<App Name>_<Version No.>.app" /analyzer:C:\build\vsix\extension\bin\Analyzers\Microsoft.Dynamics.Nav.CodeCop.dll /analyzer:C:\build\vsix\extension\bin\Analyzers\Microsoft.Dynamics.Nav.AppSourceCop.dll /analyzer:C:\build\vsix\extension\bin\Analyzers\Microsoft.Dynamics.Nav.UICop.dll /analyzer:C:\Agent\BA01\_work\447\s\LinterCop\BusinessCentral.LinterCop.dll /analyzer:C:\Agent\BA01\_work\447\s\WSBCop\drop\BusinessCentral.WSBCop.dll /ruleset:C:\Agent\BA01\_work\447\s\AzureDevOpsTools\build\bcsaas\ruleset.json /assemblyprobingpaths:"C:\Program Files (x86)\Microsoft Dynamics NAV\190\RoleTailored Client","C:\Program Files\Microsoft Dynamics NAV\190\Service","C:\Program Files (x86)\Open XML SDK\V2.5\lib","c:\Windows\Microsoft.NET\Assembly","C:\Test Assemblies\Mock Assemblies"
Microsoft (R) AL Compiler version 8.0.8.2758
Copyright (C) Microsoft Corporation. All rights reserved

Compilation started for project '<My App Name>' containing '51' files at '16:28:5.230'.

##[warning]'Microsoft.Dynamics.Nav.CodeAnalysis, Version=8.2.8.24543, Culture=neutral, PublicKeyToken=31bf3856ad364e35'(,): warning :  An instance of analyzer BusinessCentral.LinterCop.Design.Rule0001FlowFieldsShouldNotBeEditable cannot be created from C:\Agent\BA01\_work\447\s\LinterCop\BusinessCentral.LinterCop.dll : Could not load file or assembly 'Microsoft.Dynamics.Nav.CodeAnalysis, Version=8.2.8.24543, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified.
##[warning]'Microsoft.Dynamics.Nav.CodeAnalysis, Version=8.2.8.24543, Culture=neutral, PublicKeyToken=31bf3856ad364e35'(,): warning :  An instance of analyzer BusinessCentral.LinterCop.Design.Rule0002CommitMustBeExplainedByComment cannot be created from C:\Agent\BA01\_work\447\s\LinterCop\BusinessCentral.LinterCop.dll : Could not load file or assembly 'Microsoft.Dynamics.Nav.CodeAnalysis, Version=8.2.8.24543, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified.
##[warning]'Microsoft.Dynamics.Nav.CodeAnalysis, Version=8.2.8.24543, Culture=neutral, PublicKeyToken=31bf3856ad364e35'(,): warning :  An instance of analyzer BusinessCentral.LinterCop.Design.Rule0003DoNotUseObjectIDsInVariablesOrProperties cannot be created from C:\Agent\BA01\_work\447\s\LinterCop\BusinessCentral.LinterCop.dll : Could not load file or assembly 'Microsoft.Dynamics.Nav.CodeAnalysis, Version=8.2.8.24543, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified.
##[warning]'Microsoft.Dynamics.Nav.CodeAnalysis, Version=8.2.8.24543, Culture=neutral, PublicKeyToken=31bf3856ad364e35'(,): warning :  An instance of analyzer BusinessCentral.LinterCop.Design.Rule0004LookupPageIdAndDrillDownPageId cannot be created from C:\Agent\BA01\_work\447\s\LinterCop\BusinessCentral.LinterCop.dll : Could not load file or assembly 'Microsoft.Dynamics.Nav.CodeAnalysis, Version=8.2.8.24543, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified.
##[warning]'Microsoft.Dynamics.Nav.CodeAnalysis, Version=8.2.8.24543, Culture=neutral, PublicKeyToken=31bf3856ad364e35'(,): warning :  An instance of analyzer BusinessCentral.LinterCop.Design.Rule0005VariableCasingShouldNotDIfferFromDeclaration cannot be created from C:\Agent\BA01\_work\447\s\LinterCop\BusinessCentral.LinterCop.dll : Could not load file or assembly 'Microsoft.Dynamics.Nav.CodeAnalysis, Version=8.2.8.24543, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified.
##[warning]'Microsoft.Dynamics.Nav.CodeAnalysis, Version=8.2.8.24543, Culture=neutral, PublicKeyToken=31bf3856ad364e35'(,): warning :  An instance of analyzer BusinessCentral.LinterCop.Design.Rule0006FieldNotAutoIncrementInTemporaryTable cannot be created from C:\Agent\BA01\_work\447\s\LinterCop\BusinessCentral.LinterCop.dll : Could not load file or assembly 'Microsoft.Dynamics.Nav.CodeAnalysis, Version=8.2.8.24543, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified.
##[warning]'Microsoft.Dynamics.Nav.CodeAnalysis, Version=8.2.8.24543, Culture=neutral, PublicKeyToken=31bf3856ad364e35'(,): warning :  An instance of analyzer BusinessCentral.LinterCop.Design.Rule0007DataPerCompanyShouldAlwaysBeSet cannot be created from C:\Agent\BA01\_work\447\s\LinterCop\BusinessCentral.LinterCop.dll : Could not load file or assembly 'Microsoft.Dynamics.Nav.CodeAnalysis, Version=8.2.8.24543, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified.
##[warning]'Microsoft.Dynamics.Nav.CodeAnalysis, Version=8.2.8.24543, Culture=neutral, PublicKeyToken=31bf3856ad364e35'(,): warning :  An instance of analyzer BusinessCentral.LinterCop.Design.Rule0008NoFilterOperatorsInSetRange cannot be created from C:\Agent\BA01\_work\447\s\LinterCop\BusinessCentral.LinterCop.dll : Could not load file or assembly 'Microsoft.Dynamics.Nav.CodeAnalysis, Version=8.2.8.24543, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified.
##[warning]'Microsoft.Dynamics.Nav.CodeAnalysis, Version=8.2.8.24543, Culture=neutral, PublicKeyToken=31bf3856ad364e35'(,): warning :  An instance of analyzer BusinessCentral.LinterCop.Design.Rule0009CodeMetrics cannot be created from C:\Agent\BA01\_work\447\s\LinterCop\BusinessCentral.LinterCop.dll : Could not load file or assembly 'Microsoft.Dynamics.Nav.CodeAnalysis, Version=8.2.8.24543, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified.
##[warning]'Microsoft.Dynamics.Nav.CodeAnalysis, Version=8.2.8.24543, Culture=neutral, PublicKeyToken=31bf3856ad364e35'(,): warning :  An instance of analyzer BusinessCentral.LinterCop.Design.Rule0011DataPerCompanyShouldAlwaysBeSet cannot be created from C:\Agent\BA01\_work\447\s\LinterCop\BusinessCentral.LinterCop.dll : Could not load file or assembly 'Microsoft.Dynamics.Nav.CodeAnalysis, Version=8.2.8.24543, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified.
##[warning]'Microsoft.Dynamics.Nav.CodeAnalysis, Version=8.2.8.24543, Culture=neutral, PublicKeyToken=31bf3856ad364e35'(,): warning :  An instance of analyzer BusinessCentral.LinterCop.Design.Rule0012DoNotUseObjectIdInSystemFunctions cannot be created from C:\Agent\BA01\_work\447\s\LinterCop\BusinessCentral.LinterCop.dll : Could not load file or assembly 'Microsoft.Dynamics.Nav.CodeAnalysis, Version=8.2.8.24543, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified.
##[warning]'Microsoft.Dynamics.Nav.CodeAnalysis, Version=8.2.8.24543, Culture=neutral, PublicKeyToken=31bf3856ad364e35'(,): warning :  An instance of analyzer BusinessCentral.LinterCop.Design.Rule0013CheckForNotBlankOnSingleFieldPrimaryKeys cannot be created from C:\Agent\BA01\_work\447\s\LinterCop\BusinessCentral.LinterCop.dll : Could not load file or assembly 'Microsoft.Dynamics.Nav.CodeAnalysis, Version=8.2.8.24543, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified.
##[warning]'Microsoft.Dynamics.Nav.CodeAnalysis, Version=8.2.8.24543, Culture=neutral, PublicKeyToken=31bf3856ad364e35'(,): warning :  An instance of analyzer BusinessCentral.LinterCop.Design.Rule0014PermissionSetCaptionLength cannot be created from C:\Agent\BA01\_work\447\s\LinterCop\BusinessCentral.LinterCop.dll : Could not load file or assembly 'Microsoft.Dynamics.Nav.CodeAnalysis, Version=8.2.8.24543, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified.
##[warning]'Microsoft.Dynamics.Nav.CodeAnalysis, Version=8.2.8.24543, Culture=neutral, PublicKeyToken=31bf3856ad364e35'(,): warning :  An instance of analyzer BusinessCentral.LinterCop.Design.Rule0015PermissionSetCoverage cannot be created from C:\Agent\BA01\_work\447\s\LinterCop\BusinessCentral.LinterCop.dll : Could not load file or assembly 'Microsoft.Dynamics.Nav.CodeAnalysis, Version=8.2.8.24543, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified.
##[warning]'Microsoft.Dynamics.Nav.CodeAnalysis, Version=8.1.8.999, Culture=neutral, PublicKeyToken=31bf3856ad364e35'(,): warning :  An instance of analyzer BusinessCentral.WSBCop.Design.Rule0002WSBProcedureNamesAnalyzerAnalyzer cannot be created from C:\Agent\BA01\_work\447\s\WSBCop\drop\BusinessCentral.WSBCop.dll : Could not load file or assembly 'Microsoft.Dynamics.Nav.CodeAnalysis, Version=8.1.8.999, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified.
##[warning]'Microsoft.Dynamics.Nav.CodeAnalysis, Version=8.1.8.999, Culture=neutral, PublicKeyToken=31bf3856ad364e35'(,): warning :  An instance of analyzer BusinessCentral.WSBCop.Design.Rule0001WSBProcedureNamesAnalyzerAnalyzer cannot be created from C:\Agent\BA01\_work\447\s\WSBCop\drop\BusinessCentral.WSBCop.dll : Could not load file or assembly 'Microsoft.Dynamics.Nav.CodeAnalysis, Version=8.1.8.999, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified.

Compilation ended at '16:28:12.161'.

D:\agent\BA01\_work\447\a\App\<Publisher Name>_<My App Name>_<My Version No.>.app successfully created in 53 seconds

And a compile on my own machine (where I place the files in "C:\ProgramData\BcContainerHelper\Extensions\apx-filesonly\my.....") with yet another app raises warnings like the following:

Compilation started for project '<NAME HERE>' containing '83' files at '17:13:50.852'.

warning AD0001: Analyzer 'BusinessCentral.LinterCop.Design.Rule0015PermissionSetCoverage' threw an exception of type 'System.IO.FileNotFoundException' with message 'System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.Dynamics.Nav.Analyzers.Common, Version=8.1.8.999, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified.
File name: 'Microsoft.Dynamics.Nav.Analyzers.Common, Version=8.1.8.999, Culture=neutral, PublicKeyToken=31bf3856ad364e35'
   at BusinessCentral.LinterCop.Design.Rule0015PermissionSetCoverage.CheckPermissionSetCoverage(SymbolAnalysisContext context)
   at Microsoft.Dynamics.Nav.CodeAnalysis.Diagnostics.AnalyzerExecutor.<>c__DisplayClass49_2.<ExecuteSymbolActionsCore>b__0() in D:\a\1\s\source\Prod\Microsoft.Dynamics.Nav.CodeAnalysis\DiagnosticAnalyzer\AnalyzerExecutor.cs:line 656
   at Microsoft.Dynamics.Nav.CodeAnalysis.Diagnostics.AnalyzerExecutor.ExecuteAndCatchIfThrows_NoLock(DiagnosticAnalyzer analyzer, Action analyze, Nullable`1 info) in D:\a\1\s\source\Prod\Microsoft.Dynamics.Nav.CodeAnalysis\DiagnosticAnalyzer\AnalyzerExecutor.cs:line 1078'

but it does work for 'normal' containers.

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

Additional context

Is there a way we can resolve this? What is causing this?

freddydk commented 2 years ago

In the sample above (this line):

New-BCContainer -accept_eula -artifactURL $artifactUrl -containerName 'apx-filesonly' -licenseFile '<Path To My License File>' -updateHosts -alwaysPull -memoryLimit 12G -accept_outdated -dns '8.8.8.8' -Auth NavUserPassword -Credential ([PSCredential]::new("123", (ConvertTo-SecureString -String "123" -AsPlainText -Force))) -includeTestToolkit -enableTaskScheduler:$false -filesOnly

does not seem to share the folder C:\Agent\BA01_work\447\s\ with the container. I would expect that to give a series of other errors - how are you sharing this folder to the container? (are you using some parameters which isn't here?)

rvanbekkum commented 2 years ago

Yes, for when it runs on our build agent the -volume parameter is added via the -additionalParameters parameter to share the build agent folder. It can also be tested by using the C:\ProgramData\BcContainerHelper\Extensions\containername\my folder which is shared with containers by default. Does this answer your question?

freddydk commented 2 years ago

You specify "C:\Agent\BA01_work\447\s\LinterCop\BusinessCentral.LinterCop.dll " as custom code cop (btw. there is a space there - not sure whether that causes problems - don't think so). I will see that as a folder on the host and in the compile function determine where to find that file in the container (one of the containing folders needs to be shared) and add that to the ALC call: /analyzer:C:\Agent\BA01\_work\447\s\LinterCop\BusinessCentral.LinterCop.dll So it looks like it thinks that the host Agent folder is shared with the container with the same name - is that correct? If the folder is shared correctly, the file should also be there. If possible - could you get a get-bccontainerdebuginfo from a container on the build agent and send that? (either here or on email)

StefanMaron commented 2 years ago

I had the same version problems when using Run-ALPipeline with older versions of BC. This is because I compile the LinterCop against the latest compiler dlls. Solution was to pass in -vsixFile (Get-LatestAlLanguageExtensionUrl). If this parameter could also be added to Compile-AppInBcContainer it could solve the problem

rvanbekkum commented 2 years ago

@freddydk We found what actually goes wrong (@StefanMaron set me on the right path for pinning it down). It appears that if the -filesOnly flag is used for creating the container and -vsixFile (Get-LatestAlLanguageExtensionUrl) is passed as well, then Compile-AppInBcContainer will still use the compiler version shipped in the BC artifacts.

To reproduce:

$artifactUrl = Get-BCArtifactUrl -country base -version 19.0

New-BCContainer -accept_eula -artifactURL $artifactUrl -containerName 'apx-filesonly' -licenseFile 'C:\temp\myLicense.flf' -updateHosts -alwaysPull -memoryLimit 12G -accept_outdated -dns '8.8.8.8' -Auth NavUserPassword -Credential ([PSCredential]::new("123", (ConvertTo-SecureString -String "123" -AsPlainText -Force))) -includeTestToolkit -enableTaskScheduler:$false -filesOnly -vsixFile (Get-LatestAlLanguageExtensionUrl)

Compile-AppInBcContainer -containerName apx-filesonly -credential ([PSCredential]::new("123", (ConvertTo-SecureString -String "123" -AsPlainText -Force))) -CopySymbolsFromContainer -appProjectFolder C:\ProgramData\BcContainerHelper\Extensions\apx-filesonly\my\MyAwesomeProject\App\ -appSymbolsFolder C:\ProgramData\BcContainerHelper\Extensions\apx-filesonly\my\.alPackages\ -CustomCodeCops @("C:\ProgramData\BcContainerHelper\Extensions\apx-filesonly\my\BusinessCentral.LinterCop.dll")

(also updated the original issue description accordingly)

This does not happen with a 'full'/normal BC container.

Also, like you asked, considering there is no personal information in the output from Get-BcContainerDebugInfo, here it is for my own machine where I can reproduce it with a -filesOnly container:

{
    "container.logs":  [
                           "Using artifactUrl https://bcartifacts.azureedge.net/sandbox/19.0.29894.34796/base",
                           "Using installer from C:\\Run\\150-new",
                           "Installing Business Central",
                           "Installing from artifacts",
                           "Copying Service Tier Files",
                           "c:\\dl\\sandbox\\19.0.29894.34796\\platform\\ServiceTier\\Program Files",
                           "c:\\dl\\sandbox\\19.0.29894.34796\\platform\\ServiceTier\\System64Folder",
                           "Copying PowerShell Scripts",
                           "c:\\dl\\sandbox\\19.0.29894.34796\\platform\\WindowsPowerShellScripts\\Cloud\\NAVAdministration",
                           "c:\\dl\\sandbox\\19.0.29894.34796\\platform\\WindowsPowerShellScripts\\WebSearch",
                           "Copying dependencies",
                           "Copying ReportBuilder",
                           "Importing PowerShell Modules",
                           "Skipping restore of Cronus database",
                           "Modifying Business Central Service Tier Config File for Docker",
                           "Installing SIP crypto provider: \u0027C:\\Windows\\System32\\NavSip.dll\u0027",
                           "Copying Web Client Files",
                           "c:\\dl\\sandbox\\19.0.29894.34796\\platform\\WebClient\\Microsoft Dynamics NAV",
                           "Copying Client Files",
                           "c:\\dl\\sandbox\\19.0.29894.34796\\platform\\LegacyDlls\\program files\\Microsoft Dynamics NAV",
                           "c:\\dl\\sandbox\\19.0.29894.34796\\platform\\LegacyDlls\\program files\\Microsoft Dynamics NAV",
                           "c:\\dl\\sandbox\\19.0.29894.34796\\platform\\LegacyDlls\\systemFolder",
                           "Copying ModernDev Files",
                           "c:\\dl\\sandbox\\19.0.29894.34796\\platform",
                           "c:\\dl\\sandbox\\19.0.29894.34796\\platform\\ModernDev\\program files\\Microsoft Dynamics NAV",
                           "Copying additional files",
                           "Copying ConfigurationPackages",
                           "C:\\dl\\sandbox\\19.0.29894.34796\\platform\\ConfigurationPackages",
                           "Copying Test Assemblies",
                           "C:\\dl\\sandbox\\19.0.29894.34796\\platform\\Test Assemblies",
                           "Copying Applications",
                           "C:\\dl\\sandbox\\19.0.29894.34796\\platform\\Applications",
                           "Installation took 17 seconds",
                           "Installation complete",
                           "Ready for connections!"
                       ],
    "docker.info":  [
                        "Client:",
                        " Context:    desktop-windows",
                        " Debug Mode: false",
                        " Plugins:",
                        "  buildx: Build with BuildKit (Docker Inc., v0.5.1-docker)",
                        "  compose: Docker Compose (Docker Inc., 2.0.0-beta.4)",
                        "  scan: Docker Scan (Docker Inc., v0.8.0)",
                        "",
                        "Server:",
                        " Containers: 2",
                        "  Running: 2",
                        "  Paused: 0",
                        "  Stopped: 0",
                        " Images: 4",
                        " Server Version: 20.10.7",
                        " Storage Driver: windowsfilter",
                        "  Windows: ",
                        " Logging Driver: json-file",
                        " Plugins:",
                        "  Volume: local",
                        "  Network: ics internal l2bridge l2tunnel nat null overlay private transparent",
                        "  Log: awslogs etwlogs fluentd gcplogs gelf json-file local logentries splunk syslog",
                        " Swarm: inactive",
                        " Default Isolation: hyperv",
                        " Kernel Version: 10.0 19043 (19041.1.amd64fre.vb_release.191206-1406)",
                        " Operating System: Windows 10 Enterprise Version 2009 (OS Build 19043.1415)",
                        " OSType: windows",
                        " Architecture: x86_64",
                        " CPUs: 8",
                        " Total Memory: 31.88GiB",
                        " Name: LT-ROB",
                        " ID: EDA4:PZWK:HKFR:MG6N:J2NI:QRVL:4RU2:FJTM:I5J7:EY4J:GF73:5R5A",
                        " Docker Root Dir: C:\\ProgramData\\Docker",
                        " Debug Mode: false",
                        " Registry: https://index.docker.io/v1/",
                        " Labels:",
                        " Experimental: false",
                        " Insecure Registries:",
                        "  127.0.0.0/8",
                        " Live Restore Enabled: false",
                        " Product License: Community Engine",
                        ""
                    ],
    "container.labels":  {
                             "country":  "W1",
                             "created":  "202201060433",
                             "eula":  "https://go.microsoft.com/fwlink/?linkid=861843",
                             "filesonly":  "yes",
                             "maintainer":  "Dynamics SMB",
                             "nav":  "",
                             "osversion":  "10.0.19041.1415",
                             "platform":  "19.0.29884.34594",
                             "tag":  "1.0.1.9",
                             "version":  "19.0.29894.34796"
                         },
    "container.ping":  [
                           "",
                           "Pinging apx-filesonly.local [fe80::d82a:ea06:96b8:d8f%82] with 32 bytes of data:",
                           "Destination host unreachable.",
                           "Destination host unreachable.",
                           "Destination host unreachable.",
                           "Destination host unreachable.",
                           "",
                           "Ping statistics for fe80::d82a:ea06:96b8:d8f%82:",
                           "    Packets: Sent = 4, Received = 0, Lost = 4 (100% loss),"
                       ],
    "container.env":  [
                          "auth=NavUserPassword",
                          "username=123",
                          "filesOnly=True",
                          "accept_outdated=Y",
                          "enableApiServices=Y",
                          "passwordKeyFile=c:\\run\\my\\aes.key",
                          "isBcSandbox=Y",
                          "multitenant=Y",
                          "licenseFile=\u003cspecified\u003e",
                          "ExitOnError=N",
                          "locale=en-US",
                          "databaseInstance=",
                          "removePasswordKeyFile=Y",
                          "customNavSettings=EnableTaskScheduler=False",
                          "accept_eula=Y",
                          "databaseServer=",
                          "artifactUrl=https://bcartifacts.azureedge.net/sandbox/19.0.29894.34796/base",
                          "useSSL=N",
                          "securePassword=\u003cspecified\u003e",
                          "DOTNET_RUNNING_IN_CONTAINER=true",
                          "COMPLUS_NGenProtectedProcess_FeatureEnabled=0"
                      ]
}

(EDIT: Whoops, accidentally, pasted the output for a different container in here)

rvanbekkum commented 2 years ago

Updated the title of the GitHub issue accordingly.

freddydk commented 2 years ago

Ahh - now that is probably a bug - will investigate

rvanbekkum commented 2 years ago

As a work-around I am extracting the contents of the .vsix to use to C:\build\, so, similar to how you fixed it in https://github.com/microsoft/navcontainerhelper/commit/a59321596fc89d11bc474bb06b3ecf090b9ed275 😊.

freddydk commented 2 years ago

Fixed in 3.0.1