C# code not running in VS Code

I am on the if, else module of the C# course. I have installed a C# Dev Kit on VS Code, but I need to select a process to attach to.

I’m not sure what this means and I don’t know what process to attach to.

Can someone explain what this means and what I need to attach to?

Thank you

Hello there,

Note: I know very little C#

As far as I am aware, the C# Dev Kit extension just helps with debugging; it does not compile and run the code.

So, you need a runtime, and, once you start a process (computer task) using the runtime, you can attach the debugger to it in order to view the execution.

Commonly, you would use the .NET toolchain to build your C# code into something you can execute.

Hope this helps

Not quite.
My issue is I have entered code to run the dice game.
When I try to run that for feedback in the terminal, VS Code asks me to select a process to attach to.

I searched for a .NET toolchain in the dropdown list, but I found nothing.

Hmmm…I’ve only used regular Visual Studio for this. I’m not sure what information to tell you. I do have to admit it’s a lot easier to edit C# code in that program. Maybe you can try this. It’s fairly simple to run a console app with it.