How do I make a C# Console app build and debug in Visual Studio Code?

William Thompson 0 Reputation points
2025-01-27T07:13:59.36+00:00

How do I make a C# Console app build and debug in Visual Studio Code?

I have already built my C# Console App in Visual Studio Code. The issue I have is when I reopen the folder where the project file is in Visual Studio Code and then rebuilding the code and debugging it again.

Here is what I do and what happens. After I open the folder where the project file resides, I click on this to process the code to debug:

07

And then I click on the appearing "Run and Debug" button

08

But then the bottom status bar says "Looking for CSS classes in the workspace..." followed by a percentage in paragraphs. Why is this? Why does this happen when there are no CSS classes at all and my project is a C# project?

09

Why is this? This is just a brief snapshot of some difficulties I find when I reopen a project after I have closed Visual Studio Code. I have experienced other errors and problems in building and running my code.

To continue, in order to deal with the project as a solution, I click on this icon to open the solution panel.

10

This seemingly allows me to view the solution. As the following view appears, I click on the project.cs file and attempt a debugging session from there.

11..

With this file being displayed, I clicked on the menu option, Run -> Start Debugging

12..

Then, at this point, in the pop up option window that appears in the middle and top of the development environment, I pick "C#":

13..

Something went wrong and in the bottom right of my IDE, I get this message:

14

Please advise. What should I do now?

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

1 answer

Sort by: Most helpful
  1. Anna Xiu-MSFT 30,826 Reputation points Microsoft Vendor
    2025-01-28T02:14:35.68+00:00

    Hi @William Thompson, 

    Welcome to Microsoft Q&A! 

    The tag “Visual Studio” is related to Visual Studio product, for more questions about Visual Studio Code, I recommend you report it in dedicated GitHub-vscode forum where you would get support for this product. 

    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.