Closed pmatsconsulting closed 4 years ago
It would help if you would specify what parameters you use when using Compile-AppInNavContainer, then I could see whether you specify -enableAppSourceCop.
Last version of NavContainerHelper
Compile-AppInNavContainer -credential $Credential -containerName $ContainerName -appProjectFolder $ -appOutputFolder $ -EnableCodeCop:$false -EnableUICop:$false -EnableAppSourceCop -EnablePerTenantExtensionCop:$false
AppSourceCop.json in folder App of container:
AppSourceCop.json content:
{ "mandatoryAffixes": ["CAGxx"] }
Works fine when compiling from VS Code:
Just tried the same - and it seems to work: But I can see that I am using 15.x containers - and you have a 14.x container. Did you try with 15?
Just tested with 15.x container and indeed it works. Still not working with 14.x container (mcr.microsoft.com/businesscentral/onprem:14.1.32615.0-fr image) normal?
Will ask the team whether something needs to be done differently in 14.x
New update after some other tests (NavContainerHelper 0.6.4.14) The subject of the issue can be requalified because all analyzers don't work with containers 14.x with recent versions of NavContainerHelper.
Using Symbols Folder: D:\Sources\DevOps\Git\3LI SANDBOX TRAINNING\Test Template AL BC 14.x Edition (AL only)\App.alpackages Compiling... alc.exe /project:C:\Source\App /packagecachepath:C:\Source\App.alpackages /out:C:\Source\App\output\Calliope_App Name_1.0.0.0.app /analyzer:C:\build\vsix\extensio n\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 /assemblyprobingpaths:"C:\Program Files (x86)\Microsoft Dynamics NAV\140\RoleTailored Client","C:\Program Files\Microsoft Dynamics NAV\140\Service","C:\Program Files (x86)\Open XML SDK\V2.5\lib","c:\windows\assembly" Microsoft (R) AL Compiler version 3.0.1.58713 Copyright (C) Microsoft Corporation. All rights reserved
thanks - will have a look.
Any feedback?
New update after some other tests (several runs for each) with containers 14.x. Tested with container image mcr.microsoft.com/businesscentral/onprem:1904-rtm-fr : Failed Tested with container image mcr.microsoft.com/businesscentral/onprem:14.1.32615.0-fr : Failed Tested with container image mcr.microsoft.com/businesscentral/onprem:1904-cu1-fr : Failed Tested with container image mcr.microsoft.com/businesscentral/onprem:1904-cu1-w1 : Failed Tested with container image mcr.microsoft.com/businesscentral/onprem:1904-cu2-fr : Succeeded Tested with container image mcr.microsoft.com/businesscentral/onprem:1904-cu3-fr : Succeeded
It seems that the issue is related to the container image v14 before CU2...
Thanks for investigating. Do you know whether this has ever worked with 14.x cu1 and earlier? (I mean whether this is a regression in containerhelper or it is something that just wasn't working before cu2)
Visibly not a regression in containerhelper. Just tested with an older version (0.6.2.5) and doesn't work.
Ok, so it is something that has never worked with 14.cu1 and earlier. This is a huge help for me, but at the same time puts the priority down. Is this something that is needed for older versions - or can we live with the fact that it works now?
We can live with the fact that it works with more recent versions. For projects based on earlier versions which it doesn't work, we will arrange our code checking processes...
Agree, thanks for the assistance.
It seems that AppSourceCop.json is ignored by Compile-AppInNavContainer. Does exist a workaround ?