From 2d57aed1aadb6fc0d0ffaa67674ba6ad00baf4cd Mon Sep 17 00:00:00 2001 From: Rolf Kristensen Date: Thu, 8 Jun 2023 19:48:31 +0200 Subject: [PATCH] Version 5.2.0 (#142) --- NLog.Windows.Forms.sln | 1 + NLog.Windows.Forms/NLog.Windows.Forms.csproj | 18 ++++++++++-------- README.md | 5 +++++ appveyor.yml | 4 ++-- build.ps1 | 2 +- 5 files changed, 19 insertions(+), 11 deletions(-) diff --git a/NLog.Windows.Forms.sln b/NLog.Windows.Forms.sln index ee833a0..ddf8f3b 100644 --- a/NLog.Windows.Forms.sln +++ b/NLog.Windows.Forms.sln @@ -21,6 +21,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution ProjectSection(SolutionItems) = preProject appveyor.yml = appveyor.yml build.ps1 = build.ps1 + README.md = README.md EndProjectSection EndProject Global diff --git a/NLog.Windows.Forms/NLog.Windows.Forms.csproj b/NLog.Windows.Forms/NLog.Windows.Forms.csproj index e6ef185..2392213 100644 --- a/NLog.Windows.Forms/NLog.Windows.Forms.csproj +++ b/NLog.Windows.Forms/NLog.Windows.Forms.csproj @@ -25,17 +25,19 @@ git 5.0.0.0 -- Updated to NLog 5.0.5 (@snakefoot) -- Replaced net5.0-windows with net6.0-windows (@304NotModified) -- Fix crash SelectionLength + support links on all platforms (@304NotModified) -- Changed to typed Layout-properties (@Fr33dan) +- Updated to NLog v5.2 (@snakefoot) +- Added LogManager.Setup() extension method RegisterWindowsForms() (@snakefoot) Remember to register NLog.Windows.Forms in NLog.config -<extensions> - <add assembly="NLog.Windows.Forms" /> -</extensions> - + <extensions> + <add assembly="NLog.Windows.Forms" /> + </extensions> + +Alternative register from code without reflection of assembly-types: + + NLog.LogManager.Setup().RegisterWindowsForms(); + diff --git a/README.md b/README.md index 720d19c..d942976 100644 --- a/README.md +++ b/README.md @@ -25,5 +25,10 @@ Install the [NLog.Windows.Forms](https://www.nuget.org/packages/NLog.Windows.For ``` +To register from code without reflection of assembly-types: +```csharp +NLog.LogManager.Setup().RegisterWindowsForms(); +``` + ## License BSD diff --git a/appveyor.yml b/appveyor.yml index 4203b76..fb15b0a 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,4 +1,4 @@ -version: 5.0.0.{build} +version: 5.2.0.{build} image: Visual Studio 2022 clone_folder: c:\projects\nlog configuration: Release @@ -21,6 +21,6 @@ artifacts: deploy: - provider: NuGet api_key: - secure: 5tuxbM+Ujp0ZtaDCGYET23qKr6bJWo/Vzxlf7uTbspaf8R1R7sIe1JqSDHZoK1gV + secure: e+0IpLU3V1eXUsWCRjKGuyyeuLQYfFpv6BAoIihFQryuYZsOWVvxUBvQOC0dOL2n on: branch: master diff --git a/build.ps1 b/build.ps1 index 91a45a1..67dc827 100644 --- a/build.ps1 +++ b/build.ps1 @@ -2,7 +2,7 @@ # creates NuGet package at \artifacts dotnet --version -$versionPrefix = "5.0.0" # Also update version for minor versions in appveyor.yml +$versionPrefix = "5.2.0" # Also update version for minor versions in appveyor.yml $versionSuffix = "" $versionFile = $versionPrefix + "." + ${env:APPVEYOR_BUILD_NUMBER} if ($env:APPVEYOR_PULL_REQUEST_NUMBER) {