StefanMaron / BusinessCentral.LinterCop

Community driven code linter for AL (MS Dynamics 365 Business Central)
https://stefanmaron.com
MIT License
68 stars 27 forks source link

Preview AL Language 14 - Unable to load Analyzer assembly #592

Closed pri-kise closed 2 months ago

pri-kise commented 3 months ago

I receive the following warning in my projects when using the Preview Version of the AL Language Extension.

Unable to load Analyzer assembly c:\Users\kise\.vscode\extensions\ms-dynamics-smb.al-14.0.986719\bin\Analyzers\BusinessCentral.LinterCop.dll : File c:\Users\kise\.vscode\extensions\ms-dynamics-smb.al-14.0.986719\bin\Analyzers\BusinessCentral.LinterCop.dll was not found.

My settings.json:

{
    "al.codeAnalyzers": [
        "${AppSourceCop}",
        "${CodeCop}",
        "${PerTenantExtensionCop}",
        "${UICop}",
        "${analyzerFolder}BusinessCentral.LinterCop.dll"
    ],

My Analyzer Folder Content: image

Is there anything that I could do?

pri-kise commented 3 months ago

I copied BusinessCentral.LinterCop.next.dll to `BusinessCentral.LinterCop.dll``and now it's working again, but I'm not a fan of this manual step.

Arthurvdv commented 3 months ago

This is unfortunately the expected behavior of the VS Code extension.

When switching to the Pre-Release version of the AL Language you need to manually swap the .DLL file. This has always been this way. I'm not (yet) familiar with creating VS Code extensions, so I can't help you at this moment.

rvanbekkum commented 3 months ago

Could VS Code profiles help out with this somehow?

  1. Have separate VS Code profiles, one that you use together with the stable version of the AL Language extension, another profile in which you use the pre-releases of the AL Language extension
  2. Then, it would be good if we could have a setting in the LinterCop VS Code extension to configure our preference of which .dll should be used, the .next.dll or the .current.dll
Arthurvdv commented 2 months ago

Working together with @StefanMaron to support multiple version of the AL Language.

image

I've did an overhaul of the build pipeline, to build against multiple version of the AL Language. The next step is to update the VS Code extension to retrieve the matching artifact based on the installed version of the AL Language in VS Code.

Arthurvdv commented 2 months ago

Good news!

image

The combination of the new v0.30.18 version of the LinterCop, combined with the new 0.1.7 version of the VS Code now supports multiple version of the AL Language.

This works automatically on the background, where the VS Code extension grabs the version of the installed AL Language and then retrieves the a matching LinterCop .dll file.

Arthurvdv commented 2 months ago

I'm going to close this issue, where I believe it's resolved with the latest update of the LinterCop (combined with the VS Code extension) to handle this.