C#:
Starting a new project
How to:
Let’s roll up our sleeves and get our hands on some code. Assume you’ve got .NET 6 or later - that’s the latest at the time of writing. You’ll use the .NET CLI for this.
Create a new console app:
dotnet new console -o MyNewProject
Hop into your project directory:
cd MyNewProject
Run your fresh, boilerplate Hello World:
dotnet run
You should see:
Hello, World!
Your new project is off the ground!
Deep Dive
Back in the day, you’d probably fire up Visual Studio and click through a wizard. Not anymore - now the .NET CLI is the go-to. It’s quick and doesn’t assume much about your dev environment.
Alternatives? You bet. Visual Studio is still there for a GUI experience. Rider and Visual Studio Code are solid picks too. But the CLI? It’s all about that lean, mean scripting vibe.
Implementation details? Your .csproj
file holds the keys to the kingdom. It’s XML, but don’t sweat - it pretty much takes care of itself. Here lies info your build process needs - target framework, dependencies, project references, all the good stuff.