แก้ไข

แชร์ผ่าน


AppSourceCop Error AS0096

The name of an extension cannot be changed.

Description

The name of an extension cannot be changed for extensions targeting a runtime version lower than '8.0' in their app.json file. This will break the upgrade of existing installations and dependent extensions.

Remarks

Changing the identity of extensions is only supported in Business Central starting from version 2021 release wave 2 which corresponds to the AL runtime version 8.0, see JSON Files. For more information about what makes up the identity of an app, see App Identity.

How to fix this diagnostic?

In order to fix this diagnostic, you must either:

  • change the name of the extension in the app.json to match the name used in the baseline,
  • update the runtime version in the app.json to be 8.0 or higher.

Code example triggering the rule

Version 1.0 of the extension:

{
    "name": "Extension Name",
    "publisher": "Publisher Name",
    "version": "1.0.0.0",
    "runtime": "7.2",
    // other properties 
}

Version 2.0 of the extension:

{
    "name": "New Extension Name",
    "publisher": "Publisher Name",
    "version": "2.0.0.0",
    "runtime": "7.2",
    // other properties 
}

In version 2.0, the extension has been renamed from Extension Name to New Extension Name while still targeting runtime 7.2. The rename is not allowed.

Code example not triggering the rule

Version 1.0 of the extension:

{
    "name": "Extension Name",
    "publisher": "Publisher Name",
    "version": "1.0.0.0",
    "runtime": "7.2",
    // other properties 
}

Version 2.0 of the extension:

{
    "name": "New Extension Name",
    "publisher": "Publisher Name",
    "version": "2.0.0.0",
    "runtime": "8.0",
    // other properties 
}

In version 2.0, the extension has been renamed from Extension Name to New Extension Name and the runtime version has been changed to 8.0. The rename is allowed.

AppSourceCop Analyzer
Get Started with AL
Developing Extensions
App Identity