I recieved the following error when trying to build my Business Central App: A package with publisher ‘Microsoft’, name ‘Application’, and a version compatible with ‘188.8.131.52’ could not be loaded. Compile-AppInNavContainer : App generation failed At C:\Install\BuildAgent\vsts-agent-win-x64-2.146.0\_work\3\s\PowerShell\BuildAgent\Compile-App.ps1:24 char:5 + Compile-AppInNavContainer -containerName $containerName ` + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : NotSpecified: (:) [Write-Error], WriteErrorException + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Compile-AppInNavContainer PowerShell exited with code ‘1’.
The scenario I had was an onprem extension version 13 that should be run on a cu 3 which relies on imported CSIDE objects.
Do you want to go hybrid where you mix your Business Central extensions with CSIDE objects and have problems with getting these objects included in symbols? Then you will find a checklist here that hopefully helps you to solve that issue.
If you want to get a better understanding of symbols before you proceed I recomend this blog post Symbols demystifed.
If you have upgraded to Business Central from an earlier version, double check that you have imported the business central symbols. Instructions on how to do that can be found here.
If you are going to go hybrid and mix CSIDE object changes with extensions you have to first enable generating of symbols in the NST. You can find the setting in the Business Central Administration.
Alternatively you change directly in the CustomSettings.config file (C:\Program Files\Microsoft Dynamics 365 Business Central\130\Service)
When these settings are done, check that you actually have imported your CSIDE objects 😉
After you have downloaded the symbols, check that your cside objects are included in the symbols. I do this with the VS Code extension AL Explorer. Right click on the symbol file Microsoft_Application_<Version No.>.app, choose “Open In AL Object Browser”. Scroll down and see if the objects are included.
If they aren’t included doublecheck that the version number in the client matches the version number on the symbol file. There is a bug in a lot of onprem versions where the application symbols are wrong, which have been reported at GitHub.
If these versions doesn’t match then unpublish the wrong symbol app or regenerate symbos. Instructions exists this link. Follow them and then download the symbols again. A minor detail, make sure that your application version in app.json is at least on the same version number as you installation. Ex. if your application version is 13.0.27183, make sure your application version is at least 184.108.40.206.
So now you have the right symbol file and it still doesn’t work. The last thing to do is to do a COMPLETE generation of symbols in the datase. It seems that if you import a smaller set of CSIDE objects you manage without this but if you have bigger sets of CSIDE objects you need to do this. If you run a complete installation see this link for instructions to do a complete generation of symbols.