Understand library and dependency applications

Completed

Library and dependency apps are more types of apps that are available out on AppSource.

What is a library app?

A library app contains common code that other apps depend on. If you're going to have multiple AppSource apps that all share common code, such as licensing, registration, and so on, you can put that common code into a library app, and have the AppSource apps depend on the library app.

How does the library app get installed to a tenant?

A library app doesn't appear on AppSource. It only lives in Business Central. The service is built to install the library apps behind the scenes. Here's how it works. Customers find an app they want to install on AppSource. The customer doesn't know the app even has library apps. When users install the app, the service checks the app's JSON manifest for dependencies. If the app requires one or more library apps, the service installs them first. If so, it installs them first, before installing the main AppSource app.

What is a dependency app?

A dependency app isn't much different from a library app. A dependency app does have its own offer on AppSource. For example, you might have AppSource App A that serves a purpose on its own and is listed on AppSource. You then also have App B as its own offer on AppSource, but it does depend on code within App A, and needs App A to be installed before it can be installed. Behind the scenes, library and dependency apps behave the same when walking that dependency chain and auto installing any app the top-level app depends on.

Can I have multiple library apps for my AppSource app?

Yes, you can have multiple library apps for an AppSource app. You need to make sure you list all library apps as dependencies within the AppSource app json file manifest.

When I get the latest updated version of my app, why don't I get the updated library dependency apps that my AppSource app depends on?

The service handles the dependency chain during installation and updates. When you update an app, the service checks and updates any library dependency apps as needed.