This is an automated email from the ASF dual-hosted git repository. FreeAndNil pushed a commit to branch Feature/305-dotnet-10-build-cleanup in repository https://gitbox.apache.org/repos/asf/logging-log4net.git
commit fd8b97f7c95510f53879c8d09bf73dfdac19df46 Author: Jan Friedrich <[email protected]> AuthorDate: Tue Aug 4 23:43:44 2026 +0200 Update BUILDING.md to match the actual build --- doc/BUILDING.md | 62 +++++++++++++++++++++++++-------------------------------- 1 file changed, 27 insertions(+), 35 deletions(-) diff --git a/doc/BUILDING.md b/doc/BUILDING.md index acd88889..39680300 100644 --- a/doc/BUILDING.md +++ b/doc/BUILDING.md @@ -6,11 +6,10 @@ Log4net provides support for the following targets TL;DR (Windows): - install Visual Studio Build Tools (at least VS2019) -- install nodejs (at least v16) -- install dotnet (v8+) and the .NET SDK (current latest) +- install the .NET SDK (v10 or better - the sources use C# 14 language features) - in the project folder: - - `npm i` - - `npm run build` + - `dotnet build src/log4net.sln` + - `dotnet test src/log4net.sln` TL;DR (Docker): - install docker (if you haven't already) @@ -25,49 +24,42 @@ TL;DR (Docker): - `dotnet test /logging-log4net/src/log4net.sln` TL;DR (!Windows): -- install the dotnet SDK - v8 or better -- install Mono (you're going to need it to target certain versions of .NET) -- install nodejs 16+ - - in the project folder: - - `npm i` - - `export DOTNET_CORE=1 npm run build` - - we force using `dotnet` on non-windows targets for now. At some point, - this should become automatic +- install the dotnet SDK - v10 or better (the sources use C# 14 language features) +- in the project folder: + - `dotnet build src/log4net.sln` + - `dotnet test src/log4net.sln` +- Mono is *not* required. The `net462` / `net472` targets are compiled against the + `Microsoft.NETFramework.ReferenceAssemblies` packages that the .NET SDK references + implicitly. Mono would only be needed to *execute* net4x assemblies. +- the `log4net.Tests` project skips `net462` on non-Windows platforms: VSTest hosts net4x tests + through `TestHostNetFramework/testhost.exe`, a .NET Framework executable, so the run aborts + with `TESTRUNABORT` on Linux and macOS. The `net462` tests run only on the Windows job in CI. ## The full story Options: - build locally. Suggested environment: - Pre-requisites: - - Visual Studio 2019 Build Tools - - include desktop targets at least - - include dotnet core targets or download and install - the latest dotnet sdk (you will need at least v8) + - the .NET SDK, at least v10 (the sources use C# 14 language features) + - on Windows: Visual Studio 2019 Build Tools or later, including desktop targets + - only Windows can *run* the `net462` tests; elsewhere that target is skipped - Binaries can be built with a Visual Studio or Rider installation - Binaries, packages and a release zip can be built via commandline - - Ensure that you have a reasonably modern NodeJS installed (at least version 8+) - - `npm ci` - - `npm run build` - - optionally `npm test` to run all tests - - optionally `npm run release` to generate release artifacts -- build locally (CLI edition) - - install nodejs (at least v16) - - `npm i` - - `npm run build` -- build via docker for windows, using the `build-with-docker-for-windows.bat` script -- build via the vs2019 Windows AppVeyor image. There is an appveyor.yml file - included which (should) build if you set up AppVeyer to track - your fork. AppVeyer is free for open-source projects. - (TODO: should have a link to the official AppVeyor build) + - `dotnet build src/log4net.sln` + - optionally `dotnet test src/log4net.sln` to run all tests + - release artifacts are generated by the scripts under `scripts/`: + - `scripts/build-preview.ps1` for a preview package + - `scripts/build-release.ps1` for a full release +- build via docker, see the Docker section above ## Updating the site Log4Net uses Maven to build the site. Source artifacts can be found under `src/site`. -Building the site can be accomplished with `npm run build-site`. You should have maven -installed: -- Windows: get it from Scoop -- OSX: get it from Homebrew -- Linux: use your package manager +Building the site can be accomplished with `./mvnw site` (`.\mvnw.cmd site` on Windows) - the +committed Maven wrapper fetches the pinned Maven version, so only a JDK is required. This is +also what `scripts/build-release.ps1` uses. The `antora` profile inherited from `logging-parent` +activates automatically because `src/site/antora` exists; it installs Antora and runs it against +`antora-playbook.yaml`, so no separate npm step is needed. The site will be generated in `target/site`, and can be viewed locally. Updates should be pushed to the `asf-staging` branch of [https://github.com/apache/logging-log4net-site](https://github.com/apache/logging-log4net-site])
