HodorNV / ALOps

ALOps
59 stars 24 forks source link

TestTool installation fails in NextMajor (v22) #611

Closed SorenKlemmensen closed 11 months ago

SorenKlemmensen commented 1 year ago

Describe the bug When installing the TestTool we get the error

[error]AL-TestTool installation failed: Cannot find path 'C:\program files\microsoft dynamics nav\220\service\Microsoft.Dynamics.Nav.Apps.Management.dll' because it does not exist.

I expect this is related to #608 already reported and the change Microsoft is doing to the dlls

the used yaml please provide the yaml that you used. It helps you put the yaml like this:

![image](https://user-images.githubusercontent.com/9970630/219591352-e11f0119-7a83-4b20-8a88-34da02e91902.png)
        - task: ALOpsAppPublish@1
          displayName: 'ALOps Install AL TestTool'
          inputs:
            usedocker: true
            installaltesttool: true
            skip_verification: true
            install_al_app_names: |
              Tests-TestLibraries
              System Application Test
              System Application Test Library
              Any
              Library Assert
              Test Runner
              Permissions Mock
              Library Variable Storage

the output Also the complete output is necessary for us to see what is going on. Also use backtics:

2023-02-17T00:46:22.0331919Z ##[section]Starting: ALOps Install AL TestTool
2023-02-17T00:46:22.1322485Z ==============================================================================
2023-02-17T00:46:22.1322758Z Task         : ALOps App Publish
2023-02-17T00:46:22.1322912Z Description  : Publish AL Extension to Business Central
2023-02-17T00:46:22.1323078Z Version      : 1.454.3402
2023-02-17T00:46:22.1323206Z Author       : Hodor
2023-02-17T00:46:22.1323339Z Help         : Publish Business Central extension to service tier.
2023-02-17T00:46:22.1323524Z ==============================================================================
2023-02-17T00:46:25.4485125Z *** Validate configuration
2023-02-17T00:46:25.8550312Z *** Task Inputs:
2023-02-17T00:46:25.8551301Z 
2023-02-17T00:46:25.8683953Z name                                                                                                              value
2023-02-17T00:46:25.8687835Z ----                                                                                                              -----
2023-02-17T00:46:25.8691259Z usedocker                                                                                                          True
2023-02-17T00:46:25.8695295Z fixed_tag                                                                                                              
2023-02-17T00:46:25.8697529Z installpublishedapps                                                                                               True
2023-02-17T00:46:25.8700631Z installaltesttool                                                                                                  True
2023-02-17T00:46:25.8703941Z install_al_app_names                                                                             Tests-TestLibraries...
2023-02-17T00:46:25.8706274Z strictappnames                                                                                                    False
2023-02-17T00:46:25.8708822Z nav_serverinstance                                                                                                BC140
2023-02-17T00:46:25.8711175Z artifact_path                                                                                                          
2023-02-17T00:46:25.8714585Z nav_artifact_app_filter                                                                                           *.app
2023-02-17T00:46:25.8717549Z skip_verification                                                                                                  True
2023-02-17T00:46:25.8720391Z forceinstall                                                                                                      False
2023-02-17T00:46:25.8723877Z forcesync                                                                                                         False
2023-02-17T00:46:25.8727398Z publish_scope                                                                                                    Global
2023-02-17T00:46:25.8730562Z tenant                                                                                                          default
2023-02-17T00:46:25.8734031Z batch_publish_folder                                                                                                   
2023-02-17T00:46:25.8736613Z publisherazureactivedirectorytenantid                                                                                  
2023-02-17T00:46:25.8737584Z blocksymbolsonly                                                                                                  False
2023-02-17T00:46:25.8738979Z 
2023-02-17T00:46:25.8763224Z 
2023-02-17T00:46:25.8774221Z 
2023-02-17T00:46:25.9024374Z *** For documentation, please visit   : https://www.alops.be/documentation
2023-02-17T00:46:25.9029936Z 
2023-02-17T00:46:26.3317548Z *** ALOps License:
2023-02-17T00:46:26.3343901Z   * Licensed To: ?
2023-02-17T00:46:26.3348597Z 
2023-02-17T00:46:26.3472335Z *** Importing required PS-Functions
2023-02-17T00:46:27.9308427Z *** Initiate Docker Session
2023-02-17T00:46:28.3521639Z *** Set Docker Container ErrorActionPreference = Stop
2023-02-17T00:46:28.7222855Z *** Install AL TestTool: True
2023-02-17T00:46:28.7295349Z *** Start AL-TestTool installation
2023-02-17T00:46:29.6419767Z *** Import NAV/BC Management DLL's
2023-02-17T00:46:29.6430907Z *** Loading assemblies for ServiceTier [BC].
2023-02-17T00:46:30.4840320Z *** Loading assemblies from: [C:\program files\microsoft dynamics nav\220\service]
2023-02-17T00:46:30.6482718Z ##[error]AL-TestTool installation failed: Cannot find path 'C:\program files\microsoft dynamics nav\220\service\Microsoft.Dynamics.Nav.Apps.Management.dll' because it does not exist.
2023-02-17T00:46:30.6573590Z *** AL-TestTool installation finished.
2023-02-17T00:46:30.6573830Z 
2023-02-17T00:46:30.6575188Z *** Disconnect Docker session.
2023-02-17T00:46:30.6575473Z *** Remove Docker session.
2023-02-17T00:46:30.6575776Z *** Docker session removed.
2023-02-17T00:46:30.6576098Z *** AL-Extension Published to ALOps Repository
2023-02-17T00:46:30.6578359Z *** Cleanup VSTS Environment: True
2023-02-17T00:46:32.9119421Z ##[section]Finishing: ALOps Install AL TestTool

Expected behavior That they install as in every other version :-)

waldo1001 commented 1 year ago

It is related, indeed...

DanielGoehler commented 1 year ago

We have the same problem:

Yaml

- task: ALOpsDockerCreate@1
  displayName: 'ALOps - Create Docker Image'
  inputs:
    artifacttype: 'Sandbox'
    artifactcountry: 'de'
    versionselect: 'NextMajor'
    sastoken: '$(sasToken)'

- task: ALOpsDockerStart@1
  displayName: 'ALOps - Start Docker Container'

- task: ALOpsDockerWait@1
  displayName: 'ALOps - Wait for Docker Container to start'
  inputs:
    search_string: 'Ready for connections!'

- task: ALOpsAppPublish@1
  displayName: 'ALOps - Install AL TestTool'
  inputs:
    usedocker: true
    installaltesttool: true
    install_al_app_names: |
      Tests-TestLibraries
      System Application Test
      System Application Test Library
      Any
      Library Assert
      Test Runner
      Permissions Mock
      Library Variable Storage
      Tests-Bank
      Tests-Cash Flow
      Tests-Cost Accounting
      Tests-CRM integration
      Tests-Data Exchange
      Tests-Dimension
      Tests-ERM
      Tests-Fixed Asset
      Tests-General Journal
      Tests-Graph
      Tests-Integration
      Tests-Invoicing
      Tests-Job
      Tests-Local
      Tests-Marketing
      Tests-Misc
      Tests-Monitor Sensitive Fields
      Tests-Permissions
      Tests-Physical Inventory
      Tests-Prepayment
      Tests-Rapid Start
      Tests-Report
      Tests-Resource
      Tests-Reverse
      Tests-SCM
      Tests-SMB
      Tests-TestLibraries
      Tests-Upgrade
      Tests-User
      Tests-VAT
      Tests-Workflow
      strictappnames: true

Output of ALOpsAppPublish

##[section]Starting: ALOps - Install AL TestTool
==============================================================================
Task         : ALOps App Publish
Description  : Publish AL Extension to Business Central
Version      : 1.454.3402
Author       : Hodor
Help         : Publish Business Central extension to service tier.
==============================================================================
*** Validate configuration
*** Task Inputs:

name                                                                                                              value
----                                                                                                              -----
usedocker                                                                                                          True
fixed_tag                                                                                                              
installpublishedapps                                                                                               True
installaltesttool                                                                                                  True
install_al_app_names                                                                             Tests-TestLibraries...
strictappnames                                                                                                     True
nav_serverinstance                                                                                                BC140
artifact_path                                                                                                          
nav_artifact_app_filter                                                                                           *.app
skip_verification                                                                                                  True
forceinstall                                                                                                      False
forcesync                                                                                                         False
publish_scope                                                                                                    Global
tenant                                                                                                          default
batch_publish_folder                                                                                                   
publisherazureactivedirectorytenantid                                                                                  
blocksymbolsonly                                                                                                  False

*** For documentation, please visit   : https://www.alops.be/documentation

*** Importing required PS-Functions
*** Initiate Docker Session
*** Set Docker Container ErrorActionPreference = Stop
*** Install AL TestTool: True
*** Start AL-TestTool installation
*** Import NAV/BC Management DLL's
*** Loading assemblies for ServiceTier [BC].
*** Loading assemblies from: [C:\program files\microsoft dynamics nav\220\service]
##[error]AL-TestTool installation failed: Cannot find path 'C:\program files\microsoft dynamics nav\220\service\Microsoft.Dynamics.Nav.Apps.Management.dll' because it does not exist.
*** AL-TestTool installation finished.

*** Disconnect Docker session.
*** Remove Docker session.
*** Docker session removed.
*** AL-Extension Published to ALOps Repository
*** Cleanup VSTS Environment: True
##[section]Finishing: ALOps - Install AL TestTool
AdminHodor commented 1 year ago

Dear @DanielGoehler , @SorenKlemmensen,

Could you please try our latest release v1.455.3559 ?

Kind regards,

DanielGoehler commented 1 year ago

@AdminHodor Now different errors have been produced: Could not load file or assembly 'System.Runtime, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.

Do I need to install .NET Framework 6 on every build agent?

##[section]Starting: ALOps - Run TestSuite
==============================================================================
Task         : ALOps App Test
Description  : Run AL-TestSuite for Business Central
Version      : 1.455.3559
Author       : Hodor
Help         : Run Business Central Test-Suite and collect results.
==============================================================================
*** Validate configuration
*** Task Inputs:

name                                      value
----                                      -----
usedocker                                  True
fixed_tag                                      
nav_serverinstance                        BC140
tenant                                  default
companyname                                    
profile                                        
bc_username                                    
bc_password                                    
bc_authentication               NavUserPassword
bc_webclient_url                               
testfilter                                     
disabledtests        TestApp/DisabledTests.json
show_available_tests                       True
import_testtoolkit                        False
import_action                              Skip
testpage                                 130455
testsuite                               DEFAULT
extensionid                                    
installaltesttool                         False
failed_test_action                       Ignore
override_finsql_path                           
resultfilename                  TestResults.xml
testrunnercodeunitid                           

*** For documentation, please visit   : https://www.alops.be/documentation

*** ALOps License:
  * Licensed To: prisma informatik GmbH (Organisation License)

*** Importing required PS-Functions
*** Working folder: C:\agent\_work\640\s
***
*** Load DisabledTests: C:\agent\_work\640\s\TestApp\DisabledTests.json

*** Prepare Docker Session
*** Connect Docker Session
*** Initiate Docker Session
*** Set Docker Container ErrorActionPreference = Stop
*** Copy Modules to Docker
*** Setup Docker Session
*** Checking for container-specific Test Assemblies
*** Using container-specific Test Assemblies
*** Import Modules in Docker Session
*** Import UI Client [C:\Run\DevOps\BCAppTest\bin\Microsoft.Dynamics.Framework.UI.Client.dll]
AUSFÜHRLICH: Loading module from path 'C:\Run\DevOps\BCAppTest\bin\Microsoft.Dynamics.Framework.UI.Client.dll'.
*** Import NewtonSoft JSON [C:\Program Files\Microsoft Dynamics NAV\220\Service\Newtonsoft.Json.dll]
##[error]Could not load file or assembly 'System.Runtime, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
##[section]Finishing: ALOps - Run TestSuite
AdminHodor commented 1 year ago

Please try our latest release v1.455.3571.

Kind regards,

DanielGoehler commented 1 year ago

@AdminHodor Now it works 👍 Thanks.