C
C#5w ago
Garden19

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
Garden19
Garden19OP5w 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
Pobiega5w 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
Garden19
Garden19OP5w ago
It's unfortunate that I need to learn both Visual Studio and C# as a beginner haha
Pobiega
Pobiega5w ago
the MS tutorials are editor agnostic, as far as I can tell $helloaspnet
MODiX
MODiX5w 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
Pobiega5w ago
thats specifically asp.net, if you need to learn basic C# too I'd start with $helloworld
Garden19
Garden19OP5w ago
I did this yesterday haha
Pobiega
Pobiega5w ago
Great. All of it?
Garden19
Garden19OP5w 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
Pobiega5w 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
Garden19
Garden19OP5w 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
Pobiega5w ago
dotnet new webapi 😄
Garden19
Garden19OP5w ago
but that's an unreachable expectation currently, at least for the time being
Pobiega
Pobiega5w 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
Garden19
Garden19OP5w ago
waaaaait so you use the command line still in VS?
Pobiega
Pobiega5w ago
you certainly can
Garden19
Garden19OP5w ago
I thought you only had to use the terminal in VS code
Pobiega
Pobiega5w ago
nah the CLI is your friend
Garden19
Garden19OP5w ago
I need more friends it seems 😄
Pobiega
Pobiega5w 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
FusedQyou5w 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
Garden19
Garden19OP5w 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
FusedQyou5w 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
Pobiega5w 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
Pobiega5w ago
but if you want to do it via VS, this is the project type you want:
No description
Pobiega
Pobiega5w ago
make sure you never ever pick one with (.NET Framework) in the title
Garden19
Garden19OP5w 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
FusedQyou5w 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
Garden19
Garden19OP5w 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
FusedQyou5w ago
Well, yeah, it kind of is The syntax has gotten more and more simple
Pobiega
Pobiega5w 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
FusedQyou5w 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
Pobiega5w ago
Yup
Garden19
Garden19OP5w ago
I really appreciate the both of you! Where would you both recommend as a starting point?
FusedQyou
FusedQyou5w 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
Pobiega5w ago
dotnet new webapi is my recommended startingpoint. No joke.
FusedQyou
FusedQyou5w ago
Company code is something else, and I doubt it will be different there
Pobiega
Pobiega5w 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
FusedQyou5w 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
Garden19
Garden19OP5w ago
sadly when I've asked questions I've been flamed 😄 This is the first place that I haven't luckily lmao
Pobiega
Pobiega5w ago
Are you familiar with how HTTP and the web works in general? like, request/response, status codes, headers, payloads etc
Garden19
Garden19OP5w ago
all yes except payloads
Pobiega
Pobiega5w ago
payload == request/response body its the "content" of a message
Garden19
Garden19OP5w ago
ohhhh okay!
FusedQyou
FusedQyou5w ago
Sounds like ego programmers Idk where you ask these but actual people willing to help will answer instead of bash a question
Garden19
Garden19OP5w ago
Classic reddit
FusedQyou
FusedQyou5w 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
Pobiega5w ago
speaking of.. add "debugging" to your list of things to learn and learn it early
FusedQyou
FusedQyou5w ago
💯
Pobiega
Pobiega5w ago
it will be soooo useful
FusedQyou
FusedQyou5w ago
Specifically the usage of breakpoints And reading values from them
Garden19
Garden19OP5w ago
I'm unfortunately quite autistic and learning isn't my strongest point, but at least I'm determined!
Pobiega
Pobiega5w ago
software development is largely an exercise in learning its a field of neverending innovation and growth
Garden19
Garden19OP5w 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
FusedQyou5w ago
Think they are the same as long as VSCode is correctly configured But I don't use VSCode for .NET
Garden19
Garden19OP5w 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 ❤️
Want results from more Discord servers?
Add your server