Skip to content
Mike Christensen edited this page Aug 28, 2026 · 1 revision

Upgrading to KitchenPC 2.0

KitchenPC 2.0 modernizes the supported .NET and persistence stack and separates optional web integration from the engine. It is a major release because applications may need project and logging changes even when their KitchenPC behavior remains the same.

Framework support

All packages now target .NET 8 and .NET 10. Applications targeting .NET Standard, .NET Framework, or an older .NET runtime must upgrade their target framework before consuming KitchenPC 2.0.

Package selection

Choose only the packages required by the application:

# Domain model, static context, parsing, aggregation, and modeler
dotnet add package KitchenPC.Core --version 2.0.0

# PostgreSQL and NHibernate persistence
dotnet add package KitchenPC.DB --version 2.0.0

# AddKPCContext and ASP.NET Core request identity integration
dotnet add package KitchenPC.Core.AspNetCore --version 2.0.0

KitchenPC.Core.Middleware.KPCMiddleware retains its namespace and AddKPCContext API, but its assembly moved from KitchenPC.Core to KitchenPC.Core.AspNetCore. Existing web source generally needs no namespace change after adding the new package.

Logging migration

KitchenPC no longer depends on log4net. Remove log4net only when the host has no other reason to use it, then pass the application's standard logger factory to the context:

var context = DBContext.Configure
   .Logging(loggerFactory)
   .Adapter(/* adapter builder */)
   .Identity(() => AuthIdentity.Anonymous)
   .Create();

The public log4net fields Parser.Log and ModelingSession.Log were removed. Use category filters, DefaultTracer(ILoggerFactory), or a custom ITracer instead. Custom IKPCContext implementations must expose an ILoggerFactory; use NullLoggerFactory.Instance when logging is not required.

Persistence dependencies

The DB package upgrades FluentNHibernate to 3.4, NHibernate to 5.7, and Npgsql to 10. Applications that directly reference those libraries should align their versions with KitchenPC.DB. Pay particular attention to custom NHibernate mappings and Npgsql date/time mappings. Test schema initialization, database import/export, recipe search, and representative mutations against a non-production PostgreSQL database before deployment.

Recommended validation

  1. Restore and build the application on its target .NET runtime.
  2. Initialize each configured context and exercise every enabled capability.
  3. For web applications, confirm scoped anonymous and authenticated contexts resolve correctly.
  4. Run a recipe search and detail read against PostgreSQL.
  5. Parse raw ingredients and aggregate a shopping list.
  6. Verify application logging categories and production log levels.

Clone this wiki locally