C
C#16mo ago
DimOn4ik

❔ Please help me

Help me set up Visual Studio code
210 Replies
Pobiega
Pobiega16mo ago
$vscode
MODiX
MODiX16mo ago
Follow the instructions here on getting started with DevKit for C# in VSCode: https://code.visualstudio.com/docs/csharp/get-started
Get started with C# and .NET in Visual Studio Code
Getting Started with C# and .NET Development in Visual Studio Code
DimOn4ik
DimOn4ikOP16mo ago
I can't download .Net
Angius
Angius16mo ago
What happens that prevents you from doing it?
DimOn4ik
DimOn4ikOP16mo ago
I don't know. I did everything according to the instructions, but it still does not work for me. Let's go to ds and you will tell me what to do
Jimmacle
Jimmacle16mo ago
what does "it doesn't work" mean?
DimOn4ik
DimOn4ikOP16mo ago
Please someone join me on the bell and help me set up Visual Studio Code
Jimmacle
Jimmacle16mo ago
it's not gonna help if you can't explain what's not working
DimOn4ik
DimOn4ikOP16mo ago
I did everything that is written in the instructions, but every time it crashes
Jimmacle
Jimmacle16mo ago
and says what?
DimOn4ik
DimOn4ikOP16mo ago
or failed to start or does not find the file in everything
Jimmacle
Jimmacle16mo ago
i don't think that's literally what it says
Pobiega
Pobiega16mo ago
You need to put in some minimum level of effort for us to help.
DimOn4ik
DimOn4ikOP16mo ago
Let's go to the bell and I'll show you. My English is bad
Jimmacle
Jimmacle16mo ago
i'm not joining voice assuming that's what "bell" is supposed to mean
DimOn4ik
DimOn4ikOP16mo ago
DimOn4ik
DimOn4ikOP16mo ago
DimOn4ik
DimOn4ikOP16mo ago
This is first It is written there. Open debug solution folder @jimmacle
Angius
Angius16mo ago
Do you have a C# project that you opened? Or is it just a loose .cs file?
DimOn4ik
DimOn4ikOP16mo ago
i clicked create file
Jimmacle
Jimmacle16mo ago
C# is based on projects, you can't run a standalone .cs file dotnet new console in the terminal will create a new console project
DimOn4ik
DimOn4ikOP16mo ago
please tell me where i should click to do i created a new project
Jimmacle
Jimmacle16mo ago
okay, so open that folder in vs code (i would also really recommend using VS and not VS Code)
DimOn4ik
DimOn4ikOP16mo ago
It was not possible to find any installed .NET Core SDKs Did you mean to run .NET Core SDK commands? Install a .NET Core SDK from: https://aka.ms/dotnet-download
Microsoft
.NET Downloads (Linux, macOS, and Windows)
Official .NET downloads for Linux, macOS, and Windows. .NET is a free, cross-platform, open-source developer platform for building many different types of applications.
Angius
Angius16mo ago
Well, do you have an SDK installed? Or just the runtime?
DimOn4ik
DimOn4ikOP16mo ago
DimOn4ik
DimOn4ikOP16mo ago
I have two
Pobiega
Pobiega16mo ago
open a terminal and write dotnet --info and show us the result
DimOn4ik
DimOn4ikOP16mo ago
Pobiega
Pobiega16mo ago
yeah, no SDK installed
DimOn4ik
DimOn4ikOP16mo ago
how to install?
Pobiega
Pobiega16mo ago
and you have two old runtimes that are x86 installed
Pobiega
Pobiega16mo ago
Pobiega
Pobiega16mo ago
that should work
Jimmacle
Jimmacle16mo ago
could this be another case of PATH ordering? i know it happens with VS installs, idk about plain SDK installs
Pobiega
Pobiega16mo ago
not yet, it should have listed it as alternative install but we might end up there, because of the runtimes
Pobiega
Pobiega16mo ago
DimOn4ik
DimOn4ikOP16mo ago
My problem is that I download, but nothing happens
Pobiega
Pobiega16mo ago
this box should have listed the x64 installation
DimOn4ik
DimOn4ikOP16mo ago
Pobiega
Pobiega16mo ago
My russian isn't very good, but that seems okay?
DimOn4ik
DimOn4ikOP16mo ago
DimOn4ik
DimOn4ikOP16mo ago
yes
Pobiega
Pobiega16mo ago
open up C:\Program Files\dotnetand show me what you got in there
DimOn4ik
DimOn4ikOP16mo ago
Pobiega
Pobiega16mo ago
and in the SDKs folder? sdk
DimOn4ik
DimOn4ikOP16mo ago
Pobiega
Pobiega16mo ago
okay lets try the PATH thing
DimOn4ik
DimOn4ikOP16mo ago
what is it?
Pobiega
Pobiega16mo ago
press windows+R
DimOn4ik
DimOn4ikOP16mo ago
I'll come in 5 seconds
Pobiega
Pobiega16mo ago
rundll32.exe sysdm.cpl,EditEnvironmentVariables
DimOn4ik
DimOn4ikOP16mo ago
farther
Pobiega
Pobiega16mo ago
are you looking at a window with two big white boxes?
DimOn4ik
DimOn4ikOP16mo ago
yes
Pobiega
Pobiega16mo ago
Pobiega
Pobiega16mo ago
kinda like this
DimOn4ik
DimOn4ikOP16mo ago
+
Pobiega
Pobiega16mo ago
yes so, in the bottom list find the one called PATH or Path
DimOn4ik
DimOn4ikOP16mo ago
i find
Pobiega
Pobiega16mo ago
then click edit
DimOn4ik
DimOn4ikOP16mo ago
Pobiega
Pobiega16mo ago
ah, its grayed out we must open the window another way close it down, press windows key and write something like "system environment variables"
Pobiega
Pobiega16mo ago
Pobiega
Pobiega16mo ago
for me 😄 "Edit system environmentvariables"
DimOn4ik
DimOn4ikOP16mo ago
I don't have that
Pobiega
Pobiega16mo ago
you do, its just called something different in russian ok, open the control panel instead
DimOn4ik
DimOn4ikOP16mo ago
translate is so bad
Pobiega
Pobiega16mo ago
controlnya panel
DimOn4ik
DimOn4ikOP16mo ago
ok i open
Pobiega
Pobiega16mo ago
and then "System" and then "advanced system settings"
DimOn4ik
DimOn4ikOP16mo ago
this
Pobiega
Pobiega16mo ago
da!
Pobiega
Pobiega16mo ago
the bottom button,
Pobiega
Pobiega16mo ago
should open the same window as before, but we can now edit the path
DimOn4ik
DimOn4ikOP16mo ago
DimOn4ik
DimOn4ikOP16mo ago
ye da
Pobiega
Pobiega16mo ago
yes good show me your list
DimOn4ik
DimOn4ikOP16mo ago
Pobiega
Pobiega16mo ago
Pobiega
Pobiega16mo ago
okay, the bottom one click that, then press "move up" 5 times
DimOn4ik
DimOn4ikOP16mo ago
the lowest
Pobiega
Pobiega16mo ago
yes C:\Program Files\dotnet
DimOn4ik
DimOn4ikOP16mo ago
did
Pobiega
Pobiega16mo ago
needs to be above C:\Program Files (x86)\dotnet show now
DimOn4ik
DimOn4ikOP16mo ago
did
Pobiega
Pobiega16mo ago
show me
DimOn4ik
DimOn4ikOP16mo ago
Pobiega
Pobiega16mo ago
ya hasho smatrit no, the list
DimOn4ik
DimOn4ikOP16mo ago
Pobiega
Pobiega16mo ago
this, again dima, slisho minya show me the list of your Path variable again after you made the changes
DimOn4ik
DimOn4ikOP16mo ago
samt
Pobiega
Pobiega16mo ago
I need to check that its correct
DimOn4ik
DimOn4ikOP16mo ago
Pobiega
Pobiega16mo ago
harasho close it all down close any terminal windows, close VS Code open a new terminal and do dotnet --info again
DimOn4ik
DimOn4ikOP16mo ago
Pobiega
Pobiega16mo ago
show the full thing all of it
DimOn4ik
DimOn4ikOP16mo ago
Pobiega
Pobiega16mo ago
harasho!
Pobiega
Pobiega16mo ago
Pobiega
Pobiega16mo ago
now, dotnet new console that will create a new project Always create your projects via dotnet new
DimOn4ik
DimOn4ikOP16mo ago
Pobiega
Pobiega16mo ago
dotnet run and it will run your program
DimOn4ik
DimOn4ikOP16mo ago
the file I downloaded from the site?
Pobiega
Pobiega16mo ago
no? now you write your own programs the SDK is installed and working the problem was your Path we fixed it
DimOn4ik
DimOn4ikOP16mo ago
? where should I click to launch?
Pobiega
Pobiega16mo ago
no click dotnet run you can install the devkit now, if you want $vscode
MODiX
MODiX16mo ago
Follow the instructions here on getting started with DevKit for C# in VSCode: https://code.visualstudio.com/docs/csharp/get-started
Get started with C# and .NET in Visual Studio Code
Getting Started with C# and .NET Development in Visual Studio Code
Pobiega
Pobiega16mo ago
but we've fixed your dotnet installation, so now you can make things
DimOn4ik
DimOn4ikOP16mo ago
Pobiega
Pobiega16mo ago
remove "test1.cs" ty sdelal harasho dima, ya gorzhus tebya
DimOn4ik
DimOn4ikOP16mo ago
DimOn4ik
DimOn4ikOP16mo ago
which one should I write in?
Pobiega
Pobiega16mo ago
Program.cs C#... osnovan(?) na proyekte, ne na fayle
DimOn4ik
DimOn4ikOP16mo ago
DimOn4ik
DimOn4ikOP16mo ago
xD I write Spasibo but programme write Hello World
Pobiega
Pobiega16mo ago
did you save file?
DimOn4ik
DimOn4ikOP16mo ago
no
Pobiega
Pobiega16mo ago
save the file, try again 🙂
DimOn4ik
DimOn4ikOP16mo ago
DimOn4ik
DimOn4ikOP16mo ago
......
TheRanger
TheRanger16mo ago
well, do what the error is telling you
DimOn4ik
DimOn4ikOP16mo ago
это приложение столько хлопот мне дало
Jimmacle
Jimmacle16mo ago
i mean, you have to write valid C# code for it to compile and run
DimOn4ik
DimOn4ikOP16mo ago
DimOn4ik
DimOn4ikOP16mo ago
i dont no
Jimmacle
Jimmacle16mo ago
you don't need to touch that file
TheRanger
TheRanger16mo ago
problem isnt with vscode right now, its your code
Jimmacle
Jimmacle16mo ago
you need to fix the syntax errors in your code
DimOn4ik
DimOn4ikOP16mo ago
Jimmacle
Jimmacle16mo ago
maybe it's time to try a C# tutorial $helloworld
TheRanger
TheRanger16mo ago
did you save?
DimOn4ik
DimOn4ikOP16mo ago
ye
Jimmacle
Jimmacle16mo ago
i don't think so because Console.Writeline is not a method and should give you a different error
TheRanger
TheRanger16mo ago
^
Pobiega
Pobiega16mo ago
the screenshot also has the "modified file" indicator for Program.cs
DimOn4ik
DimOn4ikOP16mo ago
DimOn4ik
DimOn4ikOP16mo ago
i save
Pobiega
Pobiega16mo ago
nazmite ctrl+s you did not
Pobiega
Pobiega16mo ago
Pobiega
Pobiega16mo ago
that white ball means its modified and not saved
Jimmacle
Jimmacle16mo ago
side question, why isn't VSC showing any diagnostics for these errors in the editor
DimOn4ik
DimOn4ikOP16mo ago
'Console' does not contain a definition for 'Writeline'
Jimmacle
Jimmacle16mo ago
correct the method is called WriteLine not Writeline
DimOn4ik
DimOn4ikOP16mo ago
Pobiega
Pobiega16mo ago
WriteLine L not l
Angius
Angius16mo ago
Big L = yes Small l = no
DimOn4ik
DimOn4ikOP16mo ago
Pobiega
Pobiega16mo ago
Da
DimOn4ik
DimOn4ikOP16mo ago
всё равно ошибка still a mistake
Pobiega
Pobiega16mo ago
show error
DimOn4ik
DimOn4ikOP16mo ago
error CS0117: "Console" не содержит определение для "Writeline". [D:консольконсоль.csproj]
Angius
Angius16mo ago
Did you save
Florian Voß
Florian Voß16mo ago
.
Pobiega
Pobiega16mo ago
you did not save again
Jimmacle
Jimmacle16mo ago
you have to save your file every time you change it before compiling again
Florian Voß
Florian Voß16mo ago
or enable auto save
Jimmacle
Jimmacle16mo ago
i have autosave on in rider and still mash ctrl+s out of habit
DimOn4ik
DimOn4ikOP16mo ago
It's a terrible app. I clicked save six times and nifiga
Florian Voß
Florian Voß16mo ago
same in every IDE or Editor for me
Jimmacle
Jimmacle16mo ago
this seems like user error
Florian Voß
Florian Voß16mo ago
xD
Jimmacle
Jimmacle16mo ago
i have never had a problem saving files in vs code
Angius
Angius16mo ago
VS Code might not be the best IDE there is, but it does save files, I assure you
Jimmacle
Jimmacle16mo ago
but yeah if it's that terrible just use VS
DimOn4ik
DimOn4ikOP16mo ago
I am a novice programmer. I'm going to college and that's why I decided to start studying
Jimmacle
Jimmacle16mo ago
Visual Studio
Visual Studio 2022 Community Edition – Download Latest Free Version
Try our free, fully-featured, and extensible IDE for creating modern developer apps for Windows, Android, & iOS. Download Community for free today!
Jimmacle
Jimmacle16mo ago
use this instead
DimOn4ik
DimOn4ikOP16mo ago
I tried to set up Visual Studio for a month, and then I tried Visual code
Florian Voß
Florian Voß16mo ago
visual studio is more beginner friendly
DimOn4ik
DimOn4ikOP16mo ago
In Visual Studio, he writes to me that the version does not fit
Jimmacle
Jimmacle16mo ago
try it again now that we fixed your SDK paths
DimOn4ik
DimOn4ikOP16mo ago
ok
DimOn4ik
DimOn4ikOP16mo ago
TheRanger
TheRanger16mo ago
weird, VS Code works perfectly for me, its not a terrible app
DimOn4ik
DimOn4ikOP16mo ago
let's wait
Jimmacle
Jimmacle16mo ago
i definitely don't like VSC but it's usable at least
TheRanger
TheRanger16mo ago
dotnet run isnt even a vscode thing
DimOn4ik
DimOn4ikOP16mo ago
I wrote that I need to update the version of the code
TheRanger
TheRanger16mo ago
you can even run it in command prompt
Florian Voß
Florian Voß16mo ago
it is for beginners honestly. If you arent comfortable in using the CLI and know what a csproj is and everything you are lost
TheRanger
TheRanger16mo ago
no, VS Code is not beginner friendly
Florian Voß
Florian Voß16mo ago
I meant it is terrible for beginners
Pobiega
Pobiega16mo ago
and this is why we recommend VS 😄
Jimmacle
Jimmacle16mo ago
i wish rider had a free option so we could recommend that instead when
Pobiega
Pobiega16mo ago
yeah
Denis
Denis16mo ago
Молодец Feel free to DM me if you need help 🇷🇺
DimOn4ik
DimOn4ikOP16mo ago
Hello I never managed to log in to Visual Studio
DimOn4ik
DimOn4ikOP16mo ago
TheRanger
TheRanger16mo ago
looks like you created a .net framework project $newproject
MODiX
MODiX16mo ago
When creating a new project, prefer using .NET over .NET Framework, unless you have a very specific reason to be using .NET Framework. .NET Framework is now legacy code and only get security fix updates, it no longer gets new features and is not recommended. https://cdn.discordapp.com/attachments/569261465463160900/899381236617855016/unknown.png
DimOn4ik
DimOn4ikOP16mo ago
yes
TheRanger
TheRanger16mo ago
follow this image basically you have a syntax in ur code that is not supported in c# 7.3
DimOn4ik
DimOn4ikOP16mo ago
I have two
TheRanger
TheRanger16mo ago
yea choose the first one
DimOn4ik
DimOn4ikOP16mo ago
Thank you
DimOn4ik
DimOn4ikOP16mo ago
especially thanks to him. He sat with me for about 2 hours yesterday setting up
DimOn4ik
DimOn4ikOP16mo ago
why write using System?
TheRanger
TheRanger16mo ago
so you can detect the classes that are included in this Namespace, Console for example if you dont write it,the compiler wouldn't know where to find this class
DimOn4ik
DimOn4ikOP16mo ago
my code works without it
TheRanger
TheRanger16mo ago
But in here you're in top level statement mode, so using System; is implicitly added
DimOn4ik
DimOn4ikOP16mo ago
so I don't have to write this?
TheRanger
TheRanger16mo ago
if you're in top level statement mode, then yes
DimOn4ik
DimOn4ikOP16mo ago
what is this mode and where can I find or see it?
TheRanger
TheRanger16mo ago
well, if you write code directly without the public static void Main(string[] args) method, it indicates u are already in that mode
using System;

class Program
{
public static void Main(string[] args)
{
Console.WriteLine("Hello world");
}
}
using System;

class Program
{
public static void Main(string[] args)
{
Console.WriteLine("Hello world");
}
}
this is not top level statement ^ but this is
Console.WriteLine("Hello world");
Console.WriteLine("Hello world");
its just sugar syntax , for people who dont want to define the class and declare the Main Method
DimOn4ik
DimOn4ikOP16mo ago
large programs can also work without this, or will you have to memorize it?
SinFluxx
SinFluxx16mo ago
You can only use it for your main method/file, any other .cs files you have need to contain the full syntax
Florian Voß
Florian Voß16mo ago
yes you can work without this if you want. But you should still understand that its the exact same thing as if you would put all your top level statements inside a main method, jsut in case you face them in other people's code you can press ctrl + period > convert to program main style or smth like that
Accord
Accord16mo ago
Was this issue resolved? If so, run /close - otherwise I will mark this as stale and this post will be archived until there is new activity.
Want results from more Discord servers?
Add your server