✅ Setting up C# in VS code
Having a issue, setting it up or whatnot? I'm not sure what the problem is.
130 Replies
$vscode
Follow the instructions here on getting started with DevKit for C# in VSCode: https://code.visualstudio.com/docs/csharp/get-started
Getting Started with C# in VS Code
Getting Started with C# and .NET Development in Visual Studio Code
Can you voice call?
No.
Then dont comment
????
If you want help, ask questions that include relevant details?
I'm doing a module. I've got a walk through, you could take two seconds out of your time besides giving someone unneeded resourses
Im getting mad because it keeps crashing my computer
1. It is very rare to find someone willing to help by voice.
2. You can also take time writing more details
-"it doesnt work, pls fix" is really nothing to go for.
buddy, either take a moment to look or lemme show you or go on. Thanks
You made a thread in #help which is not for VC, it is help by text.
You are free to upload images or videos.
Im doing that certification
You might want to start by giving more detail. If you don't want to give more detail... maybe try a different forum that isn't about helping via text
This is the help fourm
Yes
And you have given us no details by which to help you
We're not mind readers, and as you've noted, this is the help forum. Where we use text to communicate.
I've commented what I've said, I can show you better then explaining
- Do you get any errors?
It's either a human factor error
Can I DM you @⇲⇲⇲⇲⇲⇲⇲⇲⇲⇲⇲⇲⇲⇲⇲⇲
to show or explain
We do not accept DMs here.
Why can you not just provide us details here
Better getting help from +50K people than a single person, isn't it?
All right onto the next user that will be more willing to help a individual
So, I'm doing the module on FreeCodeCamp
Correct?
For installing or setting up on VS
for the certification
I was trying to run a basic program
but, I'm familiar with Python
so I'm not sure If I am running the program incorrect
Maybe I compiled it wrong?
Any errors??
How do you call to compile and launch the program?
Do you have C# dev kit extension installed in your VSCode?
No I don't get the error's I was following the module and it told me to type dotnet Build into the terminal and when I do that it give's me a crash
Crash that says?
What?
Okay, this is the best way I know how to explain it
without wasting my time at this point of night
You said it gives you a crash, does it say anything when it crashes?
Closes the software/program down
people are trying to help, please be mindful of that and don't make statements about wasting your time
the inverse could equally be stated
I understand just frustration
I appologize @⇲⇲⇲⇲⇲⇲⇲⇲⇲⇲⇲⇲⇲⇲⇲⇲
My regards go out to you.
Do you have a code example of the C# code you are trying to build?
Just compiling a simple one, like you would in .py
I suppose
Console.WriteLine("Hello World");
Ok.
I'm working on the Foundational here, so please bare with me.
It's getting late, I was trying to explain because I am tired
So, dotnet build does not actually start the program. It simply just compiles it.
You can run it with either dotnet run or by vscode's launch button (which requires an extension or manual configuration)
Are you allowed to run a simple command like that
Ahhhhh
lemme try that in the terminal
One moment
This extension is what was linked at the beginning.
And it guides you through setting up VSCode for C# including extensions that are up-to date with Microsoft standards.
Yeah. I get this kind of error
It's not a supported kind of file extention
So, I was using the intergrated terminal on MS
Copy/paste the entire terminal output
From your
dotnet run
Couldn't find a project to run. Ensure a project exists in C:\Users\Edwar\Desktop\General\Coding Project's\C# Experience, or pass the path to the project using --project.
So, I'm assuming you just created a
.cs
fileYes
And didn't create a project
I'm going by the module lol
dotnet run file.cs
is a feature that is coming soon, but it does not exist yet.
Well, the module tells you to create a projectlemme go back over it.
One moment
Yes. You did not do that last
Exercise
Exercise - Create, build, and run your application
Fred could I screen share with you
You can screenshot
I'm not joining voice
C# is project-based, which means you need to create a project instead of running individual files
for now
So basically, I need a actual more detailed project ran or operated
You can create a project from the
dotnet new
command which is mentioned in https://learn.microsoft.com/en-us/training/modules/install-configure-visual-studio-code/7-exercise-create-build-run-app at the topThat's the one I was having a issue on
So what output do you get when you run the command that module tells you to run?
I'm new to C#
Yes, I understand that. What output do you get when you run the command that module tells you to run?
dotnet new console -o ./CsharpProjects/TestProject
I entered this command into the terminal
What do you see after you entered that into the terminal?
Any new text being written below it?
yeah Im onto something
:PauseChamp:
You don't even need the terminal to create and run projects in vsc
error CS8802: Only one compilation unit can have top-level statements.
This is probably from you creating a separate .cs file earlier
You'll want to delete that one
I done that still same error
A project collects all the files in the same folder or nested folder from your .csproj
I'm not the kind to skip a module without actually getting a understand
Then you still have multiple files in the same folder or a nested folder from your csproj
I see all these links to resources & really just have to wonder how ya'll got here
Yes, you created a project in the current directory and in
CSharpProjects
This is messing things upOkay, lets start from scratch
good decision
before you do that, try deleting this 👇 and run
dotnet run
again?
...that folder is what is referred to, here 👆


no need for the terminal at all
They're following the setup tutorial, probably best to just keep following it for now
Unknown User•7d ago
Message Not Public
Sign In & Join Server To View
No, that would not result in this output. Probably best to not make baseless speculation 🙂
I'm tapping tonight sense I cannot get anyone on Voice, my brain is fried and it's late, I will close this discusion and open one tomorrow
Unknown User•7d ago
Message Not Public
Sign In & Join Server To View
Okay, tomorrow better attitude
Getting help is better then no progress
Thanks everyone
@⇲⇲⇲⇲⇲⇲⇲⇲⇲⇲⇲⇲⇲⇲⇲⇲ sorry again for my attitude
How do I get rid of the CSharp on the left
right click it...?
No
C# Experience
?Yes
That's the folder you opened
should I there
Should I leave there or close
Unknown User•7d ago
Message Not Public
Sign In & Join Server To View
All right I am determined to figure this out
Unknown User•7d ago
Message Not Public
Sign In & Join Server To View
Can someone walk me through where I am currently
Unknown User•7d ago
Message Not Public
Sign In & Join Server To View
Hang on not to fast TacoBell
Unknown User•7d ago
Message Not Public
Sign In & Join Server To View
Alright tebeco, you know what you must do
New nickname time
Unknown User•7d ago
Message Not Public
Sign In & Join Server To View
TebeCo
so currently my screen is here
You will be reminded about it in 1 day
Unknown User•7d ago
Message Not Public
Sign In & Join Server To View
Yeah basically, I was using the intergrated terminal also for C# on Microsoft
Learning
lets just stop here
Normally when I use Python, I save it as a .py and run it and it'll run the program as long as a loop or something executiable is avalibale
excuse my grammer
but I want to ask even if I run the command
Unknown User•7d ago
Message Not Public
Sign In & Join Server To View
Nothing is going to display correct?
Send me that personally
?? just bookmark it
I guess what I should ask, I need more then hello world to be able to run a actual line in C#
Thanks
btw
Unknown User•7d ago
Message Not Public
Sign In & Join Server To View
you know python right?
Unknown User•7d ago
Message Not Public
Sign In & Join Server To View
How you save it as .py
Unknown User•7d ago
Message Not Public
Sign In & Join Server To View
Do I need to keep it saved as .CS or .csproj
Unknown User•7d ago
Message Not Public
Sign In & Join Server To View
No I followed a module and got lost and still am confused by it
Unknown User•7d ago
Message Not Public
Sign In & Join Server To View
Makes sense
I agree
Is the program suppose to be executable with just the Console.WriteLine
That's my question
Unknown User•7d ago
Message Not Public
Sign In & Join Server To View
Okay tomorrow I'll @ you
Unknown User•7d ago
Message Not Public
Sign In & Join Server To View
We can start from there
Unknown User•7d ago
Message Not Public
Sign In & Join Server To View
yes
Unknown User•7d ago
Message Not Public
Sign In & Join Server To View
Okay
Will do. Have a goodnight take care
@TeBeCo
Reminder
nickname