How to fix "variable $(workspaceFolder) can not be resolved. Please open a folder."

amrbahaa 0 Reputation points
2024-09-23T17:07:43.3166667+00:00

error when debugging. It used to work just fine before idk what happed to visual studio

Visual Studio Debugging
Visual Studio Debugging
Visual Studio: A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.Debugging: The act or process of detecting, locating, and correcting logical or syntactical errors in a program or malfunctions in hardware. In hardware contexts, the term troubleshoot is the term more frequently used, especially if the problem is major.
1,004 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Anna Xiu-MSFT 29,516 Reputation points Microsoft Vendor
    2024-09-24T03:22:30.62+00:00

    Hi @amrbahaa, 

    Welcome to Microsoft Q&A! 

    Are you using Visual Studio Code or Visual Studio? They are two different products.

    If it is VS Code, please report it to the dedicated GitHub-vscode forum where you would get support for this product.

    If it is Visual Studio, you can close all running VS instances and try to delete the hidden .vs, bin and obj folders in the project folder. Then, debug it again. 

    Thanks for your understanding.  

    Sincerely,

    Anna


    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

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.