Files
DynamORM/docs/net40-amalgamation.md
2026-02-26 07:49:08 +01:00

1.3 KiB

.NET 4.0 Amalgamation

Legacy .NET 4.0 consumers should use the amalgamated source model.

Files

  • AmalgamationTool/DynamORM.Amalgamation.cs: merged source file.
  • DynamORM.Net40.csproj: net40 build project that compiles the amalgamation output.

Regenerate Amalgamation

The amalgamation file must be regenerated after library source changes.

Current workflow in this repository:

  1. Build or run AmalgamationTool (or use an equivalent merge script).
  2. Merge all files from DynamORM/ into AmalgamationTool/DynamORM.Amalgamation.cs.
  3. Build DynamORM.Net40.csproj.

Build in Mono Container

docker run --rm -v "$PWD":/src -w /src mono:latest \
  bash -lc "msbuild /t:Build /p:Configuration=Release DynamORM.Net40.csproj"

Expected output artifact:

  • bin/Release/net40/DynamORM.Net40.dll

Build with .NET SDK Container

docker run --rm -v "$PWD":/src -w /src mcr.microsoft.com/dotnet/sdk:10.0-preview \
  dotnet build DynamORM.Net40.csproj -c Release

Important Constraint

Do not force net40 into the main multi-target DynamORM/DynamORM.csproj for modern workflows.

Keep net40 compatibility validated through the dedicated amalgamation project so legacy consumers can embed the single-file source without destabilizing primary targets.