Vscode error "variable $(workspacefolder) cannot be resolved"

Logan 0 Reputation points
2024-03-17T16:16:24.2466667+00:00

When i try to run a program in vscode it shows an error message which says "variable $(workspacefolder) cannot be resolved". But then when i try to run it in a different compiler, the program runs fine. I tried searching for the solution but can't find the exact solution. What should i do?

Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
4,888 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Tianyu Sun-MSFT 29,446 Reputation points Microsoft Vendor
    2024-03-18T10:10:20.78+00:00

    Hello @Logan,

    Thank you for taking time to post this issue in the Microsoft Q&A forum.

    As VS Code is different from VS, please kindly post your question here: Github – vscode for further help.

    Thanks for your understanding, have a great day.

    Best Regards,

    Tianyu


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments