Use the BusinessCentral.LinterCop with the Run-ALPipeline #242
Replies: 1 comment 5 replies
-
I have written down how we have integrated the BusinessCentral.LinterCop in our build pipelines using Like @StefanMaron described in the BcContainerHelper section of his README.md there is a
Does this help you to resolve your issue with integrating LinterCop in your build pipelines? :) |
Beta Was this translation helpful? Give feedback.
-
Hello, I'm trying to use the LinterCop with the Run-ALPipeline, but I'm not able to get it working.
First, I created a PowerShell (based on your DownloadFile.ps1) to download the DLL from GitHub. Then I defined it as a "customCodeCops" in the settings.json file.
The pipelines sees the DLL, but I get a warning that "An instance of analyzer BusinessCentral.LinterCop.Design.Rule0016CheckForMissingCaptions cannot be created from c:\sources\scripts\Analyzers\BusinessCentral.LinterCop.dll: Could not load file or assembly 'Microsoft.Dynamics.Nav.CodeAnalysis".
This makes sense as the DLL doesn't end up in the Analyzers directory (where the other cops are located).
This is a part of the compiler command: ".... /analyzer:C:\build\vsix\extension\bin\Analyzers\Microsoft.Dynamics.Nav.UICop.dll /analyzer:c:\sources\scripts\BusinessCentral.LinterCop.dll ..."
The PowerShell download script, downloads the DLL to the local drive of my build server, but it needs to end up in the C:\build\vsix\extension\bin\Analyzers within the container. I don't see an option to specify that somewhere within the Run-ALPipeline command.
Do you have some tips or examples for me.
Thanks a lot.
Kevin
Beta Was this translation helpful? Give feedback.
All reactions