Skip to main content

Notifications

Announcements

No record found.

Small and medium business | Business Central, N...
Suggested answer

When running from Vs Code it points to an old server

(0) ShareShare
ReportReport
Posted on by 10

When I Publish and run from VS Code it is pointing to an old server, I had BC210 as a server name but added a new one BC220. All was working fine but now for some reason when publish and run it tries to open on old BC210 i.e.:

"">localhost:8080/.../

that should have BC220 in the URL

I checked the config and launch.json and searched the whole project for any reference to BC210 and nothing shows up. In fact I have searched for BC210 using windows explorer in both the vs Code workspace and also the "C:\Program Files\Microsoft Dynamics 365 Business Central" and there is no result for BC210 at all.

Does anyone know why this might happen, am thinking some caching going on that I need to clear perhaps?

Thanks

  • Suggested answer
    YUN ZHU Profile Picture
    YUN ZHU 74,115 Super User 2024 Season 2 on at
    RE: When running from Vs Code it points to an old server

    Hi, really strange issue, just a possibility, have you set global and workspace launch configuration in your project?

    https://yzhums.com/32067/

    Hope this helps.

    Thanks.

    ZHU

  • Syvers Profile Picture
    Syvers 10 on at
    RE: When running from Vs Code it points to an old server

    Hi Mohana

    I had already checked that, even went as far as deleting launch.json and creating a new one in case it was cached somehow. I have searched the whole code for any mention of the old server instance and there is none so I have no idea why it is trying to use it.

    Thanks

  • Mohana Yadav Profile Picture
    Mohana Yadav 59,194 Super User 2024 Season 2 on at
    RE: When running from Vs Code it points to an old server

    Please check launch.json

    The below parameters should point to the correct server, instance and port number.

                                   "server":  "helloworld-current",

                                  "serverInstance":  "BC",

                                  "port":  7049,

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Verified Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,391 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,445 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans