Repository navigation
Spring.NET 3.1.0 is the first feature release since 3.0.3, and it is mostly about paying down the debt that the 3.0.3 logging migration left behind: two regressions from that change are fixed, a long-standing per-request memory leak is closed, and the expression language gains user-registrable extension methods and properties.
If you are upgrading from 3.0.x, read the Upgrading section below — this release changes the strong-name identity of the assemblies.
Highlights
Extension methods and properties in the expression language (#348)
Closes #221. Spring expressions can now call user-registered extension methods and read user-registered extension properties. Registration is scoped to a variables dictionary rather than being global, and accepts either a Spring lambda expression or a .NET delegate. The new statics live on Expression, beside the existing RegisterFunction.
Per-request memory leak fixed (#347)
Fixes #239. ObjectDefinitionValueResolver.ResolveInnerObjectDefinition added every IDisposable created from an inner <object> definition to the factory-lifetime DisposableInnerObjects set whenever the owning definition reported IsSingleton == true. In a web application two owner categories satisfy that while being created anew on every request, so the set grew for the lifetime of the container and nothing was released until the factory itself was disposed.
SimpleLoggingAdvice works again (#346)
Fixes #341. The Common.Logging → Microsoft.Extensions.Logging migration in 3.0.3 broke SimpleLoggingAdvice in two ways for anyone upgrading from 3.0.2 or earlier:
- Legacy level names were rejected —
<property name="LogLevel" value="Info"/>threwTypeMismatchException, because MEL spells themInformation/Warning/Critical/Nonewhere Common.Logging usedInfo/Warn/Fatal/Off/All. The reference documentation and example configurations still used the old spellings. - Advice was silent —
AbstractLoggingAdviceresolved its logger eagerly in the constructor, and sinceLogManager.LoggerFactoryis typically still unset while the container builds the advice, it cachedNullLogger.Instancepermanently. The log category was also alwaysAbstractLoggingAdvicerather than the concrete advice type, so category-based filter rules never matched.
Structured logging throughout (#349)
Every ILogger call now uses a constant message template with named placeholders instead of interpolation or string.Format, so structured sinks receive real properties. Analyzers CA2254, CA2253, CA2017 and CA1727 enforce this at build time.
Dependencies
NHibernate 5.5.2 → 5.6.0 (#329) and Newtonsoft.Json 13.0.3 → 13.0.4 (#324).
Build and release
The build moved to the .NET 10 SDK (#332) and from NUKE to Fallout 10.4.0 (#344). Packages are now published to nuget.org with Trusted Publishing — GitHub Actions OIDC exchanged for a short-lived key — so there is no long-lived API key to leak or rotate (#350).
Upgrading
Assembly versions have changed (#351, #352)
AssemblyVersion is now pinned to major.minor.0.0 instead of tracking the full package version. This release ships 3.1.0.0; 3.0.3 shipped 3.0.3.0.
The assemblies are strong-named, so on .NET Framework this is a change of binding identity: an application compiled against 3.0.x needs a binding redirect to load 3.1.0. Projects with AutoGenerateBindingRedirects enabled get this automatically. Otherwise add, per assembly:
<dependentAssembly>
<assemblyIdentity name="Spring.Core" publicKeyToken="65e474d141e25e07" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-3.1.0.0" newVersion="3.1.0.0" />
</dependentAssembly>In exchange, this is the last time a patch release moves the binding identity: 3.1.1, 3.1.2 and so on will all keep AssemblyVersion 3.1.0.0 and be drop-in replacements. FileVersion continues to carry the exact version, and InformationalVersion carries the full semantic version plus the commit SHA.
What's Changed
- Bump typescript from 5.8.3 to 5.9.2 in /website by @dependabot[bot] in #303
- Bump @types/node from 24.1.0 to 24.3.0 in /website by @dependabot[bot] in #307
- Bump sass from 1.89.2 to 1.90.0 in /website by @dependabot[bot] in #305
- Bump gatsby from 5.14.5 to 5.14.6 in /website by @dependabot[bot] in #306
- Bump gatsby-plugin-sass from 6.14.0 to 6.15.0 in /website by @dependabot[bot] in #311
- Bump @fortawesome/fontawesome-svg-core from 7.0.0 to 7.0.1 in /website by @dependabot[bot] in #312
- Bump gatsby-plugin-sitemap from 6.14.0 to 6.15.0 in /website by @dependabot[bot] in #314
- Bump gatsby-plugin-react-helmet from 6.14.0 to 6.15.0 in /website by @dependabot[bot] in #318
- Bump gatsby-plugin-image from 3.14.0 to 3.15.0 in /website by @dependabot[bot] in #316
- Bump sass from 1.90.0 to 1.92.1 in /website by @dependabot[bot] in #317
- Bump gatsby-source-filesystem from 5.14.0 to 5.15.0 in /website by @dependabot[bot] in #313
- Use NET 10 SDK and upgrade to NUKE 10 by @lahma in #332
- Bump js-yaml from 3.14.1 to 3.14.2 in /website by @dependabot[bot] in #333
- Bump Newtonsoft.Json from 13.0.3 to 13.0.4 by @dependabot[bot] in #324
- Bump @fortawesome/react-fontawesome from 0.2.3 to 3.1.0 in /website by @dependabot[bot] in #326
- Bump @types/node from 24.3.0 to 24.9.1 in /website by @dependabot[bot] in #331
- Bump gatsby-plugin-sharp from 5.14.0 to 5.15.0 in /website by @dependabot[bot] in #321
- Bump axios from 1.11.0 to 1.12.2 in /website by @dependabot[bot] in #325
- Bump gatsby from 5.14.6 to 5.15.0 in /website by @dependabot[bot] in #322
- Bump NHibernate from 5.5.2 to 5.6.0 by @dependabot[bot] in #329
- Add AGENTS.md and CLAUDE.md for AI coding agents by @lahma in #343
- Migrate build orchestration from NUKE to Fallout 10.4.0 by @lahma in #344
- Fix website npm security alerts (115 of 118 Dependabot alerts) by @lahma in #345
- Fix SimpleLoggingAdvice configuration breakage from the MS logging migration by @lahma in #346
- Fix per-request memory leak from inner object disposal tracking by @lahma in #347
- Bump typescript from 5.9.2 to 7.0.2 in /website by @dependabot[bot] in #334
- Add extension methods and properties to the expression language by @lahma in #348
- Convert all logging to structured message templates by @lahma in #349
- Bump @fortawesome/fontawesome-free from 7.0.0 to 7.3.1 in /website by @dependabot[bot] in #335
- Publish to nuget.org with trusted publishing instead of an API key by @lahma in #350
- Give the assemblies a coherent, binding-stable version by @lahma in #351
- Pass the build's versions to the examples MSBuild call by @lahma in #352
Full Changelog: v3.0.3...v3.1.0