C
C#3mo ago
Hiking Vegan

VS Code vs Visual Studio

I'm a beginner to C#, I've been told to learn Net core for a potential job so long as I'm successful but every tutorial and resource I come across uses Visual Studio code instead of visual studio, is there a reason for this? I need to learn using Visual Studio because that's what I'd be using in the job 😦 Also if anyone has any resources that I can learn with which uses Visual Studio then please share! ❤️
57 Replies
Hiking Vegan
Hiking VeganOP3mo ago
That's really interesting! I never knew that ohhhh okay! Do you know any beginner friendly tutorials which teach C# using Visual Studio? All of the tutorials I've come across there is either a language barrier or they use VS Code, even the microsoft tutorials use VS Code haha
Pobiega
Pobiega3mo ago
The language itself is the same regardless of what IDE/editor you use. Especially so for ASP.NET, where you dont have any GUI editors involved
Hiking Vegan
Hiking VeganOP3mo ago
It's unfortunate that I need to learn both Visual Studio and C# as a beginner haha
Pobiega
Pobiega3mo ago
the MS tutorials are editor agnostic, as far as I can tell $helloaspnet
MODiX
MODiX3mo ago
Get started with ASP.NET Core
A short tutorial using the .NET CLI to create and run a basic Hello World app using ASP.NET Core.
Pobiega
Pobiega3mo ago
thats specifically asp.net, if you need to learn basic C# too I'd start with $helloworld
Hiking Vegan
Hiking VeganOP3mo ago
I did this yesterday haha
Pobiega
Pobiega3mo ago
Great. All of it?
Hiking Vegan
Hiking VeganOP3mo ago
Yeahh for that one I think the layout of VS is just weird to me because I'm not used to it, but I need to start learning somewhere
Pobiega
Pobiega3mo ago
honestly, just dive in you have a solution explorer that lets you navigate files. You have an editor window for writing code CTRL+T lets you quickly navigate the project
Hiking Vegan
Hiking VeganOP3mo ago
See what I mean 😄 I just really want to eventually get to the stage I can happily make an API to go with my angular project
Pobiega
Pobiega3mo ago
dotnet new webapi 😄
Hiking Vegan
Hiking VeganOP3mo ago
but that's an unreachable expectation currently, at least for the time being
Pobiega
Pobiega3mo ago
then load that project up in VS and get going honestly, thats what I'd do then experiment with that, and see what happens as you change stuff
Hiking Vegan
Hiking VeganOP3mo ago
waaaaait so you use the command line still in VS?
Pobiega
Pobiega3mo ago
you certainly can
Hiking Vegan
Hiking VeganOP3mo ago
I thought you only had to use the terminal in VS code
Pobiega
Pobiega3mo ago
nah the CLI is your friend
Hiking Vegan
Hiking VeganOP3mo ago
I need more friends it seems 😄
Pobiega
Pobiega3mo ago
VS can create projects from within itself ofc, but I prefer the CLI and for stuff like publishing, CLI is just plain better
FusedQyou
FusedQyou3mo ago
Visual Studio was made for .NET/C++ specific project, so it naturally supports C# incredibly well. VSCode is more lightweight, but it requires a lot of extra work if you want to properly develop for C#. The reason is because this app does not target just .NET or C++, but any language you might want to develop. The big thing here is the plugin system that allows you to control how your editor behaves
Hiking Vegan
Hiking VeganOP3mo ago
So if you're using the CLI, when you go to new project, what is the point in the templates? Or do you skip those and just use the CLI at that point?
FusedQyou
FusedQyou3mo ago
But I doubt VSCode will be able to properly help you with anything related to GUI, like Avalonia or WPF. VS is probably a better option here. Today there's also Rider as a cross-platform alternative, and it recently turned free for non-commercial projects. I suggest you look at that as well.
Pobiega
Pobiega3mo ago
if you use the CLI, you use a template (webapi is the template in my above example) it will create the basic project structure, and you can then load that up in VS or you create the project via VS "new project" dialog, thats fine too - but easier to get it wrong tbh
Pobiega
Pobiega3mo ago
but if you want to do it via VS, this is the project type you want:
No description
Pobiega
Pobiega3mo ago
make sure you never ever pick one with (.NET Framework) in the title
Hiking Vegan
Hiking VeganOP3mo ago
My cousin owns a large company but needs a c# dev, he has gave me 2 months to learn NET Core, Angular and C# and the only requirement which is mandatory is that I use VS and not VS Code 😦 I only had experience in html and css a month ago, I'm a month in and learned JavaScript, typescript, tailwind css, Angular is at a comfortable stage but this C# is kinda blowing my mind a little lmao
FusedQyou
FusedQyou3mo ago
Uhh yeah it depends on past experience if you are going to be able to just learn C# in such a short time With past programming experience it might work, but if you're a beginner you will be missing plenty of broader experience which will make it much harder You can always try And honestly most experience comes from actually working
Hiking Vegan
Hiking VeganOP3mo ago
sadly literally none, but he said it's "easy to pick up", but I'm guessing that's because he understands what he is doing whereas I don't haha
FusedQyou
FusedQyou3mo ago
Well, yeah, it kind of is The syntax has gotten more and more simple
Pobiega
Pobiega3mo ago
a few important things to keep in mind for C# is... - C# is project based, not file based. You can't "run" a random .cs file. - C# is primarily an OOP (object oriented programming) language. We make classes, and objects from those classes, and call methods on those instances/classes. You cant just define a function anywhere. - in C# you have an "entrypoint" which is where your program starts. In a console app thats Main(), in a web api its your setup.
FusedQyou
FusedQyou3mo ago
But it will take a long time to write proper C# There are plenty of improtant things to know. A lot of them will be familiar as an experienced programmer switching languages But as a beginner it will take a long time before you grasp on the idea of proper C#
Pobiega
Pobiega3mo ago
Yup
Hiking Vegan
Hiking VeganOP3mo ago
I really appreciate the both of you! Where would you both recommend as a starting point?
FusedQyou
FusedQyou3mo ago
But yeah I'd say learn it good and well and you can probably partake in a project at your job Honestly, no offense to others, but the code being written is often very shit anyway
Pobiega
Pobiega3mo ago
dotnet new webapi is my recommended startingpoint. No joke.
FusedQyou
FusedQyou3mo ago
Company code is something else, and I doubt it will be different there
Pobiega
Pobiega3mo ago
if your goal is to write a webapi, start there you will need to google a lot. you will need to ask questions.
FusedQyou
FusedQyou3mo ago
Web API ☝️ Otherwise you can make a simple console app My very first C# project was a Discord bot. That's fun too Just use an existing library and write around it
Hiking Vegan
Hiking VeganOP3mo ago
sadly when I've asked questions I've been flamed 😄 This is the first place that I haven't luckily lmao
Pobiega
Pobiega3mo ago
Are you familiar with how HTTP and the web works in general? like, request/response, status codes, headers, payloads etc
Hiking Vegan
Hiking VeganOP3mo ago
all yes except payloads
Pobiega
Pobiega3mo ago
payload == request/response body its the "content" of a message
Hiking Vegan
Hiking VeganOP3mo ago
ohhhh okay!
FusedQyou
FusedQyou3mo ago
Sounds like ego programmers Idk where you ask these but actual people willing to help will answer instead of bash a question
Hiking Vegan
Hiking VeganOP3mo ago
Classic reddit
FusedQyou
FusedQyou3mo ago
Seen plenty of cases of people bashing questions saying "and why didn't you just debug this first to make sure"? Seriously, not everybody is at this level Unity discord server is full of it
Pobiega
Pobiega3mo ago
speaking of.. add "debugging" to your list of things to learn and learn it early
FusedQyou
FusedQyou3mo ago
💯
Pobiega
Pobiega3mo ago
it will be soooo useful
FusedQyou
FusedQyou3mo ago
Specifically the usage of breakpoints And reading values from them
Hiking Vegan
Hiking VeganOP3mo ago
I'm unfortunately quite autistic and learning isn't my strongest point, but at least I'm determined!
Pobiega
Pobiega3mo ago
software development is largely an exercise in learning its a field of neverending innovation and growth
Hiking Vegan
Hiking VeganOP3mo ago
did breakpoints yesterday, unsure if it's different between VS Code and VS, but the ms tutorial used VS Code to teach it
FusedQyou
FusedQyou3mo ago
Think they are the same as long as VSCode is correctly configured But I don't use VSCode for .NET
Hiking Vegan
Hiking VeganOP3mo ago
I greatly appreciate you all for this. Thank you for not roasting a beginner and actually giving useful pointers. I'll try giving the web api a go after work today and see where I end up ❤️

Did you find this page helpful?