VSCode: Could not publish the package to the server

andrewtandrewt Member Posts: 73
Hi all,
I've just started my first steps with development in vscode, but currently facing a problem with the deployment I can't get around.

I have a NAV 2018 instance available on a local server
I've installed vscode and the AL Language Extension, Version 0.12.15355
I've created the HelloWorld demo project from the AL!GO template
I was able to download symbols from my local server instance so the compiler does resolve references and does not show any compile errors anymore.

But when I finally try to deploy the demo extension to my local server using F5 or Ctrl+F5, I receive the following error:
"Error: File h:\Work\ALProjects\TestATO001\MyCompany_TestATO001_1.0.0.0.app does not exist".

Run Build Task (Ctrl+Shift+B) returns the message "No build Task to run found."
I assume there's a piece missing in my build and deployment procedure but I cannot locate the issue.

Any hints what's missing here ?

Many thanks in advance
AndrewT


My launch.json file:
{
"version": "0.2.0",
"configurations": [
{
"type": "al",
"request": "launch",
"name": "NAV 2018 BASELINE",
"server": "http://MyLocalAPPServer",
"port": 9002,
"serverInstance": "EMEA-BASELINE-110-DE",
"tenant": "default",
"authentication": "Windows",
"startupObjectId": 22
}
]
}

My app.json file:
{
"id": "ba7bf685-bd53-442f-bf0e-3290ef57dd7e",
"name": "TestATO001",
"publisher": "MyCompany",
"brief": "",
"description": "",
"version": "1.0.0.0",
"compatibilityId": "1.0.0.0",
"privacyStatement": "",
"EULA": "",
"help": "",
"url": "",
"logo": "",
"capabilities": [],
"dependencies": [],
"screenshots": [],
"platform": "11.0.0.0",
"application": "11.0.0.0",
"idRange": {
"from": 50100,
"to": 50149
}
}

Best Answer

  • andrewtandrewt Member Posts: 73
    Answer ✓
    ok guys, success at last !

    Instead of simply using F5 or "Start Debugging" from the VSCode menu, as mentioned on all tutorials I found so far on the web, I started using the AL Cmdlets from the Command Palette directly:
    Step 1: AL:Package - creates the .app package file on the root of the project folder
    Step 2: AL:Publish - deploys the extension to the specified NAV Server Instance

    After playing around for days, trying with different versions of VSCode, the AL Language Extension, virtual machines etc. all with the same result, I found the above procedure finally worked for me in any of the created test scenarios.

    On all tutorials I found on the web so far, I haven't found any clue to use the AL:Package command to create the .app package prior to the deployment. Just F5 should do the trick - but it doesn't, at least on my environments.
    So I am still wondering if there's something missing in the tutorials or something's still not properly set up on my environment but at least I now have a procdure that works for me.

    I hope sharing this experience may help other guys a little to get up to speed with the new NAV development as well.

    Cheers
    Andrew


Answers

  • andrewtandrewt Member Posts: 73
    Update:
    After a few days of break I came back to this issue today, and without any changes being made just tried to start Debugging (F5) - and it worked !
    The .app file was created within the root of the project folder and the modification has been deployed to the local NAV server tenant where I was able to install/uninstall the Extension through the extension management.

    Next steps:
    I tried to reproduce the steps by doing the following:
    - Uninstall and Unpublish the Extension through Extension Management
    - delete the .app file from the project folder through VSCode Explorer
    - adjust the Publisher parameter on the app.json file to a different value

    After that F5 creates the same error than before and I am now unable to bring it back to work !

    So basically I assume I am doing the right steps for the deployment because it worked just once but something strange is wrong with my settings or my workspace I guess.

    Any hints would be highly appreciated.

    Regards and a Happy New Year to everyone out there.

    Cheers
    Andrew


  • andrewtandrewt Member Posts: 73
    Answer ✓
    ok guys, success at last !

    Instead of simply using F5 or "Start Debugging" from the VSCode menu, as mentioned on all tutorials I found so far on the web, I started using the AL Cmdlets from the Command Palette directly:
    Step 1: AL:Package - creates the .app package file on the root of the project folder
    Step 2: AL:Publish - deploys the extension to the specified NAV Server Instance

    After playing around for days, trying with different versions of VSCode, the AL Language Extension, virtual machines etc. all with the same result, I found the above procedure finally worked for me in any of the created test scenarios.

    On all tutorials I found on the web so far, I haven't found any clue to use the AL:Package command to create the .app package prior to the deployment. Just F5 should do the trick - but it doesn't, at least on my environments.
    So I am still wondering if there's something missing in the tutorials or something's still not properly set up on my environment but at least I now have a procdure that works for me.

    I hope sharing this experience may help other guys a little to get up to speed with the new NAV development as well.

    Cheers
    Andrew


  • DenSterDenSter Member Posts: 8,307
    I've noticed that as well, where sometimes F5 (or ctrl+F5) does not create the app file, and then when I build it manually for some reason from that point on it works alright. Sometimes it works, sometimes it doesn't, really annoying, but at least now you know how to create the app file
  • tbkkltbkkl Member Posts: 6
    Is it possible to see the process of the App creation? I have made a "stupid" first try to move our application to an extension. So I took a working subset of Objects (around 800) smashed them into VS CODE. the CPU Usage goes right up after moving the files and that keeps like that. so tried to push F5 and guess what? File not found. so I tried your approach: AL Package. CPU Usage permanent high, VS CODE e.g. snippets don't work (loads for ever). the Info Panel switches to OUTPUT and that's it ... so it is doing something - but is it actually creating the app file?! No Idea... And what does it mean if I have to import all around 2000 Objects ... that is hardly possible I guess?
Sign In or Register to comment.