Skip to content

Examples: remove stale Common.Logging config and legacy Northwind web.config variants - #385

Merged
lahma merged 1 commit into
mainfrom
4x/examples-cleanup
Nov 3, 2026
Merged

lahma merged 1 commit into
mainfrom
4x/examples-cleanup

Conversation

@lahma

@lahma lahma commented Nov 3, 2026

Copy link
Copy Markdown
Collaborator

Cleans up the examples for 4.0. Only examples/ changes.

Stale Common.Logging configuration. Spring.NET has logged through Microsoft.Extensions.Logging since 3.x, so no example uses Common.Logging any more.

  • Removed the common section group, the <common> element and the Common.Logging redirects from 12 config files:
    • Northwind web projects and integration tests;
    • DataQuickStart and TxQuickStart tests;
    • MSMQ and NMS client/server;
    • the Quartz example;
    • WebQuickStart.
  • Three App.config files were left empty and are deleted.
  • Also removed what only the Common.Logging log4net adapter read: the <log4net> sections and both Northwind Config/Log4Net.xml files.
  • Ported SpringAir's Home.aspx.cs, the one C# user, to Spring.LogManager.GetLogger and a LogDebug template, with a Microsoft.Extensions.Logging reference in the site's References project.

Northwind:

  • Deleted the .NET 3.0/4.0-era Web.net30.config and Web.net40.config alternates in both web projects.
  • Deleted the Conversation project's post-build step that copied Web.net40.config over Web.config. The two files were identical. The net40 copy still mapped *.asmx to the WebServiceHandlerFactory removed in Remove the ASMX web service exporter from Spring.Web #384.
  • The Conversation Web.config and Web.xml pointed at the Spring.Web.Conversation.NHibernate32 assembly, which no longer exists. They now point at Spring.Web.Conversation.NHibernate5, and the type names are the same.

SpringAir:

  • SpringAir.sln now points at the References project file that actually exists (SpringAir.Web.References.csproj).
  • That project no longer references System.Runtime.Remoting, which nothing used.

Asserts: 9 asserts that put the expected value first now put the actual value first. They are in the Northwind, DataQuickStart and SpringAir tests.

Binding redirects: only Mvc5QuickStart has live redirects. Each matches the assembly version it builds against, so none changed.

Verification:

  • Built locally with the dotnet CLI:
    • DataQuickStart, TxQuickStart, MsmqQuickStart, NmsQuickStart and the Quartz example.
    • Northwind integration tests.
    • The SpringAir References and Core.Tests projects.
    • The edited Home.aspx.cs, in a scratch net472 project against the built Spring.Core and Spring.Web.
  • Every edited XML, config and csproj file parses.
  • The Northwind web projects need full MSBuild, so CI's CompileExamples checks them.
  • CompileExamples skips SpringAir, Spring.Examples.Pool and WebQuickStart. Their edits are config and markup only, and were checked by reading.

🤖 Generated with Claude Code

https://claude.ai/code/session_01LGkLQuAuUjvRjrU1AcTsmk

- Remove the Common.Logging sectionGroup, <common> elements and binding
  redirects from the examples' App.config/Web.config files, along with the
  now dead log4net sections and the Northwind Config/Log4Net.xml files that
  only the Common.Logging adapter read. Delete App.config files left empty.
- Port SpringAir.Web.2010 Home.aspx.cs to Microsoft.Extensions.Logging via
  Spring.LogManager and add the Microsoft.Extensions.Logging package to the
  web References project. Point SpringAir.sln at the existing
  SpringAir.Web.References.csproj and drop its unused System.Runtime.Remoting
  reference.
- Delete the Northwind Web.net30.config/Web.net40.config files and the
  Conversation project's post-build step that overwrote Web.config with the
  net40 copy. Point the Conversation web at the NHibernate5 assemblies.
- Put the actual first in constant-first Assert.That calls.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LGkLQuAuUjvRjrU1AcTsmk
Signed-off-by: Marko Lahma <marko.lahma@gmail.com>
@lahma
lahma merged commit 928a277 into main Nov 3, 2026
3 checks passed
@lahma
lahma deleted the 4x/examples-cleanup branch November 3, 2026 20:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant