Today, while working on a Business Central environment, I encountered an interesting issue while trying to upload an extension (.app file). The extension installation failed with the following error:
Error
Message:
Package
validation failed due to the following error(s): Error AVS0109: The per-tenant
extension (or one of its dependencies) cannot be deployed as it has missing
dependencies or the dependencies are conflicting with currently installed apps.
Check if these dependencies are installed.
At first
glance, the error message wasn't very clear—it looked like a dependency
conflict, but there wasn’t any direct information about which dependency
was missing or conflicting.
Root
Cause
When I
googled for Error AVS0109, I came across the official Microsoft Learn
documentation: https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/avs-diagnostics/diagnostic-avs0109
The key
remark there was:
A common
reason for this error is that a build already has been published directly from
Visual Studio Code in DEV scope.
This matched
exactly with my situation. I had previously published the extension from VS
Code in Dev scope, and later tried to upload the same app as a PTE.
Solution
The fix was
straightforward:
1.
Go
to Installed Extensions page in Business Central.
2.
Identify
the extension that is published in Dev scope.
3.
Uninstall the
Dev scope extension.
4.
Upload
and deploy the .app file again.
After
uninstalling the Dev scope version, I retried uploading the .app file, and this
time the installation succeeded without any issues.
Key
Takeaway
If you
encounter Error AVS0109 while uploading a Business Central extension,
check if the same extension is already installed in Dev scope. If yes,
uninstall it first before uploading the packaged app file. This will prevent
conflicts and allow smooth deployment.