microsoft / navcontainerhelper

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

AppSourceCop.json with Compile-AppInNavContainer #676

Closed pmatsconsulting closed 4 years ago

pmatsconsulting commented 4 years ago

It seems that AppSourceCop.json is ignored by Compile-AppInNavContainer. Does exist a workaround ?

freddydk commented 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.

pmatsconsulting commented 4 years ago

Last version of NavContainerHelper

Compile-AppInNavContainer -credential $Credential -containerName $ContainerName -appProjectFolder $ -appOutputFolder $ -EnableCodeCop:$false -EnableUICop:$false -EnableAppSourceCop -EnablePerTenantExtensionCop:$false

image

AppSourceCop.json in folder App of container:

image

AppSourceCop.json content:

{ "mandatoryAffixes": ["CAGxx"] }

Works fine when compiling from VS Code:

image

freddydk commented 4 years ago

Just tried the same - and it seems to work: image But I can see that I am using 15.x containers - and you have a 14.x container. Did you try with 15?

pmatsconsulting commented 4 years ago

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?

freddydk commented 4 years ago

Will ask the team whether something needs to be done differently in 14.x

pmatsconsulting commented 4 years ago

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

freddydk commented 4 years ago

thanks - will have a look.

pmatsconsulting commented 4 years ago

Any feedback?

pmatsconsulting commented 4 years ago

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...

freddydk commented 4 years ago

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)

pmatsconsulting commented 4 years ago

Visibly not a regression in containerhelper. Just tested with an older version (0.6.2.5) and doesn't work.

freddydk commented 4 years ago

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?

pmatsconsulting commented 4 years ago

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...

freddydk commented 4 years ago

Agree, thanks for the assistance.