Programming foundations

Stage 6 · Lesson 2 of 8

NuGet packages and solutions

Build and ship your first projects

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 repoFree
    Project Based Learning

    Community maintained · Beginner

    Follow one guided build in your language, then build your own without a guide

Keep handy

  • Free APIs that give a small project real data to work with

Also worth your time

Mark this stage as not done?