HodorNV / ALOps

ALOps
55 stars 24 forks source link

ALOps App License Check & System.Reflection.DispatchProxy error #768

Open StijnBt opened 1 month ago

StijnBt commented 1 month ago

Describe the bug The ALOps App License Check fails on System.Reflection.DispatchProxy error for BC18.

the used yaml

- task: ALOpsAppLicenseCheck@1
          displayName: 'Check License SE'
          condition: ne(variables['bc-instance-test-se'], '')
          enabled: true
          continueOnError: true
          inputs:
            licensefile: '$(Pipeline.Workspace)\s\ISV\License\SE\7397325.bclicense'
            artifact_filter: '*.app'

the output

2024-05-29T15:33:59.4512764Z ##[section]Starting: Check License SE
2024-05-29T15:33:59.4523205Z ==============================================================================
2024-05-29T15:33:59.4523427Z Task         : ALOps App License Check
2024-05-29T15:33:59.4523548Z Description  : Check App files agains a license
2024-05-29T15:33:59.4523710Z Version      : 1.464.6120
2024-05-29T15:33:59.4523816Z Author       : Hodor
2024-05-29T15:33:59.4523916Z Help         : Check App files agains a license.
2024-05-29T15:33:59.4524052Z ==============================================================================
2024-05-29T15:34:00.7920717Z *** Validate configuration
2024-05-29T15:34:00.8679750Z *** Task Inputs:
2024-05-29T15:34:00.8765444Z 
2024-05-29T15:34:00.8940601Z name                                                             value
2024-05-29T15:34:00.8946841Z ----                                                             -----
2024-05-29T15:34:00.8951576Z usedocker                                                        False
2024-05-29T15:34:00.8956566Z fixed_tag                                                             
2024-05-29T15:34:00.8962391Z licensefile       E:\agent\_work\13\s\ISV\License\SE\7xxxxxx.bclicense
2024-05-29T15:34:00.8967746Z artifact_path                                      E:\agent\_work\13\a
2024-05-29T15:34:00.8973447Z artifact_filter                                                  *.app
2024-05-29T15:34:00.8977018Z artifact_include                                                      
2024-05-29T15:34:00.8984261Z artifact_exclude                                                      
2024-05-29T15:34:00.8989958Z exclude_ranges                                                        
2024-05-29T15:34:00.8996124Z exclude_tables                                                   False
2024-05-29T15:34:00.9000168Z exclude_codeunits                                                False
2024-05-29T15:34:00.9004142Z exclude_pages                                                    False
2024-05-29T15:34:00.9009132Z exclude_reports                                                  False
2024-05-29T15:34:00.9017462Z exclude_xmlports                                                 False
2024-05-29T15:34:00.9021527Z exclude_queries                                                  False
2024-05-29T15:34:00.9027589Z warning_only                                                     False
2024-05-29T15:34:00.9033504Z pwsh                                                             False
2024-05-29T15:34:00.9033706Z 
2024-05-29T15:34:00.9064280Z 
2024-05-29T15:34:00.9079915Z 
2024-05-29T15:34:00.9324168Z True
2024-05-29T15:34:00.9609868Z *** For documentation, please visit   : https://www.alops.be/documentation
2024-05-29T15:34:00.9616060Z 
2024-05-29T15:34:01.2637526Z *** ALOps License:
2024-05-29T15:34:01.2714013Z   * Licensed To: Broad Horizon Belgie (Per Run License)
2024-05-29T15:34:01.2719815Z 
2024-05-29T15:34:01.2873349Z *** Imported required PS-Functions
2024-05-29T15:34:01.5397233Z *** Parse Task Parameters
2024-05-29T15:34:01.6213377Z *** Load Management DLL's
2024-05-29T15:34:01.6405322Z *** Import NAV/BC Management DLL's [True]
2024-05-29T15:34:01.6501760Z *** ServiceTier not specified, loading default assemblies.
2024-05-29T15:34:01.6649684Z *** Default Assemblies not found. Load via BC-Artifacts
2024-05-29T15:34:01.6799959Z *** Install/Update BCContainerHelper [https://github.com/microsoft/navcontainerhelper]
2024-05-29T15:34:01.6874046Z *** Check BcContainerHelper
2024-05-29T15:34:01.7650035Z *** Load BcContainerHelper
2024-05-29T15:34:01.9091513Z BcContainerHelper version 6.0.17
2024-05-29T15:34:02.2969898Z BC.HelperFunctions emits usage statistics telemetry to Microsoft
2024-05-29T15:34:02.5599658Z Running on Windows, PowerShell 5.1.17763.5696
2024-05-29T15:34:06.8276846Z 
2024-05-29T15:34:06.8277660Z ModuleType Version    Name                                ExportedCommands                                             
2024-05-29T15:34:06.8278142Z ---------- -------    ----                                ----------------                                             
2024-05-29T15:34:06.8281236Z Script     6.0.17     BcContainerHelper                   {Add-FontsToBcContainer, Add-GitToAlProjectFolder, AddTele...
2024-05-29T15:34:06.8281457Z 
2024-05-29T15:34:06.8281534Z 
2024-05-29T15:34:06.8281632Z 
2024-05-29T15:34:06.8285570Z 
2024-05-29T15:34:06.8336517Z ##[command]"Get-BCArtifactUrl" 
2024-05-29T15:34:06.8336878Z Name                           Value                                                                                   
2024-05-29T15:34:06.8337334Z ----                           -----                                                                                   
2024-05-29T15:34:06.8337609Z select                         Latest                                                                                  
2024-05-29T15:34:06.8338332Z type                           OnPrem                                                                                  
2024-05-29T15:34:06.8338707Z country                        W1                                                                                      
2024-05-29T15:34:06.8338818Z 
2024-05-29T15:34:06.8338920Z 
2024-05-29T15:34:06.8339117Z  -select: Latest -type: OnPrem -country: W1
2024-05-29T15:34:09.6338745Z Downloading artifact /onprem/24.1.18927.19498/w1
2024-05-29T15:34:09.6820760Z Downloading C:\Windows\TEMP\37e5b7c9-70fa-4e98-96c3-3096e1ce5e72.zip
2024-05-29T15:34:18.5576471Z Unpacking artifact to tmp folder using Expand-Archive
2024-05-29T15:34:25.7089239Z Downloading platform artifact /onprem/24.1.18927.19498/platform
2024-05-29T15:34:25.7144286Z Downloading C:\Windows\TEMP\5c60a9af-6fdf-4756-ba45-5235a7e1db22.zip
2024-05-29T15:34:51.3895250Z Unpacking artifact to tmp folder using Expand-Archive
2024-05-29T15:39:14.8647704Z Downloading Prerequisite Components
2024-05-29T15:39:14.9013012Z Downloading C:\bcartifacts.cache\onprem\24.1.18927.19498\platform\Prerequisite Components\DotNetCore\DotNetCore.1.0.4_1.1.1-WindowsHosting.exe
2024-05-29T15:39:18.6410822Z Downloading C:\bcartifacts.cache\onprem\24.1.18927.19498\platform\Prerequisite Components\IIS URL Rewrite Module\rewrite_2.0_rtw_x64.msi
2024-05-29T15:39:19.7440646Z *** Platform: C:\bcartifacts.cache\onprem\24.1.18927.19498\platform
2024-05-29T15:39:19.7645957Z *** Localisation: C:\bcartifacts.cache\onprem\24.1.18927.19498\w1
2024-05-29T15:39:20.0795431Z *** BC Management DLL: C:\bcartifacts.cache\onprem\24.1.18927.19498\platform\ServiceTier\program files\Microsoft Dynamics NAV\240\Service\Management\Microsoft.Dynamics.Nav.Management.dll
2024-05-29T15:39:20.0930544Z *** Selected module: [C:\bcartifacts.cache\onprem\24.1.18927.19498\platform\ServiceTier\program files\Microsoft Dynamics NAV\240\Service\Management\Microsoft.Dynamics.Nav.Management.dll]
2024-05-29T15:39:20.0953402Z *** Loading module: [C:\bcartifacts.cache\onprem\24.1.18927.19498\platform\ServiceTier\program files\Microsoft Dynamics NAV\240\Service\Management\Microsoft.Dynamics.Nav.Management.dll]
2024-05-29T15:39:20.2136995Z *** Module [Microsoft.Dynamics.Nav.Ncl.dll] not available
2024-05-29T15:39:20.2226421Z *** BC Types DLL: C:\bcartifacts.cache\onprem\24.1.18927.19498\platform\ServiceTier\program files\Microsoft Dynamics NAV\240\Service\Management\Microsoft.Dynamics.Nav.Types.dll
2024-05-29T15:39:20.2265151Z *** Selected module: [C:\bcartifacts.cache\onprem\24.1.18927.19498\platform\ServiceTier\program files\Microsoft Dynamics NAV\240\Service\Management\Microsoft.Dynamics.Nav.Types.dll]
2024-05-29T15:39:20.2287031Z *** Loading module: [C:\bcartifacts.cache\onprem\24.1.18927.19498\platform\ServiceTier\program files\Microsoft Dynamics NAV\240\Service\Management\Microsoft.Dynamics.Nav.Types.dll]
2024-05-29T15:39:21.2418338Z ##[error]Could not load file or assembly 'System.Reflection.DispatchProxy, Version=4.0.6.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
2024-05-29T15:39:21.3154194Z ##[section]Finishing: Check License SE

Expected behavior It works as before :)

Screenshots

Additional context It seems this started happening begin may.

waldo1001 commented 4 weeks ago

As you see, it takes v24 because you're doing the check outside of docker, so ALOps doesn't know which version you're building against.

We are including a global variable for you to be able to overrule this. The idea is you'll be able to set this in a pipeline (just create is a variable of your pipeline, or include it in your variable group) so your steps will prefer that version to use within the pipeline.

So - solutions is coming up!

waldo1001 commented 1 week ago

Released in v1.465. Can you confirm?

StijnBt commented 1 week ago
2024-06-19T19:05:42.7065019Z ##[section]Starting: Check License AT
2024-06-19T19:05:42.7180058Z ==============================================================================
2024-06-19T19:05:42.7180321Z Task         : ALOps App License Check
2024-06-19T19:05:42.7180524Z Description  : Check App files agains a license
2024-06-19T19:05:42.7180719Z Version      : 1.465.6167
2024-06-19T19:05:42.7180879Z Author       : Hodor
2024-06-19T19:05:42.7181075Z Help         : Check App files agains a license.
2024-06-19T19:05:42.7181308Z ==============================================================================
2024-06-19T19:05:43.5186777Z *** Validate configuration
2024-06-19T19:05:43.5706518Z *** Task Inputs:
2024-06-19T19:05:43.5768769Z 
2024-06-19T19:05:43.5888501Z name                                                             value
2024-06-19T19:05:43.5894205Z ----                                                             -----
2024-06-19T19:05:43.5897797Z usedocker                                                        False
2024-06-19T19:05:43.5900576Z fixed_tag                                                             
2024-06-19T19:05:43.5903487Z licensefile       C:\Agent\_work\24\s\ISV\License\AT\7396021.bclicense
2024-06-19T19:05:43.5905861Z artifact_path                                      C:\Agent\_work\24\a
2024-06-19T19:05:43.5908556Z artifact_filter                                                  *.app
2024-06-19T19:05:43.5911120Z artifact_include                                                      
2024-06-19T19:05:43.5913984Z artifact_exclude                                                      
2024-06-19T19:05:43.5916904Z exclude_ranges                                                        
2024-06-19T19:05:43.5919312Z exclude_tables                                                   False
2024-06-19T19:05:43.5921566Z exclude_codeunits                                                False
2024-06-19T19:05:43.5923855Z exclude_pages                                                    False
2024-06-19T19:05:43.5926592Z exclude_reports                                                  False
2024-06-19T19:05:43.5929017Z exclude_xmlports                                                 False
2024-06-19T19:05:43.5931285Z exclude_queries                                                  False
2024-06-19T19:05:43.5933754Z warning_only                                                     False
2024-06-19T19:05:43.5937036Z pwsh                                                             False
2024-06-19T19:05:43.5937507Z 
2024-06-19T19:05:43.5961211Z 
2024-06-19T19:05:43.5970056Z 
2024-06-19T19:05:43.6134768Z True
2024-06-19T19:05:43.6320234Z *** For documentation, please visit   : https://www.alops.be/documentation
2024-06-19T19:05:43.6325315Z 
2024-06-19T19:05:43.8299240Z *** ALOps License:
2024-06-19T19:05:43.8324255Z   * Licensed To: Broad Horizon Belgie (Per Run License)
2024-06-19T19:05:43.8328945Z 
2024-06-19T19:05:43.8448942Z *** Imported required PS-Functions
2024-06-19T19:05:43.9831891Z *** Parse Task Parameters
2024-06-19T19:05:44.0408984Z *** Load Management DLL's
2024-06-19T19:05:44.0541435Z *** Import NAV/BC Management DLL's [True]
2024-06-19T19:05:44.0608349Z *** ServiceTier not specified, loading default assemblies.
2024-06-19T19:05:44.0704607Z *** Default Assemblies not found. Load via BC-Artifacts
2024-06-19T19:05:44.0804208Z *** Install/Update BCContainerHelper [https://github.com/microsoft/navcontainerhelper]
2024-06-19T19:05:44.0850701Z *** Check BcContainerHelper
2024-06-19T19:05:44.3777114Z *** Load BcContainerHelper
2024-06-19T19:05:44.4717948Z BcContainerHelper version 6.0.15
2024-06-19T19:05:44.7563009Z BC.HelperFunctions emits usage statistics telemetry to Microsoft
2024-06-19T19:05:44.8862214Z Running on Windows, PowerShell 5.1.17763.5696
2024-06-19T19:05:47.9067231Z 
2024-06-19T19:05:47.9068067Z ModuleType Version    Name                                ExportedCommands                                             
2024-06-19T19:05:47.9068798Z ---------- -------    ----                                ----------------                                             
2024-06-19T19:05:47.9071353Z Script     6.0.15     BcContainerHelper                   {Add-FontsToBcContainer, Add-GitToAlProjectFolder, AddTele...
2024-06-19T19:05:47.9071560Z 
2024-06-19T19:05:47.9071639Z 
2024-06-19T19:05:47.9071724Z 
2024-06-19T19:05:47.9073747Z 
2024-06-19T19:05:47.9110901Z ##[command]"Get-BCArtifactUrl" 
2024-06-19T19:05:47.9112047Z Name                           Value                                                                                   
2024-06-19T19:05:47.9113028Z ----                           -----                                                                                   
2024-06-19T19:05:47.9113456Z select                         Weekly                                                                                  
2024-06-19T19:05:47.9113866Z type                           Sandbox                                                                                 
2024-06-19T19:05:47.9114290Z country                        W1                                                                                      
2024-06-19T19:05:47.9114489Z 
2024-06-19T19:05:47.9114564Z 
2024-06-19T19:05:47.9114825Z  -select: Weekly -type: Sandbox -country: W1
2024-06-19T19:06:08.8751145Z *** Platform: C:\bcartifacts.cache\sandbox\24.2.20227.20808\platform
2024-06-19T19:06:08.8783223Z *** Localisation: C:\bcartifacts.cache\sandbox\24.2.20227.20808\w1
2024-06-19T19:06:09.0229976Z *** BC Management DLL: C:\bcartifacts.cache\sandbox\24.2.20227.20808\platform\ServiceTier\program files\Microsoft Dynamics NAV\240\Service\Management\Microsoft.Dynamics.Nav.Management.dll
2024-06-19T19:06:09.0322219Z *** Selected module: [C:\bcartifacts.cache\sandbox\24.2.20227.20808\platform\ServiceTier\program files\Microsoft Dynamics NAV\240\Service\Management\Microsoft.Dynamics.Nav.Management.dll]
2024-06-19T19:06:09.0333239Z *** Loading module: [C:\bcartifacts.cache\sandbox\24.2.20227.20808\platform\ServiceTier\program files\Microsoft Dynamics NAV\240\Service\Management\Microsoft.Dynamics.Nav.Management.dll]
2024-06-19T19:06:09.1064537Z *** Module [Microsoft.Dynamics.Nav.Ncl.dll] not available
2024-06-19T19:06:09.1099408Z *** BC Types DLL: C:\bcartifacts.cache\sandbox\24.2.20227.20808\platform\ServiceTier\program files\Microsoft Dynamics NAV\240\Service\Management\Microsoft.Dynamics.Nav.Types.dll
2024-06-19T19:06:09.1117661Z *** Selected module: [C:\bcartifacts.cache\sandbox\24.2.20227.20808\platform\ServiceTier\program files\Microsoft Dynamics NAV\240\Service\Management\Microsoft.Dynamics.Nav.Types.dll]
2024-06-19T19:06:09.1128299Z *** Loading module: [C:\bcartifacts.cache\sandbox\24.2.20227.20808\platform\ServiceTier\program files\Microsoft Dynamics NAV\240\Service\Management\Microsoft.Dynamics.Nav.Types.dll]
2024-06-19T19:06:09.3603295Z ##[error]Could not load file or assembly 'System.Reflection.DispatchProxy, Version=4.0.6.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
2024-06-19T19:06:09.4046581Z ##[section]Finishing: Check License AT

Still appearing in 1.465.6167