web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Suggested Answer

Setting VS for D365 Business Central

(0) ShareShare
ReportReport
Posted on by

Hello,

 I am using D365 Business Central. I have installed Visual Studio 2022. I have installed AL also. Can some one tell me what is correct procedure to connect VS with BC. I am taking login by using Microsoft Edge in D365 Business Control. Then opened Visual Studio 2022. AL language extension installed. Created sample project by using shift+ctrl+P. 

1) asking about Target Platform with multiple list, selecting 1 release or latest one 

2) asking connect to Business Central Sandbox or Local host. selecting Business Central Sandbox

But it's giving me error that package is not created for folder.

Please help for setup VS.

I have the same question (0)
  • Said BARKAM Profile Picture
    217 User Group Leader on at

    Hello,

    Watch Erik Hougaard's video, he explains how to connect VS with BC for the first time

    www.youtube.com/watch

  • Suggested answer
    Nitin Verma Profile Picture
    21,708 Moderator on at

    Hi Suvarna ,

    you can start creating a test project and then create a App.json file by using your command Ctrl+Shift+P, Generate Manifest

    https://docs.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/devenv-get-started

    pastedimage1657103042151v1.png

  • Suvarna Profile Picture
    on at

    Hi Nitin,

    I have followed steps which mentioned in document.

    Sign up for a Dynamics 365 Business Central sandbox.

    Download Visual Studio Code.

    Download the AL Language extension.

    Press Ctrl+Shift+P to open the User Settings window; here you can modify the telemetry settings.

    Press Alt+A, and right after, Alt+L to trigger the AL Go! command, choose a path to a new empty folder and which version to run. Then choose Microsoft cloud sandbox as the server.

    After running that HelloWorld.al programme , it's  giving me error : Error: The package could not be created.

    Below pasting whole error for u r reference :

    [2022-07-06 18:38:57.69] Using reference symbols cache path: c:\Users\SuvarnaKore\Documents\AL\ALProject5\./.alpackages

    [2022-07-06 18:38:57.69] Sending request to api.businesscentral.dynamics.com/.../metadata

    [2022-07-06 18:39:01.37] The request for path /v2.0/sandbox/dev/metadata?tenant=29aa6a75-44ce-4a46-b9a5-9a39d317d7c2 failed with code NotFound. Reason: Not Found

    [2022-07-06 18:39:01.37] Sending request to api.businesscentral.dynamics.com/.../webendpoint

    [2022-07-06 18:39:02.21] The request for path /v2.0/sandbox/dev/webendpoint failed with code NotFound. Reason: Not Found

    [2022-07-06 18:39:02.21] Sending request to api.businesscentral.dynamics.com/.../metadata

    [2022-07-06 18:39:03.74] The request for path /v2.0/sandbox/dev/metadata?tenant=29aa6a75-44ce-4a46-b9a5-9a39d317d7c2 failed with code NotFound. Reason: Not Found

    [2022-07-06 18:39:03.74] Sending request to api.businesscentral.dynamics.com/.../webendpoint

    [2022-07-06 18:39:04.09] The request for path /v2.0/sandbox/dev/webendpoint failed with code NotFound. Reason: Not Found

    [2022-07-06 18:39:04.09] Sending request to api.businesscentral.dynamics.com/.../metadata

    [2022-07-06 18:39:04.77] The request for path /v2.0/sandbox/dev/metadata?tenant=29aa6a75-44ce-4a46-b9a5-9a39d317d7c2 failed with code NotFound. Reason: Not Found

    [2022-07-06 18:39:04.77] Sending request to api.businesscentral.dynamics.com/.../webendpoint

    [2022-07-06 18:39:05.02] The request for path /v2.0/sandbox/dev/webendpoint failed with code NotFound. Reason: Not Found

    Microsoft (R) AL Compiler version 9.3.9.56214

    Copyright (C) Microsoft Corporation. All rights reserved

    Compilation started for project 'ALProject5' containing '1' files at '18:39:05.033'.

    error AL1045: The package cache c:\Users\SuvarnaKore\Documents\AL\ALProject5\./.alpackages could not be found.

    Compilation ended at '18:39:05.036'.

    Error: The package could not be created.

  • Suggested answer
    Nitin Verma Profile Picture
    21,708 Moderator on at

    Yes, seems like that you have not downloaded the symbol, I will request you please run command from Command line see the image below, and then it will ask you which version you want to select, either Microsoft Cloud Sandbox or Local version, if you select your Cloud version it will ask you the credentials and the please follow the steps symbols will be downloaded, later on you can compile your project.

    After downloading the symbol, there should be a Launch.json file should be created. this file is responsible to update your extension to the respective BC version.

    pastedimage1657113428302v1.png

    I hope you will not face any issue.

  • PravinDangar Profile Picture
    30 on at

    Hi Suvarna,

    Please create your new extension into any other Drive (D:) not into C and downloads Symbol and Try again.

  • Suggested answer
    Steven Renders Profile Picture
    5,672 Moderator on at

    Are you 100% sure you have a BC Sandbox, and not only a production environment?

    If you have a BC Sandbox, in your launch.json file, does the EnvironmentName parameter matches the name of your BC Saas Sandbox?

  • Suggested answer
    Nitin Verma Profile Picture
    21,708 Moderator on at

    Also please see your launch.json should be like this (See the image)

    please change "Environmentname" with your Sandbox name

    also change the property of tenant with your tenant id.

    pastedimage1657114327903v1.png

  • Suggested answer
    YUN ZHU Profile Picture
    95,746 Super User 2025 Season 2 on at

    Hi, I agree with Nitin, it looks like a launch.json issue.

    I made a test video of AL: Go, hope it helps you. (In order to connect exactly to the environment I need, I usually add the Tenant parameter.)

    [View:/cfs-file/__key/communityserver-discussions-components-files/758/Test07071017.mp4:1036:777]

    Hope this helps.

    Thanks.

    ZHU

  • Suvarna Profile Picture
    on at

    Hi Pravin,

    I am unable to download symbols. Error :

    [2022-07-07 09:56:35.13] Sending request to api.businesscentral.dynamics.com/.../webendpoint

    [2022-07-07 09:56:35.58] The request for path /v2.0/sandbox/dev/webendpoint failed with code NotFound. Reason: Not Found

  • Suvarna Profile Picture
    on at

    Hello Steven,

    I checked on my page , it's showing - Environment: Production (Production)

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 2,066

#2
YUN ZHU Profile Picture

YUN ZHU 658 Super User 2025 Season 2

#3
Sumit Singh Profile Picture

Sumit Singh 595

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans