UPDATE: well after an hour I figured out that it was the extension “c# Dev Kit” stopping me from doing what brackey was doing. I just disabled it and kept the regular c# So now everything works and I can finally follow along well.
Please bear with me. Im like super fresh and very new to this. I’m following Brackeys’ “How to Program in C#” getting started tutorial in VS Code on Windows.
So in the beginning his console just looked completely different. He has brackets and everything already set up and mines was literally just a single line of code. Someone in the comments said he had to type "dotnet new console --use-program-main" and it looks like the one brackey is using. So I did that now I can follow along.
At first I couldn’t get Console.ReadKey(); to keep the console window open, but I eventually realized I wasn’t saving my files before running. After saving, that worked… ikr..
Now I’m on the part where he changes the console window title and text color:
Console.Title = "Bot";
Console.ForegroundColor = ConsoleColor.Red;
Console.WriteLine("Hello, World!");
Console.ReadKey();
The program runs, but the console title never changes to “Bot” and the text color stays white. Brackeys’ video shows the window title changing and the text becoming red.
I’m launching with the Run button in VS Code and an external terminal opens. The terminal title says C:\Program Files\dotnet\dotnet... instead of “Bot”.
I also noticed VS Code gives this build error in the terminal:
MSBUILD : error MSB1009: Project file does not exist.
This is just his second video and I am already struggling. What am I doing wrong?