Stage 6 · Lesson 2 of 8
NuGet packages and solutions
A .NET project is described by its .csproj file. A groups several projects together: typically your app, a for the core logic and a test project. this up with dotnet new sln, dotnet new classlib and dotnet sln add, and dotnet add reference links projects together.
Libraries come from NuGet, the online store of .NET packages. dotnet add package adds a PackageReference line to the .csproj. On another machine, dotnet restore downloads the packages again, so you never commit the bin/ and obj/ folders.
Keeping the core logic in a class library means both the console app and the tests can use it. Check that a package is maintained before depending on it.
A question to check yourself, an AI practice session and 2 cheat sheet entries come when you add the roadmap to your account. Add it
Resources for this stage
Start with
- GitHub repoFreeProject Based Learning
Community maintained · Beginner
Follow one guided build in your language, then build your own without a guide
Keep handy
Also worth your time
How to present each project: the problem, stack, challenges and results
- Build Your Own XGo deeper
When you want a harder build: a shell, a key-value store or a tiny Git, from scratch