microsoft / navcontainerhelper

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

Can not import dll's from Azure devops to container with Run-alpipeline #2065

Closed dfs111 closed 3 years ago

dfs111 commented 3 years ago

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

Describe the issue The issue is, we are trying to import dll files from our azure devops to a container using Run-alpipeline I have put a screenshot to show what the error is saying.

Scripts used to create container and cause the issue

Param(
    [Parameter(Mandatory=$false)]
    [ValidateSet('AzureDevOps','GithubActions','GitLab')]
    [string] $environment = 'AzureDevOps',
    [Parameter(Mandatory=$true)]
    [string] $version,
    [Parameter(Mandatory=$false)]
    [int] $appBuild = 0,
    [Parameter(Mandatory=$false)]
    [int] $appRevision = 0
)

if ($environment -eq "AzureDevOps") {
    $buildArtifactFolder = $ENV:BUILD_ARTIFACTSTAGINGDIRECTORY
}
elseif ($environment -eq "GitHubActions") {
    $buildArtifactFolder = Join-Path $ENV:GITHUB_WORKSPACE "output"
    New-Item $buildArtifactFolder -ItemType Directory | Out-Null
}

# $baseFolder = (Get-Item (Join-Path $PSScriptRoot "..")).FullName
# . (Join-Path $PSScriptRoot "Read-Settings.ps1") -environment $environment -version $version
# . (Join-Path $PSScriptRoot "Install-BcContainerHelper.ps1") -bcContainerHelperVersion $bcContainerHelperVersion -genericImageName $genericImageName

$baseFolder = 'C:\Users\fo3301\Documents\AL\eVattan'

$authContext = $null
$refreshToken = "$($ENV:BcSaasRefreshToken)"
$environmentName = "$($ENV:EnvironmentName)"
if ($refreshToken -and $environmentName) {
    $authContext = New-BcAuthContext -refreshToken $refreshToken
    if (Get-BcEnvironments -bcAuthContext $authContext | Where-Object { $_.Name -eq $environmentName -and  $_.type -eq "Sandbox" }) {
        Remove-BcEnvironment -bcAuthContext $authContext -environment $environmentName
    }
    $countryCode = $artifact.Split('/')[3]
    New-BcEnvironment -bcAuthContext $authContext -environment $environmentName -countryCode $countrycode -environmentType "Sandbox" | Out-Null
    do {
        Start-Sleep -Seconds 10
        $baseApp = Get-BcPublishedApps -bcAuthContext $authContext -environment $environmentName | Where-Object { $_.Name -eq "Base Application" }
    } while (!($baseApp))
    $baseapp | Out-Host

    $artifact = Get-BCArtifactUrl `
        -country $countryCode `
        -version $baseApp.Version `
        -select Closest

    if ($artifact) {
        Write-Host "Using Artifacts: $artifact"
    }
    else {
        throw "No artifacts available"
    }
}

$params = @{}
$insiderSasToken = "$ENV:insiderSasToken"
$licenseFile = "$ENV:licenseFile"
$codeSigncertPfxFile = "$ENV:CodeSignCertPfxFile"
if (!$doNotSignApps -and $codeSigncertPfxFile) {
    if ("$ENV:CodeSignCertPfxPassword" -ne "") {
        $codeSignCertPfxPassword = try { "$ENV:CodeSignCertPfxPassword" | ConvertTo-SecureString } catch { ConvertTo-SecureString -String "$ENV:CodeSignCertPfxPassword" -AsPlainText -Force }
        $params = @{
            "codeSignCertPfxFile" = $codeSignCertPfxFile
            "codeSignCertPfxPassword" = $codeSignCertPfxPassword
        }
    }
    else {
        $codeSignCertPfxPassword = $null
    }
}

$allTestResults = "testresults*.xml"
$testResultsFile = Join-Path $baseFolder "TestResults.xml"
$testResultsFiles = Join-Path $baseFolder $allTestResults
if (Test-Path $testResultsFiles) {
    Remove-Item $testResultsFiles -Force
}

#================================================================================
#================================================================================

$artifactUrl = Get-BCArtifactUrl -type 'OnPrem' -version 17 -country 'dk' -select 'Latest' 

#========================================================================

#========================================================================

Run-AlPipeline @params `
    -pipelinename $pipelineName `
    -containerName $containerName `
    -imageName $imageName `
    -environment $environmentName `
    -artifact $artifactUrl `
    -memoryLimit $memoryLimit `
    -baseFolder $baseFolder `
    -licenseFile $LicenseFile `
    -installApps $installApps `
    -installTestApps $installTestApps `
    -previousApps $previousApps `
    -appFolders $appFolders `
    -testFolders $testFolders `
    -doNotRunTests:$doNotRunTests `
    -testResultsFile $testResultsFile `
    -testResultsFormat 'JUnit' `
    -installTestRunner:$installTestRunner `
    -installTestFramework:$installTestFramework `
    -installTestLibraries:$installTestLibraries `
    -installPerformanceToolkit:$installPerformanceToolkit `
    -enableCodeCop:$enableCodeCop `
    -enableAppSourceCop:$enableAppSourceCop `
    -enablePerTenantExtensionCop:$enablePerTenantExtensionCop `
    -enableUICop:$enableUICop `
    -azureDevOps:($environment -eq 'AzureDevOps') `
    -gitLab:($environment -eq 'GitLab') `
    -gitHubActions:($environment -eq 'GitHubActions') `
    -failOn 'error' `
    -AppSourceCopMandatoryAffixes $appSourceCopMandatoryAffixes `
    -AppSourceCopSupportedCountries $appSourceCopSupportedCountries `
    -additionalCountries $additionalCountries `
    -buildArtifactFolder $buildArtifactFolder `
    -CreateRuntimePackages:$CreateRuntimePackages `
    -appBuild $appBuild -appRevision $appRevision

#================================================================================
#================================================================================

    # Run-AlPipeline @params `
    # -pipelinename $pipelineName `
    # -containerName $containerName `
    # -imageName $imageName `
    # -bcAuthContext $authContext `
    # -environment $environmentName `
    # -artifact $artifact.replace('{INSIDERSASTOKEN}',$insiderSasToken) `
    # -memoryLimit $memoryLimit `
    # -baseFolder $baseFolder `
    # -licenseFile $LicenseFile `
    # -installApps $installApps `
    # -installTestApps $installTestApps `
    # -previousApps $previousApps `
    # -appFolders $appFolders `
    # -testFolders $testFolders `
    # -doNotRunTests:$doNotRunTests `
    # -testResultsFile $testResultsFile `
    # -testResultsFormat 'JUnit' `
    # -installTestRunner:$installTestRunner `
    # -installTestFramework:$installTestFramework `
    # -installTestLibraries:$installTestLibraries `
    # -installPerformanceToolkit:$installPerformanceToolkit `
    # -enableCodeCop:$enableCodeCop `
    # -enableAppSourceCop:$enableAppSourceCop `
    # -enablePerTenantExtensionCop:$enablePerTenantExtensionCop `
    # -enableUICop:$enableUICop `
    # -azureDevOps:($environment -eq 'AzureDevOps') `
    # -gitLab:($environment -eq 'GitLab') `
    # -gitHubActions:($environment -eq 'GitHubActions') `
    # -failOn 'error' `
    # -AppSourceCopMandatoryAffixes $appSourceCopMandatoryAffixes `
    # -AppSourceCopSupportedCountries $appSourceCopSupportedCountries `
    # -additionalCountries $additionalCountries `
    # -buildArtifactFolder $buildArtifactFolder `
    # -CreateRuntimePackages:$CreateRuntimePackages `
    # -appBuild $appBuild -appRevision $appRevision

if ($environment -eq 'AzureDevOps') {
    Write-Host "##vso[task.setvariable variable=TestResults]$allTestResults"
}

Full output of scripts

##[section]Starting: Run Pipeline
==============================================================================
Task         : PowerShell
Description  : Run a PowerShell script on Linux, macOS, or Windows
Version      : 2.151.1
Author       : Microsoft Corporation
Help         : https://docs.microsoft.com/azure/devops/pipelines/tasks/utility/powershell
==============================================================================
Generating script.
Formatted command: . 'C:\agent\_work\4\s\scripts\DevOps-Pipeline.ps1' -environment "AzureDevOps" -version "ci" -appBuild 384 -appRevision 0
========================== Starting Command Output ===========================
##[command]"C:\WINDOWS\System32\WindowsPowerShell\v1.0\powershell.exe" -NoLogo -NoProfile -NonInteractive -ExecutionPolicy Unrestricted -Command ". 'C:\agent\_work\_temp\6f268420-33f9-4bda-b660-6b5d94d39748.ps1'"
Set artifact = //17.0.0.0/dk
Set pipelineName = eVattan-ci
Set containerName = evattan
Set installApps = ''
Set installTestApps = ''
Set previousApps = ''
Set appSourceCopMandatoryAffixes = ''
Set appSourceCopSupportedCountries = ''
Set appFolders = 'eVattanApp'
Set testFolders = 'eVattanTest'
Set memoryLimit = '6G'
Set additionalCountries = ''
Set genericImageName = ''
Set vaultNameForLocal = 'BuildVariables'
Set bcContainerHelperVersion = 'preview'
Set installTestRunner = True
Set installTestFramework = True
Set installTestLibraries = True
Set installPerformanceToolkit = False
Set enableCodeCop = False
Set enableAppSourceCop = False
Set enablePerTenantExtensionCop = False
Set enableUICop = False
Set doNotSignApps = True
Set doNotRunTests = False
Set cacheImage = True
Set CreateRuntimePackages = True
BcContainerHelper version 2.0.16-preview478
  _____                               _                
 |  __ \                             | |               
 | |__) |_ _ _ __ __ _ _ __ ___   ___| |_ ___ _ __ ___ 
 |  ___/ _` | '__/ _` | '_ ` _ \ / _ \ __/ _ \ '__/ __|
 | |  | (_| | | | (_| | | | | | |  __/ |_  __/ |  \__ \
 |_|   \__,_|_|  \__,_|_| |_| |_|\___|\__\___|_|  |___/

Pipeline name               eVattan-ci
Container name              evattan
Image name                  bcimage
ArtifactUrl                 https://bcartifacts.azureedge.net/onprem/17.10.29463.0/dk
SasToken                    Not Specified
BcAuthContext               Not Specified
Environment                 
ReUseContainer              False
KeepContainer               False
Credential                  admin/Xudu9969
MemoryLimit                 6G
Enable Task Scheduler       False
Assign Premium Plan         False
Install Test Runner         True
Install Test Framework      True
Install Test Libraries      True
Install Perf. Toolkit       False
CopySymbolsFromContainer    False
enableCodeCop               False
enableAppSourceCop          False
enableUICop                 False
enablePerTenantExtensionCop False
escapeFromCops              False
useDefaultAppSourceRuleSet  False
rulesetFile                 
azureDevOps                 True
gitLab                      False
gitHubActions               False
License file                Specified
CodeSignCertPfxFile         Not specified
TestResultsFile             C:\agent\_work\4\s\TestResults.xml
TestResultsFormat           JUnit
AdditionalCountries         
PackagesFolder              C:\agent\_work\4\s\.packages
OutputFolder                C:\agent\_work\4\s\.output
BuildArtifactFolder         C:\agent\_work\4\a
CreateRuntimePackages       True
AppBuild                    384
AppRevision                 0
Install Apps
- None
Install Test Apps
- None
Previous Apps
- None
Application folders
- C:\agent\_work\4\s\eVattanApp
Test application folders
- C:\agent\_work\4\s\eVattanTest
Custom CodeCops
- None

  _____       _ _ _                                          _        _                            
 |  __ \     | | (_)                                        (_)      (_)                           
 | |__) |   _| | |_ _ __   __ _    __ _  ___ _ __   ___ _ __ _  ___   _ _ __ ___   __ _  __ _  ___ 
 |  ___/ | | | | | | '_ \ / _` |  / _` |/ _ \ '_ \ / _ \ '__| |/ __| | | '_ ` _ \ / _` |/ _` |/ _ \
 | |   | |_| | | | | | | | (_| | | (_| |  __/ | | |  __/ |  | | (__  | | | | | | | (_| | (_| |  __/
 |_|    \__,_|_|_|_|_| |_|\__, |  \__, |\___|_| |_|\___|_|  |_|\___| |_|_| |_| |_|\__,_|\__, |\___|
                           __/ |   __/ |                                                 __/ |     
                          |___/   |___/                                                 |___/      

INFO: Windows 10 21H1 images are not yet available, using 2004 as these are found to work better than 20H2 on 21H1
Pulling mcr.microsoft.com/businesscentral:10.0.19041.1165

Pulling generic image took 2 seconds

   _____                _   _                               _        _                 
  / ____|              | | (_)                             | |      (_)                
 | |     _ __ ___  __ _| |_ _ _ __   __ _    ___ ___  _ __ | |_ __ _ _ _ __   ___ _ __ 
 | |    | '__/ _ \/ _` | __| | '_ \ / _` |  / __/ _ \| '_ \| __/ _` | | '_ \ / _ \ '__|
 | |____| | |  __/ (_| | |_| | | | | (_| | | (__ (_) | | | | |_ (_| | | | | |  __/ |   
  \_____|_|  \___|\__,_|\__|_|_| |_|\__, |  \___\___/|_| |_|\__\__,_|_|_| |_|\___|_|   
                                     __/ |                                             
                                    |___/                                              

BcContainerHelper is version 2.0.16-preview478
BcContainerHelper is running as administrator
Host is Microsoft Windows 10 Enterprise - 21H1
Docker Client Version is 20.10.8
Docker Server Version is 20.10.8
Fetching all docker images
Fetching all docker volumes
ArtifactUrl and ImageName specified
Image bcimage:onprem-17.10.29463.0-dk already exists
Using image bcimage:onprem-17.10.29463.0-dk
Creating Container evattan
Style: onprem
Multitenant: No
Version: 17.10.29463.0
Platform: 17.0.29460.0
Generic Tag: 1.0.1.7
Container OS Version: 10.0.19041.1165 (2004)
Host OS Version: 10.0.19043.1165 (21H1)
WARNING: Host OS is 21H1 and Container OS is 2004, defaulting to process isolation. If you experience problems, add -isolation hyperv.
Using process isolation
Using locale da-DK
Disabling the standard eventlog dump to container log every 2 seconds (use -dumpEventLog to enable)
Using license file C:\Users\fo3301\Documents\lic\fin_NFR_BC_v17_ISV.flf
Additional Parameters:
--volume "C:\agent\_work\4\s:c:\sources"
--volume "C:\sources:c:\shared"
--env customNavSettings=EnableTaskScheduler=False
Files in C:\ProgramData\BcContainerHelper\Extensions\evattan\my:
- AdditionalOutput.ps1
- license.flf
- MainLoop.ps1
- SetupVariables.ps1
- updatehosts.ps1
Creating container evattan from image bcimage:onprem-17.10.29463.0-dk
2ab33cc8354a8e1266fcb042c23c45e7d76fb824f7420c14142afd5f57a5bf9c
Waiting for container evattan to be ready
Initializing...
Setting host.docker.internal to 172.21.34.126 in container hosts file (copy from host hosts file)
Setting gateway.docker.internal to 172.21.34.126 in container hosts file (copy from host hosts file)
Setting kubernetes.docker.internal to 127.0.0.1 in container hosts file (copy from host hosts file)
Setting host.containerhelper.internal to 172.26.16.1 in container hosts file
Starting Container
Hostname is evattan
PublicDnsName is evattan
Using NavUserPassword Authentication
Starting Local SQL Server
Starting Internet Information Server
Creating Self Signed Certificate
Self Signed Certificate Thumbprint 16E200DBFC61AADE01CD7E02C0D8C093252C8591
Modifying Service Tier Config File with Instance Specific Settings
Modifying Service Tier Config File with settings from environment variable
Setting EnableTaskScheduler to False
Starting Service Tier
Registering event sources
Creating DotNetCore Web Server Instance
Using license file 'c:\run\my\license.flf'
Import License
Creating http download site
Setting SA Password and enabling SA
Creating admin as SQL User and add to sysadmin
Creating SUPER user
Container IP Address: 172.26.30.1
Container Hostname  : evattan
Container Dns Name  : evattan
Web Client          : http://evattan/BC/
Dev. Server         : http://evattan
Dev. ServerInstance : BC
Setting evattan to 172.26.30.1 in host hosts file

Files:
http://evattan:8080/ALLanguage.vsix

Container Total Physical Memory is 15.8Gb
Container Free Physical Memory is 1.5Gb

Initialization took 76 seconds
Ready for connections!
Reading CustomSettings.config from evattan
Creating Desktop Shortcuts for evattan
Container evattan successfully created

Use:
Get-BcContainerEventLog -containerName evattan to retrieve a snapshot of the event log from the container
Get-BcContainerDebugInfo -containerName evattan to get debug information about the container
Enter-BcContainer -containerName evattan to open a PowerShell prompt inside the container
Remove-BcContainer -containerName evattan to remove the container again
docker logs evattan to retrieve information about URL's again

Creating container took 87 seconds

   _____                      _ _ _                                     
  / ____|                    (_) (_)                                    
 | |     ___  _ __ ___  _ __  _| |_ _ __   __ _    __ _ _ __  _ __  ___ 
 | |    / _ \| '_ ` _ \| '_ \| | | | '_ \ / _` |  / _` | '_ \| '_ \/ __|
 | |____ (_) | | | | | | |_) | | | | | | | (_| | | (_| | |_) | |_) \__ \
  \_____\___/|_| |_| |_| .__/|_|_|_|_| |_|\__, |  \__,_| .__/| .__/|___/
                       | |                 __/ |       | |   | |        
                       |_|                |___/        |_|   |_|        

Using Version 1.0.384.0
Using Symbols Folder: C:\agent\_work\4\s\.packages
Downloading symbols: Microsoft_Application_17.10.29463.0.app
Url : http://172.26.30.1:7049/BC/dev/packages?publisher=Microsoft&appName=Application&versionText=17.0.0.0&tenant=default
Adding dependency to System Application from Microsoft
Adding dependency to Base Application from Microsoft
Downloading symbols: Microsoft_System_17.0.29460.0.app
Url : http://172.26.30.1:7049/BC/dev/packages?publisher=Microsoft&appName=System&versionText=17.0.0.0&tenant=default
Downloading symbols: Microsoft_Payment and Reconciliation Formats (DK)_17.10.29463.0.app
Url : http://172.26.30.1:7049/BC/dev/packages?publisher=Microsoft&appName=Payment%20and%20Reconciliation%20Formats%20(DK)&versionText=17.8.27267.0&tenant=default
Downloading symbols: Microsoft_OIOUBL_17.10.29463.0.app
Url : http://172.26.30.1:7049/BC/dev/packages?publisher=Microsoft&appName=OIOUBL&versionText=17.8.27267.0&tenant=default
Downloading symbols: Microsoft_System Application_17.10.29463.0.app
Url : http://172.26.30.1:7049/BC/dev/packages?publisher=Microsoft&appName=System%20Application&versionText=17.10.0.0&tenant=default
Downloading symbols: Microsoft_Base Application_17.10.29463.0.app
Url : http://172.26.30.1:7049/BC/dev/packages?publisher=Microsoft&appName=Base%20Application&versionText=17.10.0.0&tenant=default
Compiling...
.\alc.exe /project:"c:\sources\eVattanApp" /packagecachepath:"c:\sources\.packages" /out:"c:\sources\.output\Formula_eVattan_1.0.384.0.app" /assemblyprobingpaths:"c:\sources\eVattanApp\.netpackages","C:\Program Files (x86)\Microsoft Dynamics NAV\170\RoleTailored Client","C:\Program Files\Microsoft Dynamics NAV\170\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 6.6.7.28305
Copyright (C) Microsoft Corporation. All rights reserved

Compilation started for project 'eVattan' containing '240' files at '15:52:21.416'.

##[warning]c:\sources\eVattanApp\src\page\WSVendor.Page.al(366,38): warning AL0432: Page 'Purchase Line Discounts' is marked for removal. Reason: Replaced by the new implementation (V16) of price calculation.. Tag: 16.0.
##[warning]c:\sources\eVattanApp\src\page\FSPurchInvoiceSubform.Page.al(849,37): warning AL0432: Codeunit 'Purch. Price Calc. Mgt.' is marked for removal. Reason: Replaced by the new implementation (V16) of price calculation.. Tag: 16.0.
##[warning]c:\sources\eVattanApp\src\page\FSPurchOrderSubform.Page.al(973,37): warning AL0432: Codeunit 'Purch. Price Calc. Mgt.' is marked for removal. Reason: Replaced by the new implementation (V16) of price calculation.. Tag: 16.0.
##[warning]c:\sources\eVattanApp\src\page\WSVendor.Page.al(492,44): warning AL0432: Method 'ShowItemTrackingForMasterData' is marked for removal. Reason: Replaced by ShowItemTrackingForEntity().. Tag: 17.0.
##[warning]c:\sources\eVattanApp\src\page\FSPurchCrMemoSubform.Page.al(537,25): warning AL0432: Method 'ShowDeferralSchedule' is marked for removal. Reason: Function scope will be changed to OnPrem. Tag: 15.1.
##[warning]c:\sources\eVattanApp\src\page\FSPurchCrMemoSubform.Page.al(691,25): warning AL0432: Method 'ShowDeferralSchedule' is marked for removal. Reason: Function scope will be changed to OnPrem. Tag: 15.1.
##[warning]c:\sources\eVattanApp\src\page\FSPurchInvoiceSubform.Page.al(556,25): warning AL0432: Method 'ShowDeferralSchedule' is marked for removal. Reason: Function scope will be changed to OnPrem. Tag: 15.1.
##[warning]c:\sources\eVattanApp\src\page\FSPurchInvoiceSubform.Page.al(811,25): warning AL0432: Method 'ShowDeferralSchedule' is marked for removal. Reason: Function scope will be changed to OnPrem. Tag: 15.1.
##[warning]c:\sources\eVattanApp\src\page\FSPurchOrderSubform.Page.al(621,25): warning AL0432: Method 'ShowDeferralSchedule' is marked for removal. Reason: Function scope will be changed to OnPrem. Tag: 15.1.
##[warning]c:\sources\eVattanApp\src\page\FSPurchOrderSubform.Page.al(853,25): warning AL0432: Method 'ShowDeferralSchedule' is marked for removal. Reason: Function scope will be changed to OnPrem. Tag: 15.1.

Compilation ended at '15:52:46.109'.

C:\agent\_work\4\s\.output\Formula_eVattan_1.0.384.0.app successfully created in 50 seconds
Formula_eVattan_1.0.384.0.app copied to C:\agent\_work\4\s\.packages
  _____                            _   _               _______       _     _______          _ _    _ _   
 |_   _|                          | | (_)             |__   __|     | |   |__   __|        | | |  (_) |  
   | |  _ __ ___  _ __   ___  _ __| |_ _ _ __   __ _     | | ___ ___| |_     | | ___   ___ | | | ___| |_ 
   | | | '_ ` _ \| '_ \ / _ \| '__| __| | '_ \ / _` |    | |/ _ \ __| __|    | |/ _ \ / _ \| | |/ / | __|
  _| |_| | | | | | |_) | (_) | |  | |_| | | | | (_| |    | |  __\__ \ |_     | | (_) | (_) | |   <| | |_ 
 |_____|_| |_| |_| .__/ \___/|_|   \__|_|_| |_|\__, |    |_|\___|___/\__|    |_|\___/ \___/|_|_|\_\_|\__|
                 | |                            __/ |                                                    
                 |_|                           |___/                                                     
Publishing C:\ProgramData\BcContainerHelper\Extensions\evattan\c0304c2f-5e0a-4055-8503-7d78c740cfcc\Microsoft_Test Runner.app
Synchronizing Test Runner on tenant default
Installing Test Runner on tenant default
App Microsoft_Test Runner.app successfully published
Publishing C:\ProgramData\BcContainerHelper\Extensions\evattan\20c281cc-38b1-4ca2-9597-556201ab6254\Microsoft_Any.app
Synchronizing Any on tenant default
Installing Any on tenant default
App Microsoft_Any.app successfully published
Publishing C:\ProgramData\BcContainerHelper\Extensions\evattan\0097d4df-d7c1-4530-a5c4-4eca9de7e0e2\Microsoft_Library Assert.app
Synchronizing Library Assert on tenant default
Installing Library Assert on tenant default
App Microsoft_Library Assert.app successfully published
Publishing C:\ProgramData\BcContainerHelper\Extensions\evattan\ec17cf4a-62c3-4d3c-be40-17fb3e53f279\Microsoft_Library Variable Storage.app
Synchronizing Library Variable Storage on tenant default
Installing Library Variable Storage on tenant default
App Microsoft_Library Variable Storage.app successfully published
Publishing C:\ProgramData\BcContainerHelper\Extensions\evattan\b8bac564-6d1a-4fb7-abc1-d2257dc27385\Microsoft_System Application Test Library.app
Synchronizing System Application Test Library on tenant default
Installing System Application Test Library on tenant default
App Microsoft_System Application Test Library.app successfully published
Publishing C:\ProgramData\BcContainerHelper\Extensions\evattan\5d53ce65-6c64-43b5-9f33-134c09026f91\Microsoft_Tests-TestLibraries.app
Synchronizing Tests-TestLibraries on tenant default
Installing Tests-TestLibraries on tenant default
App Microsoft_Tests-TestLibraries.app successfully published
TestToolkit successfully imported

Importing Test Toolkit took 34 seconds
   _____                      _ _ _               _           _                           
  / ____|                    (_) (_)             | |         | |                          
 | |     ___  _ __ ___  _ __  _| |_ _ __   __ _  | |_ ___ ___| |_    __ _ _ __  _ __  ___ 
 | |    / _ \| '_ ` _ \| '_ \| | | | '_ \ / _` | | __/ _ \ __| __|  / _` | '_ \| '_ \/ __|
 | |____ (_) | | | | | | |_) | | | | | | | (_| | | |_  __\__ \ |_  | (_| | |_) | |_) \__ \
  \_____\___/|_| |_| |_| .__/|_|_|_|_| |_|\__, |  \__\___|___/\__|  \__,_| .__/| .__/|___/
                       | |                 __/ |                         | |   | |        
                       |_|                |___/                          |_|   |_|        
Using Version 1.0.384.0
Using Symbols Folder: C:\agent\_work\4\s\.packages
Downloading symbols: Microsoft_Library Assert_17.10.29463.0.app
Url : http://172.26.30.1:7049/BC/dev/packages?publisher=Microsoft&appName=Library%20Assert&versionText=17.0.0.0&tenant=default
Downloading symbols: Microsoft_Any_17.10.29463.0.app
Url : http://172.26.30.1:7049/BC/dev/packages?publisher=Microsoft&appName=Any&versionText=17.0.0.0&tenant=default
Downloading symbols: Microsoft_System Application Test Library_17.10.29463.0.app
Url : http://172.26.30.1:7049/BC/dev/packages?publisher=Microsoft&appName=System%20Application%20Test%20Library&versionText=17.0.0.0&tenant=default
Adding dependency to System Application from Microsoft
Downloading symbols: Microsoft_Tests-TestLibraries_17.10.29463.0.app
Url : http://172.26.30.1:7049/BC/dev/packages?publisher=Microsoft&appName=Tests-TestLibraries&versionText=17.0.0.0&tenant=default
Adding dependency to Library Variable Storage from Microsoft
Downloading symbols: Microsoft_Test Runner_17.10.29463.0.app
Url : http://172.26.30.1:7049/BC/dev/packages?publisher=Microsoft&appName=Test%20Runner&versionText=17.0.0.0&tenant=default
Downloading symbols: Microsoft_Library Variable Storage_17.10.29463.0.app
Url : http://172.26.30.1:7049/BC/dev/packages?publisher=Microsoft&appName=Library%20Variable%20Storage&versionText=17.10.0.0&tenant=default
Compiling...
.\alc.exe /project:"c:\sources\eVattanTest" /packagecachepath:"c:\sources\.packages" /out:"c:\sources\.output\Default publisher_eVattanTest_1.0.384.0.app" /assemblyprobingpaths:"C:\Program Files (x86)\Microsoft Dynamics NAV\170\RoleTailored Client","C:\Program Files\Microsoft Dynamics NAV\170\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 6.6.7.28305
Copyright (C) Microsoft Corporation. All rights reserved

Compilation started for project 'eVattanTest' containing '1' files at '15:53:27.461'.

Compilation ended at '15:53:33.858'.

C:\agent\_work\4\s\.output\Default publisher_eVattanTest_1.0.384.0.app successfully created in 13 seconds
Default publisher_eVattanTest_1.0.384.0.app copied to C:\agent\_work\4\s\.packages

Compiling apps, test apps and importing test toolkit took 98 seconds

  _____       _     _ _     _     _                                        
 |  __ \     | |   | (_)   | |   (_)                 /\                    
 | |__) |   _| |__ | |_ ___| |__  _ _ __   __ _     /  \   _ __  _ __  ___ 
 |  ___/ | | | '_ \| | / __| '_ \| | '_ \ / _` |   / /\ \ | '_ \| '_ \/ __|
 | |   | |_| | |_) | | \__ \ | | | | | | | (_| |  / ____ \| |_) | |_) \__ \
 |_|    \__,_|_.__/|_|_|___/_| |_|_|_| |_|\__, | /_/    \_\ .__/| .__/|___/
                                           __/ |          | |   | |        
                                          |___/           |_|   |_|        

Publishing C:\ProgramData\BcContainerHelper\Extensions\evattan\332d206c-f3d3-469f-951e-fe0d04d8f19c\Formula_eVattan_1.0.384.0.app
Extension compilation failed
src/dotnet.al(10,14): error AL0451: An assembly named 'FSClientControls, Version=4.80.0.0, Culture=neutral, PublicKeyToken=dffaaf8d459b3968' could not be found in the assembly probing paths 'C:\Program Files\Microsoft Dynamics NAV\170\Service\Add-Ins, C:\Windows\TEMP\Microsoft Dynamics NAV\Add-Ins\17.0.29460.0, C:\Program Files\Microsoft Dynamics NAV\170\Service\, C:\Windows\Microsoft.NET\assembly\'
src/codeunit/FSAutoImportXMLfiles.codeunit.al(50,29): error AL0185: DotNet 'FSFileManager' is missing
src/codeunit/FSManagement.Codeunit.al(77,29): error AL0185: DotNet 'FSFileManager' is missing
src/codeunit/FSSendMail.Codeunit.al(26,22): error AL0185: DotNet 'FSMail' is missing
src/page/FSPurchaseCreditMemo.Page.al(1085,29): error AL0185: DotNet 'FSImageViewer' is missing
src/report/FSImporttextfile.Report.al(241,29): error AL0185: DotNet 'FSFileManager' is missing
src/page/FSDocEntry.Page.al(713,29): error AL0185: DotNet 'FSImageViewer' is missing
src/codeunit/FSReadsoftOnlineManagement.Codeunit.al(37,21): error AL0185: DotNet 'FSXml' is missing
src/codeunit/FSSchedulerTimer.Codeunit.al(33,30): error AL0185: DotNet 'FSNASConnector' is missing
src/codeunit/FSXMLManagement.Codeunit.al(4,21): error AL0185: DotNet 'FSXml' is missing
src/page/FSPurchaseInvoice.Page.al(1049,29): error AL0185: DotNet 'FSImageViewer' is missing
src/codeunit/FSSchedulerManagement.Codeunit.al(104,21): error AL0185: DotNet 'FSSql' is missing
src/page/FSPurchaseOrder.Page.al(1436,29): error AL0185: DotNet 'FSImageViewer' is missing
src/report/FSExportVendorstoOCR.Report.al(150,21): error AL0185: DotNet 'FSRTC' is missing
src/report/FSImporttextfile.Report.al(242,21): error AL0185: DotNet 'FSRTC' is missing
src/page/FSDocEntry.Page.al(1277,21): error AL0185: DotNet 'FSRTC' is missing
src/table/FSWebPortalSetup.Table.al(138,23): error AL0185: DotNet 'FSUtils' is missing
src/codeunit/FSXMLManagement.Codeunit.al(452,30): error AL0185: DotNet 'FSFileManager' is missing
src/codeunit/FSAutoImportXMLfiles.codeunit.al(51,23): error AL0185: DotNet 'FSUtils' is missing
src/codeunit/FSAutoImportXMLfiles.codeunit.al(82,29): error AL0185: DotNet 'FSFileManager' is missing
src/codeunit/FSAutoImportXMLfiles.codeunit.al(83,23): error AL0185: DotNet 'FSUtils' is missing
src/codeunit/FSManagement.Codeunit.al(78,23): error AL0185: DotNet 'FSUtils' is missing
src/codeunit/FSManagement.Codeunit.al(475,21): error AL0185: DotNet 'FSRTC' is missing
src/page/FSDocEntryDeleteList.Page.al(220,29): error AL0185: DotNet 'FSImageViewer' is missing
src/page/FSDocEntryPostedList.Page.al(180,29): error AL0185: DotNet 'FSImageViewer' is missing
src/page/FSPurchaseReturnOrder.Page.al(1153,29): error AL0185: DotNet 'FSImageViewer' is missing
at <ScriptBlock>, <No file>: line 40
at Invoke-ScriptInBcContainer, C:\Program Files\WindowsPowerShell\Modules\BcContainerHelper\2.0.16-preview478\ContainerHandling\Invoke-ScriptInNavContainer.ps1: line 44
at <ScriptBlock>, C:\Program Files\WindowsPowerShell\Modules\BcContainerHelper\2.0.16-preview478\AppHandling\Publish-NavContainerApp.ps1: line 263
at Publish-BcContainerApp, C:\Program Files\WindowsPowerShell\Modules\BcContainerHelper\2.0.16-preview478\AppHandling\Publish-NavContainerApp.ps1: line 123
at <ScriptBlock>, C:\Program Files\WindowsPowerShell\Modules\BcContainerHelper\2.0.16-preview478\AppHandling\Run-AlPipeline.ps1: line 528
at <ScriptBlock>, C:\Program Files\WindowsPowerShell\Modules\BcContainerHelper\2.0.16-preview478\AppHandling\Run-AlPipeline.ps1: line 1410
at <ScriptBlock>, C:\Program Files\WindowsPowerShell\Modules\BcContainerHelper\2.0.16-preview478\AppHandling\Run-AlPipeline.ps1: line 1381
at <ScriptBlock>, C:\Program Files\WindowsPowerShell\Modules\BcContainerHelper\2.0.16-preview478\AppHandling\Run-AlPipeline.ps1: line 1371
at <ScriptBlock>, C:\Program Files\WindowsPowerShell\Modules\BcContainerHelper\2.0.16-preview478\AppHandling\Run-AlPipeline.ps1: line 602
at Run-AlPipeline, C:\Program Files\WindowsPowerShell\Modules\BcContainerHelper\2.0.16-preview478\AppHandling\Run-AlPipeline.ps1: line 567
at <ScriptBlock>, C:\agent\_work\4\s\scripts\DevOps-Pipeline.ps1: line 87
at <ScriptBlock>, C:\agent\_work\_temp\6f268420-33f9-4bda-b660-6b5d94d39748.ps1: line 2
at <ScriptBlock>, <No file>: line 1
Removing container evattan
Removing evattan from container hosts file
Removing evattan-* from container hosts file
Removing C:\ProgramData\BcContainerHelper\Extensions\evattan
NOTE: The app in C:\agent\_work\4\s\eVattanApp has ShowMyCode set to true. This means that people will be able to debug and see the source code of your app. (see https://aka.ms/showMyCode)
##[error]Extension compilation failed
src/dotnet.al(10,14): error AL0451: An assembly named 'FSClientControls, Version=4.80.0.0, Culture=neutral, PublicKeyTo
ken=dffaaf8d459b3968' could not be found in the assembly probing paths 'C:\Program Files\Microsoft Dynamics NAV\170\Ser
vice\Add-Ins, C:\Windows\TEMP\Microsoft Dynamics NAV\Add-Ins\17.0.29460.0, C:\Program Files\Microsoft Dynamics NAV\170\
Service\, C:\Windows\Microsoft.NET\assembly\'
src/codeunit/FSAutoImportXMLfiles.codeunit.al(50,29): error AL0185: DotNet 'FSFileManager' is missing
src/codeunit/FSManagement.Codeunit.al(77,29): error AL0185: DotNet 'FSFileManager' is missing
src/codeunit/FSSendMail.Codeunit.al(26,22): error AL0185: DotNet 'FSMail' is missing
src/page/FSPurchaseCreditMemo.Page.al(1085,29): error AL0185: DotNet 'FSImageViewer' is missing
src/report/FSImporttextfile.Report.al(241,29): error AL0185: DotNet 'FSFileManager' is missing
src/page/FSDocEntry.Page.al(713,29): error AL0185: DotNet 'FSImageViewer' is missing
src/codeunit/FSReadsoftOnlineManagement.Codeunit.al(37,21): error AL0185: DotNet 'FSXml' is missing
src/codeunit/FSSchedulerTimer.Codeunit.al(33,30): error AL0185: DotNet 'FSNASConnector' is missing
src/codeunit/FSXMLManagement.Codeunit.al(4,21): error AL0185: DotNet 'FSXml' is missing
src/page/FSPurchaseInvoice.Page.al(1049,29): error AL0185: DotNet 'FSImageViewer' is missing
src/codeunit/FSSchedulerManagement.Codeunit.al(104,21): error AL0185: DotNet 'FSSql' is missing
src/page/FSPurchaseOrder.Page.al(1436,29): error AL0185: DotNet 'FSImageViewer' is missing
src/report/FSExportVendorstoOCR.Report.al(150,21): error AL0185: DotNet 'FSRTC' is missing
src/report/FSImporttextfile.Report.al(242,21): error AL0185: DotNet 'FSRTC' is missing
src/page/FSDocEntry.Page.al(1277,21): error AL0185: DotNet 'FSRTC' is missing
src/table/FSWebPortalSetup.Table.al(138,23): error AL0185: DotNet 'FSUtils' is missing
src/codeunit/FSXMLManagement.Codeunit.al(452,30): error AL0185: DotNet 'FSFileManager' is missing
src/codeunit/FSAutoImportXMLfiles.codeunit.al(51,23): error AL0185: DotNet 'FSUtils' is missing
src/codeunit/FSAutoImportXMLfiles.codeunit.al(82,29): error AL0185: DotNet 'FSFileManager' is missing
src/codeunit/FSAutoImportXMLfiles.codeunit.al(83,23): error AL0185: DotNet 'FSUtils' is missing
src/codeunit/FSManagement.Codeunit.al(78,23): error AL0185: DotNet 'FSUtils' is missing
src/codeunit/FSManagement.Codeunit.al(475,21): error AL0185: DotNet 'FSRTC' is missing
src/page/FSDocEntryDeleteList.Page.al(220,29): error AL0185: DotNet 'FSImageViewer' is missing
src/page/FSDocEntryPostedList.Page.al(180,29): error AL0185: DotNet 'FSImageViewer' is missing
src/page/FSPurchaseReturnOrder.Page.al(1153,29): error AL0185: DotNet 'FSImageViewer' is missing
At C:\Program Files\WindowsPowerShell\Modules\BcContainerHelper\2.0.16-preview478\ContainerHandling\Invoke-ScriptInNavC
ontainer.ps1:45 char:13
+             throw $_.Exception.Message
+             ~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : OperationStopped: (Extension compi...wer' is missing:String) [], RuntimeException
    + FullyQualifiedErrorId : Extension compilation failed
    src/dotnet.al(10,14): error AL0451: An assembly named 'FSClientControls, Version=4.80.0.0, Culture=neutral, Public 
   KeyToken=dffaaf8d459b3968' could not be found in the assembly probing paths 'C:\Program Files\Microsoft Dynamics N  
  AV\170\Service\Add-Ins, C:\Windows\TEMP\Microsoft Dynamics NAV\Add-Ins\17.0.29460.0, C:\Program Files\Microsoft Dy   
 namics NAV\170\Service\, C:\Windows\Microsoft.NET\assembly\'
src/codeunit/FSAutoImportXMLfiles.codeunit.al(50,29): error AL0185: DotNet 'FSFileManager' is missing
src/codeunit/FSManagement.Codeunit.al(77,29): error AL0185: DotNet 'FSFileManager' is missing
src/codeunit/FSSendMail.Codeunit.al(26,22): error AL0185: DotNet 'FSMail' is missing
src/page/FSPurchaseCreditMemo.Page.al(1085,29): error AL0185: DotNet 'FSImageViewer' is missing
src/report/FSImporttextfile.Report.al(241,29): error AL0185: DotNet 'FSFileManager' is missing
src/page/FSDocEntry.Page.al(713,29): error AL0185: DotNet 'FSImageViewer' is missing
src/codeunit/FSReadsoftOnlineManagement.Codeunit.al(37,21): error AL0185: DotNet 'FSXml' is missing
src/codeunit/FSSchedulerTimer.Codeunit.al(33,30): error AL0185: DotNet 'FSNASConnector' is missing
src/codeunit/FSXMLManagement.Codeunit.al(4,21): error AL0185: DotNet 'FSXml' is missing
src/page/FSPurchaseInvoice.Page.al(1049,29): error AL0185: DotNet 'FSImageViewer' is missing
src/codeunit/FSSchedulerManagement.Codeunit.al(104,21): error AL0185: DotNet 'FSSql' is missing
src/page/FSPurchaseOrder.Page.al(1436,29): error AL0185: DotNet 'FSImageViewer' is missing
src/report/FSExportVendorstoOCR.Report.al(150,21): error AL0185: DotNet 'FSRTC' is missing
src/report/FSImporttextfile.Report.al(242,21): error AL0185: DotNet 'FSRTC' is missing
src/page/FSDocEntry.Page.al(1277,21): error AL0185: DotNet 'FSRTC' is missing
src/table/FSWebPortalSetup.Table.al(138,23): error AL0185: DotNet 'FSUtils' is missing
src/codeunit/FSXMLManagement.Codeunit.al(452,30): error AL0185: DotNet 'FSFileManager' is missing
src/codeunit/FSAutoImportXMLfiles.codeunit.al(51,23): error AL0185: DotNet 'FSUtils' is missing
src/codeunit/FSAutoImportXMLfiles.codeunit.al(82,29): error AL0185: DotNet 'FSFileManager' is missing
src/codeunit/FSAutoImportXMLfiles.codeunit.al(83,23): error AL0185: DotNet 'FSUtils' is missing
src/codeunit/FSManagement.Codeunit.al(78,23): error AL0185: DotNet 'FSUtils' is missing
src/codeunit/FSManagement.Codeunit.al(475,21): error AL0185: DotNet 'FSRTC' is missing
src/page/FSDocEntryDeleteList.Page.al(220,29): error AL0185: DotNet 'FSImageViewer' is missing
src/page/FSDocEntryPostedList.Page.al(180,29): error AL0185: DotNet 'FSImageViewer' is missing
src/page/FSPurchaseReturnOrder.Page.al(1153,29): error AL0185: DotNet 'FSImageViewer' is missing
##[error]PowerShell exited with code '1'.
##[section]Finishing: Run Pipeline

...

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

image

Additional context

freddydk commented 3 years ago

That doesn't seem to be the full scripts, nor the full output of the scripts. The only thing I can see from this is that you are using NavContainerHelper, which is no longer supported (hasn't been for a long time). BcContainerHelper is the module to use - and you need to remove all containers before switching over.

dfs111 commented 3 years ago

Hi again,

sorry about that.

I have added the real script and output now.

freddydk commented 3 years ago

In order to achieve this, you would have to override the Create Container behavior. You can add a parameter -NewBcContainer to Run-AlPipeline:

Run-AlPipeline -parameter `
  -parameter `
  -NewBcContainer { Param([Hashtable]$parameters)
        New-BcContainer @parameters
        # Copy DLL's to container or share an Add-Ins folder in the line above
}

Basically this specifies a scriptblock, which Run-AlPipeline uses to create the container and now you can create the container as you see fit.

dfs111 commented 3 years ago

Hi again Freddy,

It works now :)

Thank you!

JeppeBylov commented 3 years ago

Hey @dfs111,

For kindness sake - could you share your example as an inspiration for others that also needs to include custom .dll files or scripts in Run-AlPipeline? I'm in the same boat. Would be very much appreciated.

dfs111 commented 3 years ago

Hey @dfs111,

For kindness sake - could you share your example as an inspiration for others that also needs to include custom .dll files or scripts in Run-AlPipeline? I'm in the same boat. Would be very much appreciated.

No problem here you go. @JeppeBylov I have made several other modifications, so it is not certain that this will work for you

#================================================================================
#================================================================================

$artifactUrl = Get-BCArtifactUrl -type 'OnPrem' -version 17 -country 'dk' -select 'Latest' 

#========================================================================
$parameters = @{
    "isolation" = "process"
    "accept_eula" = $true 
    "containerName" = $containerName 
    "artifactUrl" = $artifactUrl 
    "auth" = 'Windows' 
    "DesktopFolder" = 'Desktop'
    "includeTestToolkit" =$true
    "licenseFile" = $LicenseFile 
    "memoryLimit" = "8G" 
    "updateHosts" = $true
    "doNotExportObjectsToText" = $true
    "includeAL" = $true
    "shortCuts" = "DesktopFolder"
    }
$restartMe = {
    Copy-FileToNavContainer -containerName $containerName -localPath "E:\FS\FSClientControls.dll" -containerPath "c:\Program Files\Microsoft Dynamics NAV\170\Service\Add-ins\FSClientControls.dll"
    Copy-FileToNavContainer -containerName $containerName -localPath "E:\FS\FSClientControls.dll.config" -containerPath "c:\Program Files\Microsoft Dynamics NAV\170\Service\Add-ins\FSClientControls.dll.config"
    Copy-FileToNavContainer -containerName $containerName -localPath "E:\FS\FSClientControls.pdb" -containerPath "c:\Program Files\Microsoft Dynamics NAV\170\Service\Add-ins\FSClientControls.pdb"
    Copy-FileToNavContainer -containerName $containerName -localPath "E:\FS\FSClientControls.tlb" -containerPath "c:\Program Files\Microsoft Dynamics NAV\170\Service\Add-ins\FSClientControls.tlb"
    Copy-FileToNavContainer -containerName $containerName -localPath "E:\FS\FSClientLogger.dll" -containerPath "c:\Program Files\Microsoft Dynamics NAV\170\Service\Add-ins\FSClientLogger.dll"
    Copy-FileToNavContainer -containerName $containerName -localPath "E:\FS\FSClientLogger.pdb" -containerPath "c:\Program Files\Microsoft Dynamics NAV\170\Service\Add-ins\FSClientLogger.pdb"
    Copy-FileToNavContainer -containerName $containerName -localPath "E:\FS\FSEnumerators.dll" -containerPath "c:\Program Files\Microsoft Dynamics NAV\170\Service\Add-ins\FSEnumerators.dll"
    Copy-FileToNavContainer -containerName $containerName -localPath "E:\FS\FSEnumerators.pdb" -containerPath "c:\Program Files\Microsoft Dynamics NAV\170\Service\Add-ins\FSEnumerators.pdb"
    Copy-FileToNavContainer -containerName $containerName -localPath "E:\FS\FSUtilities.dll" -containerPath "c:\Program Files\Microsoft Dynamics NAV\170\Service\Add-ins\FSUtilities.dll"
    Copy-FileToNavContainer -containerName $containerName -localPath "E:\FS\FSUtilities.pdb" -containerPath "c:\Program Files\Microsoft Dynamics NAV\170\Service\Add-ins\FSUtilities.pdb"
    # Copy-FileToNavContainer -containerName $containerName -localPath "c:\sources\New folder\Microsoft.Dynamics.Nav.Timer.dll" -containerPath "c:\Program Files\Microsoft Dynamics NAV\170\Service\Add-ins\Microsoft.Dynamics.Nav.Timer.dll"
    Restart-BcContainer $containerName
}
#

#========================================================================

Run-AlPipeline @params `
    -NewBcContainer { param([hashtable]$parameters)
        New-BcContainer @parameters
        Invoke-Command -ScriptBlock $restartMe 
    } `
    -pipelinename $pipelineName `
    -containerName $containerName `
    -imageName $imageName `
    -environment $environmentName `
    -artifact $artifactUrl `
    -memoryLimit $memoryLimit `
    -baseFolder $baseFolder `
    -licenseFile $LicenseFile `
    -installApps $installApps `
    -installTestApps $installTestApps `
    -previousApps $previousApps `
    -appFolders $appFolders `
    -testFolders $testFolders `
    -doNotRunTests:$doNotRunTests `
    -testResultsFile $testResultsFile `
    -testResultsFormat 'JUnit' `
    -installTestRunner:$installTestRunner `
    -installTestFramework:$installTestFramework `
    -installTestLibraries:$installTestLibraries `
    -installPerformanceToolkit:$installPerformanceToolkit `
    -enableCodeCop:$enableCodeCop `
    -enableAppSourceCop:$enableAppSourceCop `
    -enablePerTenantExtensionCop:$enablePerTenantExtensionCop `
    -enableUICop:$enableUICop `
    -azureDevOps:($environment -eq 'AzureDevOps') `
    -gitLab:($environment -eq 'GitLab') `
    -gitHubActions:($environment -eq 'GitHubActions') `
    -failOn 'error' `
    -AppSourceCopMandatoryAffixes $appSourceCopMandatoryAffixes `
    -AppSourceCopSupportedCountries $appSourceCopSupportedCountries `
    -additionalCountries $additionalCountries `
    -buildArtifactFolder $buildArtifactFolder `
    -CreateRuntimePackages:$CreateRuntimePackages `
    -appBuild $appBuild -appRevision $appRevision

#================================================================================
#================================================================================