BusinessCentral.LinterCop icon indicating copy to clipboard operation
BusinessCentral.LinterCop copied to clipboard

Preview AL Language 14 - Unable to load Analyzer assembly

Open pri-kise opened this issue 10 months ago • 3 comments

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 avatar Apr 18 '24 11:04 pri-kise

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.

pri-kise avatar Apr 18 '24 11:04 pri-kise

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.

Arthurvdv avatar Apr 21 '24 14:04 Arthurvdv

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

rvanbekkum avatar Apr 24 '24 09:04 rvanbekkum

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 avatar May 05 '24 15:05 Arthurvdv

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 avatar May 06 '24 13:05 Arthurvdv

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.

Arthurvdv avatar May 13 '24 11:05 Arthurvdv