Hacker News new | ask | show | jobs
by mbeattie 1885 days ago
C# itself isn't hard, but the ecosystem is. I have been writing code for years and wanted to take a look at dotnet not that long ago. There are no tutorials on how to make something that is not also a tutorial on visual studio. I want to learn how to make a webapp or whatever in C#.NET, learn the paradigms, classes, and functions that I need to do that. I'll go look into Visual Studio after I understand the basics to make things easier, but I shouldn't need that as the price of admission. The author addresses this with a comment about goland. But the point is that any other language, the beginner material is about "here's a main.go text file that starts a web server..." and not "click some buttons in one specific IDE and magic happens". I can use emacs, vi, or VScode to write C, go, rust, python, javascript, etc... just about everything. But not C#.
2 comments

You don't need Visual Studio for C#, I write all C# and F# in VS Code with official MS extension, you can use the dotnet CLI to do everything (install packages, build tasks, etc, just like cargo/npm/etc).

The experience is surprisingly good.

If you want to create and build + run a .NET web API, you just do:

"dotnet new webapi"

>cd into the directory

"dotnet run"

Just a note that this isn't true anymore. All the official C# tutorials default to VSCode + dotnet CLI. The Web framework tutorials also let you switch instructions depending on what editor you're using.