• Welcome to TechPowerUp Forums, Guest! Please check out our forum guidelines for info related to our community.

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

Joined
Apr 2, 2008
Messages
22 (0.00/day)
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.png

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

08.png

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.png

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.


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.


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


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


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


Please advise. What should I do now?
 

Solaris17

Super Dainty Moderator
Staff member
Joined
Aug 16, 2005
Messages
27,389 (3.84/day)
Location
Alabama
System Name RogueOne
Processor Xeon W9-3495x
Motherboard ASUS w790E Sage SE
Cooling SilverStone XE360-4677
Memory 128gb Gskill Zeta R5 DDR5 RDIMMs
Video Card(s) MSI SUPRIM Liquid X 4090
Storage 1x 2TB WD SN850X | 2x 8TB GAMMIX S70
Display(s) 49" Philips Evnia OLED (49M2C8900)
Case Thermaltake Core P3 Pro Snow
Audio Device(s) Moondrop S8's on schitt Gunnr
Power Supply Seasonic Prime TX-1600
Mouse Razer Viper mini signature edition (mercury white)
Keyboard Monsgeek M3 Lavender, Moondrop Luna lights
VR HMD Quest 3
Software Windows 11 Pro Workstation
Benchmark Scores I dont have time for that.
What extensions do you have installed? Maybe try disabling them. To me this seems like some kind of extension interference.
 

silentbogo

Moderator
Staff member
Joined
Nov 20, 2013
Messages
5,622 (1.37/day)
Location
Kyiv, Ukraine
System Name WS#1337
Processor Ryzen 7 5700X3D
Motherboard ASUS X570-PLUS TUF Gaming
Cooling Xigmatek Scylla 240mm AIO
Memory 64GB DDR4-3600(4x16)
Video Card(s) MSI RTX 3070 Gaming X Trio
Storage ADATA Legend 2TB
Display(s) Samsung Viewfinity Ultra S6 (34" UW)
Case ghetto CM Cosmos RC-1000
Audio Device(s) ALC1220
Power Supply SeaSonic SSR-550FX (80+ GOLD)
Mouse Logitech G603
Keyboard Modecom Volcano Blade (Kailh choc LP)
VR HMD Google dreamview headset(aka fancy cardboard)
Software Windows 11, Ubuntu 24.04 LTS
I'm pretty sure it's some issue with your extensions.
The question is: why use VS Code, and not go straight to Visual Studio IDE? No need to bother with random extensions and deal with misconfiguration etc.
VS code is a fancy notepad that tries to be a "jack of all trades" IDE. Never really got into it, specifically because of all these issues. Basically if I need a programming notepad - I use notepad++ on windows, or gedit (or whatever's default on my system ATM) on linux.
If I need an IDE - I just use an IDE.
 
Joined
Mar 6, 2017
Messages
3,376 (1.16/day)
Location
North East Ohio, USA
System Name My Ryzen 7 7700X Super Computer
Processor AMD Ryzen 7 7700X
Motherboard Gigabyte B650 Aorus Elite AX
Cooling DeepCool AK620 with Arctic Silver 5
Memory 2x16GB G.Skill Trident Z5 NEO DDR5 EXPO (CL30)
Video Card(s) XFX AMD Radeon RX 7900 GRE
Storage Samsung 980 EVO 1 TB NVMe SSD (System Drive), Samsung 970 EVO 500 GB NVMe SSD (Game Drive)
Display(s) Acer Nitro XV272U (DisplayPort) and Acer Nitro XV270U (DisplayPort)
Case Lian Li LANCOOL II MESH C
Audio Device(s) On-Board Sound / Sony WH-XB910N Bluetooth Headphones
Power Supply MSI A850GF
Mouse Logitech M705
Keyboard Steelseries
Software Windows 11 Pro 64-bit
Benchmark Scores https://valid.x86.fr/liwjs3
I'm pretty sure it's some issue with your extensions.
The question is: why use VS Code, and not go straight to Visual Studio IDE? No need to bother with random extensions and deal with misconfiguration etc.
VS code is a fancy notepad that tries to be a "jack of all trades" IDE. Never really got into it, specifically because of all these issues. Basically if I need a programming notepad - I use notepad++ on windows, or gedit (or whatever's default on my system ATM) on linux.
If I need an IDE - I just use an IDE.
I concur. The full Visual Studio is the right tool for the job.
 
Top