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

RunAlPipeline sometimes fails with error AL0445 when two reports use the same layout #2631

Closed achim-t closed 1 year ago

achim-t commented 2 years ago

Describe the issue I have two reports which use the same rdlc-layout. Building in VS Code works. When running in DevOps the build fails with error AL0445: The file 'src/report/CommissionStatement.rdlc' is opened in another application.

Full output of scripts

2022-08-04T08:28:12.1031928Z ##[section]Starting: Run Pipeline
2022-08-04T08:28:12.1308122Z ==============================================================================
2022-08-04T08:28:12.1308723Z Task         : PowerShell
2022-08-04T08:28:12.1309205Z Description  : Run a PowerShell script on Linux, macOS, or Windows
2022-08-04T08:28:12.1309683Z Version      : 2.200.0
2022-08-04T08:28:12.1310070Z Author       : Microsoft Corporation
2022-08-04T08:28:12.1310749Z Help         : https://docs.microsoft.com/azure/devops/pipelines/tasks/utility/powershell
2022-08-04T08:28:12.1311436Z ==============================================================================
2022-08-04T08:28:13.8777634Z Generating script.
2022-08-04T08:28:13.8850177Z Formatted command: . 'C:\agent\_work\442\s\scripts\DevOps-Pipeline.ps1' -environment "AzureDevOps" -version "current" -appBuild 11860 -appRevision 0
2022-08-04T08:28:13.9348995Z ========================== Starting Command Output ===========================
2022-08-04T08:28:13.9683798Z ##[command]"C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe" -NoLogo -NoProfile -NonInteractive -ExecutionPolicy Unrestricted -Command ". 'C:\agent\_work\_temp\e850781b-91f8-4414-9517-75487e7f48de.ps1'"
2022-08-04T08:28:14.8213925Z Set artifact = ///de/
2022-08-04T08:28:14.8253521Z Set pipelineName = LeBit365 Provision-current
2022-08-04T08:28:14.8326950Z Set containerName = lvserver19-lebit365provision-current
2022-08-04T08:28:14.8553720Z Set installApps = ''
2022-08-04T08:28:14.8569954Z Set installTestApps = ''
2022-08-04T08:28:14.8606357Z Set previousApps = '\\lbserver20\Software_Business\apps\LeBit365_Provisionsmodul\latest.zip'
2022-08-04T08:28:14.8644109Z Set appSourceCopMandatoryAffixes = 'lbt com'
2022-08-04T08:28:14.8660439Z Set appSourceCopSupportedCountries = ''
2022-08-04T08:28:14.8695197Z Set appFolders = 'app'
2022-08-04T08:28:14.8731398Z Set testFolders = 'test'
2022-08-04T08:28:14.8747675Z Set memoryLimit = ''
2022-08-04T08:28:14.8766850Z Set additionalCountries = ''
2022-08-04T08:28:14.8783904Z Set genericImageName = ''
2022-08-04T08:28:14.8802304Z Set vaultNameForLocal = ''
2022-08-04T08:28:14.8829319Z Set bcContainerHelperVersion = ''
2022-08-04T08:28:14.8853778Z Set licenseFile = ''
2022-08-04T08:28:14.8915781Z Set rulesetFile = 'scripts/lebit.ruleset.json'
2022-08-04T08:28:15.3883058Z Searching \\lbserver20\Software_Business\apps\LeBit365_Provisionsmodul\latest.zip
2022-08-04T08:28:15.4171486Z Found \\lbserver20\Software_Business\apps\LeBit365_Provisionsmodul\latest.zip
2022-08-04T08:28:15.4322749Z Set installTestRunner = True
2022-08-04T08:28:15.4410258Z Set installTestFramework = True
2022-08-04T08:28:15.4473018Z Set installTestLibraries = True
2022-08-04T08:28:15.4495621Z Set installPerformanceToolkit = False
2022-08-04T08:28:15.4556943Z Set enableCodeCop = True
2022-08-04T08:28:15.4617572Z Set enableAppSourceCop = True
2022-08-04T08:28:15.4677975Z Set enablePerTenantExtensionCop = False
2022-08-04T08:28:15.4738536Z Set enableUICop = True
2022-08-04T08:28:15.4799003Z Set enableBcLntrCop = True
2022-08-04T08:28:15.4823091Z Set doNotSignApps = False
2022-08-04T08:28:15.4846581Z Set doNotRunTests = False
2022-08-04T08:28:15.4870835Z Set cacheImage = False
2022-08-04T08:28:15.4931496Z Set CreateRuntimePackages = True
2022-08-04T08:28:16.3885659Z BcContainerHelper version 3.0.11
2022-08-04T08:28:16.4502991Z Setting hostHelperFolder = C:\ProgramData\BcContainerHelper
2022-08-04T08:28:16.4612142Z Setting genericImageName = mcr.microsoft.com/businesscentral:{0}
2022-08-04T08:28:16.4700760Z Setting bcartifactsCacheFolder = c:\bcartifacts.cache
2022-08-04T08:28:16.8132537Z BcContainerHelper emits usage statistics telemetry to Microsoft
2022-08-04T08:28:23.1690222Z Determining artifacts to use
2022-08-04T08:28:51.4729342Z   _____                               _                
2022-08-04T08:28:51.4747179Z  |  __ \                             | |               
2022-08-04T08:28:51.4765554Z  | |__) |_ _ _ __ __ _ _ __ ___   ___| |_ ___ _ __ ___ 
2022-08-04T08:28:51.4781629Z  |  ___/ _` | '__/ _` | '_ ` _ \ / _ \ __/ _ \ '__/ __|
2022-08-04T08:28:51.4796357Z  | |  | (_| | | | (_| | | | | | |  __/ |_  __/ |  \__ \
2022-08-04T08:28:51.4812927Z  |_|   \__,_|_|  \__,_|_| |_| |_|\___|\__\___|_|  |___/
2022-08-04T08:28:51.4822645Z 
2022-08-04T08:28:51.4840124Z Pipeline name               LeBit365 Provision-current
2022-08-04T08:28:51.4858352Z Container name              lvserver19-lebit365provision-current
2022-08-04T08:28:51.4875129Z Image name                  
2022-08-04T08:28:51.4892025Z ArtifactUrl                 https://bcartifacts.azureedge.net/sandbox/20.3.42673.44596/de
2022-08-04T08:28:51.4907844Z SasToken                    Not Specified
2022-08-04T08:28:51.4924917Z BcAuthContext               Not Specified
2022-08-04T08:28:51.4941471Z Environment                 
2022-08-04T08:28:51.4958162Z ReUseContainer              False
2022-08-04T08:28:51.4976090Z KeepContainer               False
2022-08-04T08:28:51.4991951Z Auth                        UserPassword
2022-08-04T08:28:51.5164351Z Credential                  ***/Fyxo0119
2022-08-04T08:28:51.5198308Z CompanyName                     
2022-08-04T08:28:51.5218501Z MemoryLimit                     8G
2022-08-04T08:28:51.5239594Z Enable Task Scheduler           False
2022-08-04T08:28:51.5261197Z Assign Premium Plan             False
2022-08-04T08:28:51.5281571Z Install Test Runner             True
2022-08-04T08:28:51.5302277Z Install Test Framework          True
2022-08-04T08:28:51.5322307Z Install Test Libraries          True
2022-08-04T08:28:51.5342428Z Install Perf. Toolkit           False
2022-08-04T08:28:51.5362311Z InstallOnlyReferencedApps       False
2022-08-04T08:28:51.5382780Z generateDependencyArtifact      False
2022-08-04T08:28:51.5403849Z CopySymbolsFromContainer        False
2022-08-04T08:28:51.5423953Z enableCodeCop                   True
2022-08-04T08:28:51.5445122Z enableAppSourceCop              True
2022-08-04T08:28:51.5465641Z enableUICop                     True
2022-08-04T08:28:51.5487146Z enablePerTenantExtensionCop     False
2022-08-04T08:28:51.5507660Z doNotPerformUpgrade             False
2022-08-04T08:28:51.5528922Z doNotPublishApps                False
2022-08-04T08:28:51.5550204Z uninstallRemovedApps            False
2022-08-04T08:28:51.5572286Z escapeFromCops                  False
2022-08-04T08:28:51.5592550Z doNotBuildTests                 False
2022-08-04T08:28:51.5612749Z doNotRunTests                   False
2022-08-04T08:28:51.5633457Z doNotRunBcptTests               False
2022-08-04T08:28:51.5654321Z useDefaultAppSourceRuleSet      False
2022-08-04T08:28:51.5675115Z rulesetFile                     C:\agent\_work\442\s\scripts\lebit.ruleset.json
2022-08-04T08:28:51.5697395Z azureDevOps                     True
2022-08-04T08:28:51.5717551Z gitLab                          False
2022-08-04T08:28:51.5737768Z gitHubActions                   False
2022-08-04T08:28:51.5760139Z License file                    Specified
2022-08-04T08:28:51.5781399Z CodeSignCertPfxFile             Specified
2022-08-04T08:28:51.5820731Z CodeSignCertPfxPassword         Specified
2022-08-04T08:28:51.5896679Z CodeSignCertIsSelfSigned        False
2022-08-04T08:28:51.5921801Z KeyVaultCertPfxFile             Not specified
2022-08-04T08:28:51.5946275Z KeyVaultCertPfxPassword         Not specified
2022-08-04T08:28:51.5963304Z KeyVaultClientId                
2022-08-04T08:28:51.5978767Z BuildOutputFile                 
2022-08-04T08:28:51.5996522Z TestResultsFile                 C:\agent\_work\442\s\TestResults.xml
2022-08-04T08:28:51.6018330Z BcptTestResultsFile             C:\agent\_work\442\s\bcptTestResults.json
2022-08-04T08:28:51.6038976Z TestResultsFormat               JUnit
2022-08-04T08:28:51.6090294Z AdditionalCountries             
2022-08-04T08:28:51.6110162Z PackagesFolder                  C:\agent\_work\442\s\.packages
2022-08-04T08:28:51.6131652Z OutputFolder                    C:\agent\_work\442\s\.output
2022-08-04T08:28:51.6152454Z BuildArtifactFolder             C:\agent\_work\442\a
2022-08-04T08:28:51.6173799Z CreateRuntimePackages           True
2022-08-04T08:28:51.6191317Z AppVersion                      
2022-08-04T08:28:51.6216584Z AppBuild                        11860
2022-08-04T08:28:51.6246166Z AppRevision                     0
2022-08-04T08:28:51.6278091Z Mandatory Affixes               lbt com
2022-08-04T08:28:51.6301169Z Supported Countries             
2022-08-04T08:28:51.6325350Z ObsoleteTagMinAllowedMajorMinor 
2022-08-04T08:28:51.6342254Z Install Apps
2022-08-04T08:28:51.6358631Z - None
2022-08-04T08:28:51.6375356Z Install Test Apps
2022-08-04T08:28:51.6391988Z - None
2022-08-04T08:28:51.6408638Z Previous Apps
2022-08-04T08:28:51.6425688Z - \\lbserver20\Software_Business\apps\LeBit365_Provisionsmodul\latest.zip
2022-08-04T08:28:51.6442142Z Application folders
2022-08-04T08:28:51.6460663Z - C:\agent\_work\442\s\app
2022-08-04T08:28:51.6477089Z Test application folders
2022-08-04T08:28:51.6521830Z - C:\agent\_work\442\s\test
2022-08-04T08:28:51.6524937Z BCPT Test application folders
2022-08-04T08:28:51.6530745Z - None
2022-08-04T08:28:51.6547439Z Custom CodeCops
2022-08-04T08:28:51.6565475Z - C:\agent\_work\442\s\BCLinterCop.dll
2022-08-04T08:28:51.6628519Z NewBccontainer override
2022-08-04T08:28:51.6694201Z  
2022-08-04T08:28:51.6710634Z     
2022-08-04T08:28:51.6729234Z     Param([Hashtable]$parameters) 
2022-08-04T08:28:51.6737910Z 
2022-08-04T08:28:51.6755443Z     $items = Get-ChildItem -Path $baseFolder -Recurse -Filter "*.dll"
2022-08-04T08:28:51.6763777Z 
2022-08-04T08:28:51.6789598Z     $dllFolder = Join-Path $ENV:AGENT_HOMEDIRECTORY "dlls"
2022-08-04T08:28:51.6801202Z     if (-not (Test-Path $dllFolder)) {
2022-08-04T08:28:51.6818113Z         New-Item -ItemType Directory -Path $dllFolder
2022-08-04T08:28:51.6836401Z     }
2022-08-04T08:28:51.6853581Z     if ($items.Count -gt 0) {
2022-08-04T08:28:51.6870767Z         $items | ForEach-Object {
2022-08-04T08:28:51.6888025Z             if (-not (Test-Path (Join-Path $dllFolder $_.Name) -PathType Leaf)) {
2022-08-04T08:28:51.6904395Z                 Copy-Item $_.FullName -Destination $dllFolder
2022-08-04T08:28:51.6920927Z             }
2022-08-04T08:28:51.6937713Z         }
2022-08-04T08:28:51.6955294Z         $parameters.additionalParameters += @("--volume $($dllFolder):c:\run\Add-Ins\mydlls")
2022-08-04T08:28:51.6971793Z     }   
2022-08-04T08:28:51.6989230Z     $parameters.additionalParameters += @("--env customWebSettings=AuthenticateServer=false")
2022-08-04T08:28:51.7005920Z     
2022-08-04T08:28:51.7023310Z     New-BcContainer @parameters
2022-08-04T08:28:51.7040445Z     Invoke-ScriptInBcContainer $parameters.ContainerName -scriptblock { 
2022-08-04T08:28:51.7057109Z         $progressPreference = 'SilentlyContinue' 
2022-08-04T08:28:51.7074139Z     }
2022-08-04T08:28:51.7082732Z 
2022-08-04T08:28:51.7100681Z CompileAppInBcContainer override
2022-08-04T08:28:51.7109059Z 
2022-08-04T08:28:51.7126857Z     Param([Hashtable]$parameters) 
2022-08-04T08:28:51.7135347Z 
2022-08-04T08:28:51.7153095Z     $appJsonFile = Join-Path $parameters.appProjectFolder "app.json"
2022-08-04T08:28:51.7169548Z     $appJson = Get-Content $appJsonFile | ConvertFrom-Json
2022-08-04T08:28:51.7187647Z     if ($appJson.preprocessorSymbols) {
2022-08-04T08:28:51.7205491Z         $appJson.preprocessorSymbols = @()
2022-08-04T08:28:51.7223043Z         $appJson | ConvertTo-Json -Depth 99 | Set-Content $appJsonFile
2022-08-04T08:28:51.7239790Z     }
2022-08-04T08:28:51.7256815Z     
2022-08-04T08:28:51.7273905Z     Compile-AppInBcContainer @parameters    
2022-08-04T08:28:51.7282216Z 
2022-08-04T08:28:51.7291045Z 
2022-08-04T08:28:51.7307800Z   _____       _ _ _                                          _        _                            
2022-08-04T08:28:51.7325000Z  |  __ \     | | (_)                                        (_)      (_)                           
2022-08-04T08:28:51.7342236Z  | |__) |   _| | |_ _ __   __ _    __ _  ___ _ __   ___ _ __ _  ___   _ _ __ ___   __ _  __ _  ___ 
2022-08-04T08:28:51.7359118Z  |  ___/ | | | | | | '_ \ / _` |  / _` |/ _ \ '_ \ / _ \ '__| |/ __| | | '_ ` _ \ / _` |/ _` |/ _ \
2022-08-04T08:28:51.7376699Z  | |   | |_| | | | | | | | (_| | | (_| |  __/ | | |  __/ |  | | (__  | | | | | | | (_| | (_| |  __/
2022-08-04T08:28:51.7393726Z  |_|    \__,_|_|_|_|_| |_|\__, |  \__, |\___|_| |_|\___|_|  |_|\___| |_|_| |_| |_|\__,_|\__, |\___|
2022-08-04T08:28:51.7410018Z                            __/ |   __/ |                                                 __/ |     
2022-08-04T08:28:51.7427360Z                           |___/   |___/                                                 |___/      
2022-08-04T08:28:51.7436537Z 
2022-08-04T08:28:53.2802562Z Pulling mcr.microsoft.com/businesscentral:10.0.17763.2686
2022-08-04T08:28:53.9043219Z 
2022-08-04T08:28:53.9062993Z Pulling generic image took 2 seconds
2022-08-04T08:28:53.9313808Z 
2022-08-04T08:28:53.9332300Z    _____                _   _                               _        _                 
2022-08-04T08:28:53.9349141Z   / ____|              | | (_)                             | |      (_)                
2022-08-04T08:28:53.9367088Z  | |     _ __ ___  __ _| |_ _ _ __   __ _    ___ ___  _ __ | |_ __ _ _ _ __   ___ _ __ 
2022-08-04T08:28:53.9385018Z  | |    | '__/ _ \/ _` | __| | '_ \ / _` |  / __/ _ \| '_ \| __/ _` | | '_ \ / _ \ '__|
2022-08-04T08:28:53.9402327Z  | |____| | |  __/ (_| | |_| | | | | (_| | | (__ (_) | | | | |_ (_| | | | | |  __/ |   
2022-08-04T08:28:53.9418964Z   \_____|_|  \___|\__,_|\__|_|_| |_|\__, |  \___\___/|_| |_|\__\__,_|_|_| |_|\___|_|   
2022-08-04T08:28:53.9435980Z                                      __/ |                                             
2022-08-04T08:28:53.9453352Z                                     |___/                                              
2022-08-04T08:28:53.9462735Z 
2022-08-04T08:28:55.0265978Z WARNING: Container name should not exceed 15 characters
2022-08-04T08:28:55.7907899Z BcContainerHelper is version 3.0.11
2022-08-04T08:28:55.7923189Z BcContainerHelper is running as ***istrator
2022-08-04T08:28:57.8398464Z Hyper-V is Disabled
2022-08-04T08:28:57.8469747Z UsePsSession is True
2022-08-04T08:28:57.8527909Z Host is Microsoft Windows Server 2019 Standard - ltsc2019
2022-08-04T08:28:58.1049960Z Docker Client Version is 19.03.4
2022-08-04T08:28:58.1107560Z Docker Server Version is 19.03.4
2022-08-04T08:28:59.0537276Z Removing Desktop shortcuts
2022-08-04T08:28:59.8612815Z Fetching all docker images
2022-08-04T08:29:00.1540449Z Fetching all docker volumes
2022-08-04T08:29:00.8652624Z Using image mcr.microsoft.com/businesscentral:10.0.17763.2686
2022-08-04T08:29:01.7906291Z Creating Container lvserver19-lebit365provision-current
2022-08-04T08:29:01.7918571Z Style: sandbox
2022-08-04T08:29:01.7939720Z Multitenant: Yes
2022-08-04T08:29:01.7971446Z Version: 20.3.42673.44596
2022-08-04T08:29:01.7990500Z Platform: 20.0.42653.44568
2022-08-04T08:29:01.8010686Z Generic Tag: 1.0.2.10
2022-08-04T08:29:01.8111888Z Container OS Version: 10.0.17763.2686 (ltsc2019)
2022-08-04T08:29:01.8129488Z Host OS Version: 10.0.17763.2686 (ltsc2019)
2022-08-04T08:29:01.8283762Z Using process isolation
2022-08-04T08:29:01.8391154Z Using locale de-DE
2022-08-04T08:29:01.8490883Z Disabling the standard eventlog dump to container log every 2 seconds (use -dumpEventLog to enable)
2022-08-04T08:29:01.9297301Z Downloading C:\ProgramData\BcContainerHelper\Extensions\lvserver19-lebit365provision-current\Microsoft.VisualStudio.Services.VSIXPackage.vsix
2022-08-04T08:29:12.9123810Z Using license file https://devlbstorage.blob.core.windows.net/files/4804634%20LeBit%20Dev%2020%20BC%20on%20premises%20DE%20610%20ISV%2014.06.22.flf
2022-08-04T08:29:12.9213360Z Downloading C:\ProgramData\BcContainerHelper\Extensions\lvserver19-lebit365provision-current\my\license.flf
2022-08-04T08:29:13.1665075Z Additional Parameters:
2022-08-04T08:29:13.1687737Z --volume "C:\agent\_work\442\s:c:\sources"
2022-08-04T08:29:13.1704415Z --volume C:\agent\dlls:c:\run\Add-Ins\mydlls
2022-08-04T08:29:13.1726168Z --env customWebSettings=AuthenticateServer=false
2022-08-04T08:29:13.1746777Z --env customNavSettings=EnableTaskScheduler=False
2022-08-04T08:29:13.1764915Z Files in C:\ProgramData\BcContainerHelper\Extensions\lvserver19-lebit365provision-current\my:
2022-08-04T08:29:13.1807930Z - AdditionalOutput.ps1
2022-08-04T08:29:13.1825360Z - license.flf
2022-08-04T08:29:13.1843745Z - MainLoop.ps1
2022-08-04T08:29:13.1862214Z - SetupVariables.ps1
2022-08-04T08:29:13.1884152Z - updatehosts.ps1
2022-08-04T08:29:13.1902255Z Creating container lvserver19-lebit365provision-current from image mcr.microsoft.com/businesscentral:10.0.17763.2686
2022-08-04T08:29:13.6248916Z 9c96159d88b74ac10e7a1d8114eb61465393431bf8b429e2b44b65da8b666ebe
2022-08-04T08:29:17.2106128Z Waiting for container lvserver19-lebit365provision-current to be ready
2022-08-04T08:29:25.3724761Z Adding LVSERVER19-LEBI to hosts file
2022-08-04T08:29:25.3739433Z Using artifactUrl https://bcartifacts.azureedge.net/sandbox/20.3.42673.44596/de
2022-08-04T08:29:26.7315280Z Using installer from C:\Run\150-new
2022-08-04T08:29:26.7326968Z Installing Business Central
2022-08-04T08:29:26.7338146Z Installing from artifacts
2022-08-04T08:29:32.0888753Z Starting Local SQL Server
2022-08-04T08:29:32.0904132Z Starting Internet Information Server
2022-08-04T08:29:32.0920437Z Copying Service Tier Files
2022-08-04T08:29:34.7167364Z c:\dl\sandbox\20.3.42673.44596\platform\ServiceTier\Program Files
2022-08-04T08:29:34.7182107Z c:\dl\sandbox\20.3.42673.44596\platform\ServiceTier\System64Folder
2022-08-04T08:29:34.7193701Z Copying PowerShell Scripts
2022-08-04T08:29:34.7207510Z c:\dl\sandbox\20.3.42673.44596\platform\WindowsPowerShellScripts\Cloud\NAVAdministration
2022-08-04T08:29:34.7223340Z c:\dl\sandbox\20.3.42673.44596\platform\WindowsPowerShellScripts\WebSearch
2022-08-04T08:29:34.7239518Z Copying Web Client Files
2022-08-04T08:29:38.7519215Z c:\dl\sandbox\20.3.42673.44596\platform\WebClient\Microsoft Dynamics NAV
2022-08-04T08:29:38.7544494Z Copying Client Files
2022-08-04T08:29:40.1099366Z c:\dl\sandbox\20.3.42673.44596\platform\LegacyDlls\program files\Microsoft Dynamics NAV
2022-08-04T08:29:40.1113342Z c:\dl\sandbox\20.3.42673.44596\platform\LegacyDlls\program files\Microsoft Dynamics NAV
2022-08-04T08:29:40.1130790Z c:\dl\sandbox\20.3.42673.44596\platform\LegacyDlls\systemFolder
2022-08-04T08:29:40.1147691Z Copying ModernDev Files
2022-08-04T08:29:40.1163529Z c:\dl\sandbox\20.3.42673.44596\platform
2022-08-04T08:29:41.4692542Z c:\dl\sandbox\20.3.42673.44596\platform\ModernDev\program files\Microsoft Dynamics NAV
2022-08-04T08:29:41.4704760Z Copying additional files
2022-08-04T08:29:41.4717944Z Copying ConfigurationPackages
2022-08-04T08:29:41.4731422Z C:\dl\sandbox\20.3.42673.44596\de\ConfigurationPackages
2022-08-04T08:29:41.4744527Z Copying Test Assemblies
2022-08-04T08:29:41.4758391Z C:\dl\sandbox\20.3.42673.44596\platform\Test Assemblies
2022-08-04T08:29:41.4771924Z Copying Extensions
2022-08-04T08:29:42.8781652Z C:\dl\sandbox\20.3.42673.44596\de\Extensions
2022-08-04T08:29:42.8799807Z Copying Applications
2022-08-04T08:29:44.2812958Z C:\dl\sandbox\20.3.42673.44596\platform\Applications
2022-08-04T08:29:44.2830072Z Copying Applications.DE
2022-08-04T08:29:44.3427006Z C:\dl\sandbox\20.3.42673.44596\de\Applications.DE
2022-08-04T08:29:44.3444855Z Copying dependencies
2022-08-04T08:30:13.1525103Z Copying ReportBuilder
2022-08-04T08:30:16.1116717Z Importing PowerShell Modules
2022-08-04T08:30:23.7897273Z Restoring CRONUS Demo Database
2022-08-04T08:30:26.7369866Z Setting CompatibilityLevel for tenant on localhost\SQLEXPRESS
2022-08-04T08:31:42.8520775Z Exporting Application to CRONUS
2022-08-04T08:31:56.1198346Z Removing Application from tenant
2022-08-04T08:31:56.1212969Z Modifying Business Central Service Tier Config File for Docker
2022-08-04T08:31:56.1228348Z Creating Business Central Service Tier
2022-08-04T08:31:56.1244191Z Installing SIP crypto provider: 'C:\Windows\System32\NavSip.dll'
2022-08-04T08:32:23.4964895Z Starting Business Central Service Tier
2022-08-04T08:32:24.9318940Z Importing license file
2022-08-04T08:32:24.9336002Z Copying Database on localhost\SQLEXPRESS from tenant to default
2022-08-04T08:32:24.9354419Z Taking database tenant offline
2022-08-04T08:32:32.7441726Z Copying database files
2022-08-04T08:32:35.5434312Z Attaching files as new Database default
2022-08-04T08:32:35.5450728Z Putting database tenant back online
2022-08-04T08:32:35.5465946Z Mounting tenant database
2022-08-04T08:35:38.5320478Z Mounting Database for default on server localhost\SQLEXPRESS with AllowAppDatabaseWrite = False
2022-08-04T08:35:39.9866742Z Sync'ing Tenant
2022-08-04T08:35:39.9881115Z Tenant is Operational
2022-08-04T08:35:39.9895809Z Stopping Business Central Service Tier
2022-08-04T08:35:39.9910581Z Installation took 374 seconds
2022-08-04T08:35:39.9922530Z Installation complete
2022-08-04T08:35:39.9934965Z Initializing...
2022-08-04T08:35:39.9947079Z Setting host.containerhelper.internal to 172.17.112.1 in container hosts file
2022-08-04T08:35:39.9959244Z Starting Container
2022-08-04T08:35:39.9972278Z Hostname is lvserver19-lebit365provision-current
2022-08-04T08:35:42.7922671Z PublicDnsName is lvserver19-lebit365provision-current
2022-08-04T08:35:42.7938262Z Using NavUserPassword Authentication
2022-08-04T08:35:44.1469257Z Creating Self Signed Certificate
2022-08-04T08:35:44.1488921Z Self Signed Certificate Thumbprint 4F62D7B25CA62AD5651471173D78E6B497716AF9
2022-08-04T08:35:44.1505815Z DNS identity lvserver19-lebit365provision-current
2022-08-04T08:35:44.1522290Z Modifying Service Tier Config File with Instance Specific Settings
2022-08-04T08:35:44.1538245Z Modifying Service Tier Config File with settings from environment variable
2022-08-04T08:35:45.4714733Z Setting EnableTaskScheduler to False
2022-08-04T08:36:06.0439582Z Starting Service Tier
2022-08-04T08:36:06.0453889Z Registering event sources
2022-08-04T08:36:07.4789102Z Creating DotNetCore Web Server Instance
2022-08-04T08:36:07.4805683Z Using application pool name: BC
2022-08-04T08:36:07.4822018Z Using default container name: NavWebApplicationContainer
2022-08-04T08:36:10.2471527Z Copy files to WWW root C:\inetpub\wwwroot\BC
2022-08-04T08:36:11.6089250Z Create the application pool BC
2022-08-04T08:36:12.9594125Z Create website: NavWebApplicationContainer without SSL
2022-08-04T08:36:12.9605095Z Update configuration: navsettings.json
2022-08-04T08:36:12.9616662Z Done Configuring Web Client
2022-08-04T08:36:12.9629282Z Modifying Web Client config with settings from environment variable
2022-08-04T08:36:12.9641203Z Setting AuthenticateServer to false
2022-08-04T08:36:12.9652916Z Enabling Financials User Experience
2022-08-04T08:36:12.9665058Z Using license file 'c:\run\my\license.flf'
2022-08-04T08:36:17.0223749Z Import License
2022-08-04T08:36:18.4272044Z Dismounting Tenant
2022-08-04T08:36:18.4291856Z Mounting Tenant
2022-08-04T08:37:45.0379139Z Mounting Database for default on server localhost\SQLEXPRESS with AllowAppDatabaseWrite = False
2022-08-04T08:37:45.0393996Z Sync'ing Tenant
2022-08-04T08:37:45.0409666Z Tenant is Operational
2022-08-04T08:37:46.5493322Z Creating http download site
2022-08-04T08:37:46.5506206Z Setting SA Password and enabling SA
2022-08-04T08:37:54.0931522Z Creating *** as SQL User and add to sys***
2022-08-04T08:38:14.9190128Z Creating SUPER user
2022-08-04T08:38:14.9209128Z Container IP Address: 172.17.121.187
2022-08-04T08:38:14.9228609Z Container Hostname  : lvserver19-lebit365provision-current
2022-08-04T08:38:14.9246606Z Container Dns Name  : lvserver19-lebit365provision-current
2022-08-04T08:38:14.9266026Z Web Client          : http://lvserver19-lebit365provision-current/BC/?tenant=default
2022-08-04T08:38:14.9286528Z Dev. Server         : http://lvserver19-lebit365provision-current
2022-08-04T08:38:14.9309104Z Dev. ServerInstance : BC
2022-08-04T08:38:14.9331834Z Dev. Server Tenant  : default
2022-08-04T08:38:14.9351194Z Setting lvserver19-lebit365provision-current to 172.17.121.187 in host hosts file
2022-08-04T08:38:14.9371342Z Setting lvserver19-lebit365provision-current-default to 172.17.121.187 in host hosts file
2022-08-04T08:38:14.9389670Z Setting lvserver19-lebit365provision-current-default to 172.17.121.187 in container hosts file
2022-08-04T08:38:14.9397704Z 
2022-08-04T08:38:14.9415206Z Files:
2022-08-04T08:38:14.9436571Z http://lvserver19-lebit365provision-current:8080/Microsoft.VisualStudio.Services.VSIXPackage.vsix
2022-08-04T08:38:14.9446246Z 
2022-08-04T08:38:14.9466623Z WARNING: You are running a container which is 146 days old.
2022-08-04T08:38:14.9484008Z Microsoft recommends that you always run the latest version of our containers.
2022-08-04T08:38:14.9492636Z 
2022-08-04T08:38:14.9511523Z Container Total Physical Memory is 28.0Gb
2022-08-04T08:38:14.9531081Z Container Free Physical Memory is 14.2Gb
2022-08-04T08:38:14.9540330Z 
2022-08-04T08:38:14.9559788Z Initialization took 156 seconds
2022-08-04T08:38:14.9578677Z Ready for connections!
2022-08-04T08:38:16.2199868Z Reading CustomSettings.config from lvserver19-lebit365provision-current
2022-08-04T08:38:17.8348635Z Creating Desktop Shortcuts for lvserver19-lebit365provision-current
2022-08-04T08:38:18.0417088Z Container lvserver19-lebit365provision-current successfully created
2022-08-04T08:38:18.4344002Z 
2022-08-04T08:38:18.4365724Z Use:
2022-08-04T08:38:18.4395765Z Get-BcContainerEventLog -containerName lvserver19-lebit365provision-current to retrieve a snapshot of the event log from the container
2022-08-04T08:38:18.4427429Z Get-BcContainerDebugInfo -containerName lvserver19-lebit365provision-current to get debug information about the container
2022-08-04T08:38:18.4463788Z Enter-BcContainer -containerName lvserver19-lebit365provision-current to open a PowerShell prompt inside the container
2022-08-04T08:38:18.4496392Z Remove-BcContainer -containerName lvserver19-lebit365provision-current to remove the container again
2022-08-04T08:38:18.4528707Z docker logs lvserver19-lebit365provision-current to retrieve information about URL's again
2022-08-04T08:38:19.5332732Z 
2022-08-04T08:38:19.5352644Z Creating container took 566 seconds
2022-08-04T08:38:19.5361700Z 
2022-08-04T08:38:19.5382338Z  _____                _       _                   _                           _                 _          
2022-08-04T08:38:19.5399811Z |  __ \              | |     (_)                 | |                         | |               (_)         
2022-08-04T08:38:19.5417579Z | |__) |___ ___  ___ | |_   ___ _ __   __ _    __| | ___ _ __   ___ _ __   __| | ___ _ __   ___ _  ___ ___ 
2022-08-04T08:38:19.5435299Z |  _  // _ \ __|/ _ \| \ \ / / | '_ \ / _` |  / _` |/ _ \ '_ \ / _ \ '_ \ / _` |/ _ \ '_ \ / __| |/ _ \ __|
2022-08-04T08:38:19.5452172Z | | \ \  __\__ \ (_) | |\ V /| | | | | (_| | | (_| |  __/ |_) |  __/ | | | (_| |  __/ | | | (__| |  __\__ \
2022-08-04T08:38:19.5470160Z |_|  \_\___|___/\___/|_| \_/ |_|_| |_|\__, |  \__,_|\___| .__/ \___|_| |_|\__,_|\___|_| |_|\___|_|\___|___/
2022-08-04T08:38:19.5487095Z                                        __/ |            | |                                                
2022-08-04T08:38:19.5503905Z                                       |___/             |_|                                                
2022-08-04T08:38:19.5512206Z 
2022-08-04T08:38:19.7696351Z Sorted folders
2022-08-04T08:38:19.7718841Z - C:\agent\_work\442\s\app
2022-08-04T08:38:19.7737353Z - C:\agent\_work\442\s\test
2022-08-04T08:38:19.7755990Z External dependencies
2022-08-04T08:38:19.7783121Z - 437dbf0e-84ff-417a-965d-ed2bb9650972:Microsoft_Base Application_19.0.0.0.app
2022-08-04T08:38:19.7799736Z - 63ca2fa4-4f03-4f2b-a480-172fef340d3f:Microsoft_System Application_19.0.0.0.app
2022-08-04T08:38:19.7815882Z - dd0be2ea-f733-4d65-bb34-a28f4624fb14:Microsoft_Library Assert_16.0.0.0.app
2022-08-04T08:38:19.7835460Z - e7320ebb-08b3-4406-b1ec-b4927d3e280b:Microsoft_Any_16.0.0.0.app
2022-08-04T08:38:19.7852857Z - 23de40a6-dfe8-4f80-80db-d70f83ce8caf:Microsoft_Test Runner_16.0.0.0.app
2022-08-04T08:38:19.7871110Z - 5d86850b-0d76-4eca-bd7b-951ad998e997:Microsoft_Tests-TestLibraries_16.0.0.0.app
2022-08-04T08:38:19.7889117Z 
2022-08-04T08:38:19.7907454Z    _____                      _ _ _                                     
2022-08-04T08:38:19.7923975Z   / ____|                    (_) (_)                                    
2022-08-04T08:38:19.7938852Z  | |     ___  _ __ ___  _ __  _| |_ _ __   __ _    __ _ _ __  _ __  ___ 
2022-08-04T08:38:19.7957021Z  | |    / _ \| '_ ` _ \| '_ \| | | | '_ \ / _` |  / _` | '_ \| '_ \/ __|
2022-08-04T08:38:19.7976470Z  | |____ (_) | | | | | | |_) | | | | | | | (_| | | (_| | |_) | |_) \__ \
2022-08-04T08:38:19.7994935Z   \_____\___/|_| |_| |_| .__/|_|_|_|_| |_|\__, |  \__,_| .__/| .__/|___/
2022-08-04T08:38:19.8012499Z                        | |                 __/ |       | |   | |        
2022-08-04T08:38:19.8030138Z                        |_|                |___/        |_|   |_|        
2022-08-04T08:38:19.8038994Z 
2022-08-04T08:38:19.8207953Z Using custom ruleset
2022-08-04T08:38:19.8288633Z Using Version 19.0.11860.0
2022-08-04T08:38:19.8670679Z Copying previous apps to packages folder
2022-08-04T08:38:22.7788073Z LeBit Software & Consult GmbH_LeBit Commission = 19.0.11851.0
2022-08-04T08:38:22.7936307Z Creating AppSourceCop.json for validation
2022-08-04T08:38:22.7985412Z AppSourceCop.json content:
2022-08-04T08:38:22.8013772Z {
2022-08-04T08:38:22.8029859Z     "Publisher":  "LeBit Software \u0026 Consult GmbH",
2022-08-04T08:38:22.8046820Z     "Name":  "LeBit Commission",
2022-08-04T08:38:22.8063012Z     "mandatoryAffixes":  [
2022-08-04T08:38:22.8121583Z                              "lbt com"
2022-08-04T08:38:22.8122230Z                          ],
2022-08-04T08:38:22.8124567Z     "Version":  "19.0.11851.0"
2022-08-04T08:38:22.8130716Z }
2022-08-04T08:38:22.8139991Z 
2022-08-04T08:38:22.8157746Z Compiling C:\agent\_work\442\s\app
2022-08-04T08:38:26.0525047Z Using Symbols Folder: C:\agent\_work\442\s\.packages
2022-08-04T08:38:39.3702807Z Downloading symbols: Microsoft_Application_20.3.42673.44596.app
2022-08-04T08:38:39.3765490Z Url : http://172.17.121.187:7049/BC/dev/packages?publisher=Microsoft&appName=Application&versionText=19.0.0.0&tenant=default
2022-08-04T08:38:46.3489013Z Adding dependency to System Application from Microsoft
2022-08-04T08:38:46.3540148Z Adding dependency to Base Application from Microsoft
2022-08-04T08:38:46.3686092Z Downloading symbols: Microsoft_System_20.0.42653.44568.app
2022-08-04T08:38:46.3705838Z Url : http://172.17.121.187:7049/BC/dev/packages?publisher=Microsoft&appName=System&versionText=19.0.0.0&tenant=default
2022-08-04T08:38:47.9292962Z Downloading symbols: Microsoft_System Application_20.3.42673.44596.app
2022-08-04T08:38:47.9310969Z Url : http://172.17.121.187:7049/BC/dev/packages?publisher=Microsoft&appName=System%20Application&versionText=20.3.0.0&tenant=default
2022-08-04T08:38:49.4949116Z Downloading symbols: Microsoft_Base Application_20.3.42673.44596.app
2022-08-04T08:38:49.4962034Z Url : http://172.17.121.187:7049/BC/dev/packages?publisher=Microsoft&appName=Base%20Application&versionText=20.3.0.0&tenant=default
2022-08-04T08:38:52.1184197Z Compiling...
2022-08-04T08:38:52.2158197Z .\alc.exe /project:"c:\sources\app" /packagecachepath:"c:\sources\.packages" /out:"c:\sources\.output\LeBit Software & Consult GmbH_LeBit Commission_19.0.11860.0.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:\sources\BCLinterCop.dll /ruleset:c:\sources\scripts\lebit.ruleset.json /assemblyprobingpaths:"C:\Program Files (x86)\Microsoft Dynamics NAV\200\RoleTailored Client","C:\Program Files\Microsoft Dynamics NAV\200\Service","C:\Program Files (x86)\Open XML SDK\V2.5\lib","c:\Windows\Microsoft.NET\Assembly","C:\Test Assemblies\Mock Assemblies"
2022-08-04T08:39:07.4830692Z Microsoft (R) AL Compiler version 9.3.9.56214
2022-08-04T08:39:07.4884287Z Copyright (C) Microsoft Corporation. All rights reserved
2022-08-04T08:39:07.4894225Z 
2022-08-04T08:39:07.4910265Z Compilation started for project 'LeBit Commission' containing '109' files at '10:38:54.960'.
2022-08-04T08:39:07.4919243Z 
2022-08-04T08:39:07.4998900Z ##[error]c:\sources\app\src\report\StatementCrMemo.Report.al(9,18): error AL0445: The file 'src/report/CommissionStatement.rdlc' is opened in another application. Close the application to be able to compile.
2022-08-04T08:39:07.5011805Z 
2022-08-04T08:39:07.5012390Z Compilation ended at '10:39:07.367'.
2022-08-04T08:39:07.5012709Z 
2022-08-04T08:39:07.5013436Z App generation failed with exit code 1
2022-08-04T08:39:08.0277333Z Compile-AppInBcContainer Telemetry Correlation Id: 7f8356a2-b958-4256-985c-c72a6b5fb8e5
2022-08-04T08:39:09.6521397Z Removing Session lvserver19-lebit365provision-current
2022-08-04T08:39:09.9730319Z Removing container lvserver19-lebit365provision-current
2022-08-04T08:39:18.8488930Z Removing entries from hosts
2022-08-04T08:39:18.8710866Z Removing lvserver19-lebit365provision-current from container hosts file
2022-08-04T08:39:19.0064273Z Removing lvserver19-lebit365provision-current-* from container hosts file
2022-08-04T08:39:19.0150547Z Removing Desktop shortcuts
2022-08-04T08:39:19.0885743Z Removing C:\ProgramData\BcContainerHelper\Extensions\lvserver19-lebit365provision-current
2022-08-04T08:39:19.6912849Z Run-AlPipeline Telemetry Correlation Id: 617b7337-5682-4e93-b454-7afdf6d5fe50
2022-08-04T08:39:19.9172174Z ##[error]App generation failed with exit code 1
In C:\Program Files\WindowsPowerShell\Modules\BcContainerHelper\3.0.11\AppHandling\Compile-AppInNavContainer.ps1:651 
Zeichen:72
+ ... | Where-Object { $_ -like "App generation failed*" } | % { throw $_ }
+                                                                ~~~~~~~~
    + CategoryInfo          : OperationStopped: (App generation failed with exit code 1:String) [], RuntimeException
    + FullyQualifiedErrorId : App generation failed with exit code 1
2022-08-04T08:39:19.9257109Z ##[error]PowerShell exited with code '1'.
2022-08-04T08:39:19.9806030Z ##[section]Finishing: Run Pipeline

Additional context I had that error occur sporadically, usually re-queuing the build would be enough. Now the last 5 builds failed with this error.

freddydk commented 2 years ago

Hi @achim-t - sorry for the delay. Would you maybe have a sample project, which I could download and repro this with - then I can create a fix for this. Looks like a bug.

achim-t commented 2 years ago

https://github.com/achim-t/animated-chainsaw

freddydk commented 1 year ago

Sorry for the long wait. Cloned the repo, fixed it so it could compile and tried it out: image assuming that this must have been a bug in the compiler or like, cannot repro it now