Appendix C
Package Versions Used in This Book
Every "improved recipe" listing in this book was compiled, and most were run, against .NET 9 with nullable reference types enabled. The table lists the NuGet packages and the versions the listings were verified with. Newer versions usually work, but major versions sometimes change APIs or drop support for older target frameworks, so pin the major version in your project file and read the release notes before upgrading.
Two things I ran into while testing, so you don't have to:
- Several 2026 releases (the 10.x and 11.x lines of the Microsoft.Extensions packages, Serilog.AspNetCore 11, Quartz 4) target newer frameworks and warn or fail on .NET 8 and .NET 9. If you are on .NET 8 or 9, use the major version that matches your runtime.
- The newest
Microsoft.Data.SqlClientbuilt fine but failed at run time on .NET 9 in my tests. The 6.1 line worked everywhere.
Data and caching
| Package | Verified version | Chapters |
|---|---|---|
| Microsoft.Data.SqlClient | 6.1.x | 1, 6, 7, 17 |
| Dapper | 2.1.x | 1 |
| Microsoft.Extensions.Caching.Memory | 9.0.x | 3 |
| Microsoft.Extensions.Caching.StackExchangeRedis | 9.0.x | 3 |
| Microsoft.Extensions.Caching.Hybrid | 9.x | 3 |
Logging, errors, configuration and security
| Package | Verified version | Chapters |
|---|---|---|
| Serilog.AspNetCore | 9.0.0 | 4 |
| Polly.Core | 8.x | 5 |
| Azure.Extensions.AspNetCore.Configuration.Secrets | 1.5.x | 6 |
| Azure.Identity | 1.x | 6 |
| Microsoft.Extensions.Identity.Core | 9.0.x | 7 |
| System.DirectoryServices.AccountManagement | 9.0.x | 7 |
Integration
| Package | Verified version | Chapters |
|---|---|---|
| MailKit (with MimeKit) | 4.18 and 5.0 | 9, 17 |
| SSH.NET | 2026.0.x | 10 |
| ClosedXML | 0.105.x | 11 |
| QuestPDF | 2026.9.x | 11 |
| ReportViewerCore.NETCore (community) | 15.1.x | 11 |
| Microsoft.Extensions.Http | 9.0.x | 13 |
| Microsoft.Extensions.Http.Resilience | 9.10.x | 13 |
| System.ServiceModel.Http / .Primitives | 8.1.x | 13 |
Applications
| Package | Verified version | Chapters |
|---|---|---|
| Microsoft.Extensions.Hosting | 9.0.x | 14 |
| Microsoft.Extensions.Hosting.WindowsServices | 9.0.x | 14, 17 |
| Quartz.Extensions.Hosting | 3.x | 14 |
| Hangfire.AspNetCore / Hangfire.SqlServer | 1.8.x | 14 |
| Microsoft.Extensions.TimeProvider.Testing | 9.x | 15 |
| Yarp.ReverseProxy | 2.3.x | 16 |
| Microsoft.AspNetCore.SystemWebAdapters.CoreServices | 2.3.x | 16 |
Licenses differ. Most packages here are MIT or Apache 2.0. QuestPDF and Hangfire have commercial terms for some users; Chapters 11 and 14 explain them. Check each package's current license before you ship.