Skip to content

BC27 compilation fails with ALTool / analyzers – System.Runtime.CompilerServices.Unsafe 8.0.0.0 #920

@bmagoisera

Description

@bmagoisera

We are hitting a blocking issue when compiling an AL extension targeting Business Central 27.

The compilation consistently fails with the following error:

Could not load type 'System.Object' from assembly
'System.Runtime.CompilerServices.Unsafe, Version=8.0.0.0'

Environment

Business Central: 27.0 (Sandbox)
AL Runtime: 16
Build: Azure DevOps pipeline
Agent: self-hosted Windows agent
Tooling: ALOps App Compiler v2 (using ALTool from BC27 VSIX)
PowerShell: 5.1
BcContainerHelper: 6.1.6
Code analyzers enabled:
CodeCop
PerTenantExtensionCop
UICop

What we observe

The error happens when analyzers are being loaded.
The same pipeline works fine on previous BC versions.

This only fails on BC 27.

Disabling analyzers allows the build to continue.

We upgraded the build agent to .NET 8, but the issue remains unchanged.

Question

Is this a known compatibility issue between BC27 / ALTool / analyzers?
Is there a recommended fix or workaround?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions