Bewerken

Share via


AppSourceCop Warning AS0085

Use the 'application' property instead of specifying explicit dependencies.

Description

The 'application' property should be used for expressing a dependency on the 'Base Application' or the 'System Application' instead of explicit dependencies. See https://learn.microsoft.com/dynamics365/business-central/dev-itpro/developer/devenv-application-app-file for additional information.

Remarks

This rule reports a diagnostic when the app.json of the extension specifies a dependency on the 'Base Application' or 'System Application' extensions by Microsoft.

For more information about the benefits of using the application property, see The Microsoft_Application.app file.

For more information about the properties in the app.json, see JSON files.

How to fix this diagnostic?

In order to fix this diagnostic, you have to replace the dependencies specifed on the 'Base Application' and 'System Application' in the dependencies property by the application property in the app.json of the extension.

Code example triggering the rule

The app.json file of the extension:

{
  [...]
  "dependencies": [
    {
      "appId":  "437dbf0e-84ff-417a-965d-ed2bb9650972",
      "name":  "Base Application",
      "publisher":  "Microsoft",
      "version":  "15.3.0.0"
    },
    {
        "appId":  "63ca2fa4-4f03-4f2b-a480-172fef340d3f",
        "name":  "System Application",
        "publisher":  "Microsoft",
        "version":  "15.3.0.0"
    }
  ],
  [...]
}

Code example not triggering the rule

The app.json file of the extension:

{
  [...]
  "application": "17.0.0.0",
  [...]
}

AppSourceCop Analyzer
Get Started with AL
Developing Extensions