-
Notifications
You must be signed in to change notification settings - Fork 32
Upgrading to 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.
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.
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.0KitchenPC.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.
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.
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.
- Restore and build the application on its target .NET runtime.
- Initialize each configured context and exercise every enabled capability.
- For web applications, confirm scoped anonymous and authenticated contexts resolve correctly.
- Run a recipe search and detail read against PostgreSQL.
- Parse raw ingredients and aggregate a shopping list.
- Verify application logging categories and production log levels.
KitchenPC is MIT licensed. Runnable applications live in KitchenPC/Samples.