microsoft / AL

Home of the Dynamics 365 Business Central AL Language extension for Visual Studio Code. Used to track issues regarding the latest version of the AL compiler and developer tools available in the Visual Studio Code Marketplace or as part of the AL Developer Preview builds for Dynamics 365 Business Central.
MIT License
728 stars 241 forks source link

error AL1024: A package with publisher 'Microsoft', name 'Application', and version compatible with '13.0.0.0' could not be loaded. #4661

Closed kine closed 5 years ago

kine commented 5 years ago

After I have recreated my container to version: "osversion": "10.0.17763.253", "platform": "13.0.28538.0", "tag": "0.0.9.1", "version": "13.5.28640.0" I have problems with basic things - creating the package for the App. When I try to generate package, I am getting the error from the title:

error AL1024: A package with publisher 'Microsoft', name 'Application', and a version compatible with '13.5.0.0' could not be loaded.

even when the symbols were automatically downloaded successfully.

Full output in the VSCode:

[2019-02-27 16:06:53.90] Using reference symbols cache path: c:\git\MSDyn365BC_AppTemplate\MainApp\..\
[2019-02-27 16:06:53.92] Sending request to http://bc:7049/NAV/dev/packages?publisher=Microsoft&appName=Application&versionText=13.5.0.0
[2019-02-27 16:06:53.93] Sending request to http://bc:7049/NAV/dev/packages?publisher=Microsoft&appName=System&versionText=13.0.0.0
[2019-02-27 16:07:49.39] All reference symbols have been downloaded.
Microsoft (R) AL Compiler version 2.1.1.27070
Copyright (C) Microsoft Corporation. All rights reserved

Compilation started for project 'MainApp' containing '1' files at '16:7:49.439'.

error AL1024: A package with publisher 'Microsoft', name 'Application', and a version compatible with '13.5.0.0' could not be loaded.

Compilation ended at '16:7:51.694'.

Error: The package could not be created.

On another project, I had same problem after the update of container, but it started to work lately, I do not know why. Do you have some tip what could be a problem?

kine commented 5 years ago

Docker image used is bcinsider.azurecr.io/bcsandbox:latest-ltsc2019

kine commented 5 years ago

More research: Each time the symbols are downloaded, the Application .app package have different App Id in the NavxManifest.xml inside app zipped folder. The compiler is working only with package, which have App ID = 84dfe9b4-7638-46ba-87d5-c7c242cbec6e. If there is something else, I will get mentioned error. Seems that there is some problem with generating the symbols (may be in connection with transforming the app from C/AL to AL?).

kine commented 5 years ago

And during the tests, I found that the AL is caching the app packages, thus even when I remove the .app files, it is working until next restart of the VSCode... complicating the tests because I need to restart the VSCode each time I download the symbols to be sure that the real one on the disk are used and not some old, which were loaded first...

thpeder commented 5 years ago

Hi @kine, Does it work if you target Application version 13.0.0.0? When you look inside the NavxManifest.xml what version is stamped in there?

kine commented 5 years ago

No, it is same if I use 13.0.0.0 or 13.5.0.0. No difference. In the app there is version 13.5.28640.0 in all cases. See this comparison (top is ok, middle and bottom not working): image

kine commented 5 years ago

Interesting is, that now I cannot simulate it again. It was not working yesterday and today morning, now it looks stable. Is there some process in the docker which takes the symbols sometime from outside the container? I mean e.g. from Azue blob store... because for me it looks stable now, but was not few hours ago, and the container image is still same.

kine commented 5 years ago

Today new image was downloaded, seems stable for now.

atoader commented 5 years ago

@kine we have not been able to get to this in time, but it seems that the issue has gone away. I will close this issue. Please open a new one if you can reproduce it again on newer releases.