Skip to content

[Bug]: LinterCop pre-release cannot be used with AL-Go for nextmajor - AL1005 Unable to load Analyzer assembly #1918

@jwikman

Description

@jwikman

AL-Go version

7.3

Describe the issue

This issue was first registered here: StefanMaron/BusinessCentral.LinterCop#1149

It seems as when running AL-Go on nextmajor, with latest pre-release version of compiler (the only option if you want to use LinterCop on a nextmajor), LinterCop cannot be loaded any longer.

One workaround seems to be to rename the file from BusinessCentral.LinterCop.AL-PreRelease.dll to BusinessCentral.LinterCop.dll, but AL-Go does not support this...

Settings being used:

                "customCodeCops": [
                    "https://github.com/StefanMaron/BusinessCentral.LinterCop/releases/latest/download/BusinessCentral.LinterCop.AL-PreRelease.dll"
                ],
                "vsixFile": "preview"

From the logs:

Compiling...
  Downloading C:\build\vsix\extension\bin\Analyzers\BusinessCentral.LinterCop.AL-PreRelease.dll
  .\alc.exe /project:"c:\sources\App" /packagecachepath:"c:\sources\.packages" /out:"c:\sources\.output\NAB Solutions AB_Test CI_26.1.49.2.app" /analyzer:C:\build\vsix\extension\bin\Analyzers\Microsoft.Dynamics.Nav.Analyzers.Common.dll /analyzer:C:\build\vsix\extension\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 /analyzer:C:\build\vsix\extension\bin\Analyzers\BusinessCentral.LinterCop.AL-PreRelease.dll /ruleset:c:\sources\App\.vscode\nab.ruleset.json /SourceRepositoryUrl:https://github.com/nabsolutions-product/TEST-CI /SourceCommit:2e026f97659800eac919268a9b5e9373553cc826 /BuildBy:AL-Go for GitHub,v7.3 /BuildUrl:https://github.com/nabsolutions-product/TEST-CI/actions/runs/17577596931 /assemblyprobingpaths:"C:\Program Files\dotnet\shared","C:\ProgramData\BcContainerHelper\Extensions\bc17577596931\.netPackages\Service"
  Microsoft (R) AL Compiler version 17.0.26.46427
  Copyright (C) Microsoft Corporation. All rights reserved
  
  Compilation started for project 'Test CI' containing '5' files at '11:55:54.610'.
  
  Warning: AL1005  Unable to load Analyzer assembly C:\build\vsix\extension\bin\Analyzers\BusinessCentral.LinterCop.AL-PreRelease.dll : Unable to load BusinessCentral.LinterCop
  
  Compilation ended at '11:56:00.905'.

Expected behavior

LinterCop should be able to load also on new compiler

I see two different options here:

  1. Figure out why the file name must be the same as the assembly name nowadays, and maybe change that?
  2. Add support to AL-Go to be able to rename the custom code cop file after download.

Steps to reproduce

Use settings

                "customCodeCops": [
                    "https://github.com/StefanMaron/BusinessCentral.LinterCop/releases/latest/download/BusinessCentral.LinterCop.AL-PreRelease.dll"
                ],
                "vsixFile": "preview"

Run nextmajor pipeline
You should get the error above.

Additional context (logs, screenshots, etc.)

No response

Metadata

Metadata

Assignees

Labels

Unrelated to AL-GoThis issue is unrelated to AL-GobugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions