C
C#2w ago
raisin

Trying to Learn C Sharp on MacOS

Hi, I am trying to learn c# and been following tutorials, but most of the tutorials are using Visual Studio on windows and I installed visual studio for mac and I have been googling/stack overflowing anything I come across but I cannot figure out how to get the Nuget Packet Manager on Mac, I have stack overflowed it and copy pasted random commands into terminal, but still cannot figure it out. I have tried using Rider but I had trouble following tutorials when every tutorial is using Visual Studio. Could I get any suggestions for how to learn C# for backend web development that is mac friendly?
9 Replies
Angius
Angius2w ago
VS for Mac is dead, so there's that Packages can just be installed from the CLI, dotnet add package Or in case, of Rider, it has it's own Nuget manager If we're talking scaffolding pages, views, etc... you can install a code generator and use that
dotnet tool install --global dotnet-aspnet-codegenerator
dotnet tool install --global dotnet-aspnet-codegenerator
Used like so, for example
dotnet aspnet-codegenerator controller -name TodoItemsController -async -api -m TodoItem -dc TodoContext -outDir Controllers
dotnet aspnet-codegenerator controller -name TodoItemsController -async -api -m TodoItem -dc TodoContext -outDir Controllers
But personally, I prefer to avoid scaffolding
raisin
raisin2w ago
So do you recommend that I just try to follow tutorials with Rider? If so are there any you recommend? I am completely new, I just know basic C# syntax.
Angius
Angius2w ago
Hard for me to recommend any tutorials tbh, I just learned by doing
raisin
raisin2w ago
I don't know how to do "anything" 😔
Angius
Angius2w ago
Well, the basic C# tutorials are here: $helloworld
Angius
Angius2w 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.
Angius
Angius2w ago
With more tutorials to the left
No description
raisin
raisin2w ago
Will check it out ty