C#: Running Code & Tools
.NET CLI
Modern C# uses the dotnet command-line tool. Install the .NET SDK first.
dotnet new console -n MyApp # create a new console project
dotnet build # compile
dotnet run # build and run
Editors / IDEs
- Visual Studio — the flagship Windows IDE (free Community edition). Full debugger, profiler, designer.
- VS Code — install the C# Dev Kit extension for language support and debugging.
- JetBrains Rider — cross-platform .NET IDE (paid, excellent for Unity work)
Key .NET CLI commands
dotnet new sln -n MySolution # create a solution
dotnet new classlib -n MyLib # class library
dotnet add package Newtonsoft.Json # add a NuGet package
dotnet test # run tests
dotnet publish -c Release -o ./publish # publish for deployment
NuGet (package manager)
NuGet is the .NET package ecosystem. Packages are hosted on nuget.org.
dotnet add package Microsoft.EntityFrameworkCore
dotnet list package # list installed packages
Unity development
C# is the scripting language for Unity, the game engine. Unity uses a modified version of Mono (or IL2CPP). Key differences:
- Unity uses .NET Standard 2.1 API surface
- Scripts extend MonoBehaviour for lifecycle events (Start, Update)
- Use UnityEngine namespace for engine access
Quick check below!