From f7b4d0aedbcf3d50570b18b9c2e3e1c3c11fde8d Mon Sep 17 00:00:00 2001 From: "Joseph L. Casale" <9957114+jcasale@users.noreply.github.com> Date: Sun, 2 Feb 2025 15:58:55 -0700 Subject: [PATCH 1/2] Updates to wix toolset v5.0.2. --- .github/workflows/main.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 6b33af7..27ce6fb 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -25,9 +25,9 @@ jobs: - name: Setup wix run: | - dotnet.exe tool install --global wix --version 5.0.1 --verbosity diag + dotnet.exe tool install --global wix --version 5.0.2 --verbosity diag - wix.exe extension add WixToolset.UI.wixext/5.0.1 --global + wix.exe extension add WixToolset.UI.wixext/5.0.2 --global wix.exe extension list --global - name: Generate version property From dbfaf97d68fd53868b5365102d70756f87987e3a Mon Sep 17 00:00:00 2001 From: "Joseph L. Casale" <9957114+jcasale@users.noreply.github.com> Date: Sun, 2 Feb 2025 15:59:16 -0700 Subject: [PATCH 2/2] Updates nuget packages. --- src/PSNLog/NewColoredConsoleTargetCommand.cs | 10 ++++++++++ src/PSNLog/PSNLog.csproj | 6 +++--- src/PSNLog/base.t4 | 8 ++++---- src/Tests/Tests.csproj | 12 ++++++------ 4 files changed, 23 insertions(+), 13 deletions(-) diff --git a/src/PSNLog/NewColoredConsoleTargetCommand.cs b/src/PSNLog/NewColoredConsoleTargetCommand.cs index bb099b2..32a7448 100644 --- a/src/PSNLog/NewColoredConsoleTargetCommand.cs +++ b/src/PSNLog/NewColoredConsoleTargetCommand.cs @@ -51,6 +51,11 @@ public class NewColoredConsoleTargetCommand : PSCmdlet HelpMessage = "Gets or sets the name of the target.")] public string Name { get; set; } + [Parameter( + ValueFromPipelineByPropertyName = true, + HelpMessage = "Support NO_COLOR=1 environment variable. See also.")] + public NLog.Layouts.Layout NoColor { get; set; } + [Parameter( ValueFromPipelineByPropertyName = true, HelpMessage = "Gets the row highlighting rules.")] @@ -120,6 +125,11 @@ protected override void ProcessRecord() instance.Name = this.Name; } + if (this.NoColor is not null) + { + instance.NoColor = this.NoColor; + } + if (this.RowHighlightingRules is { Length: > 0 }) { foreach (var item in this.RowHighlightingRules) diff --git a/src/PSNLog/PSNLog.csproj b/src/PSNLog/PSNLog.csproj index 3deae03..6651245 100644 --- a/src/PSNLog/PSNLog.csproj +++ b/src/PSNLog/PSNLog.csproj @@ -8,13 +8,13 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive - - + + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/src/PSNLog/base.t4 b/src/PSNLog/base.t4 index 5c0d965..b7beb6f 100644 --- a/src/PSNLog/base.t4 +++ b/src/PSNLog/base.t4 @@ -1,5 +1,5 @@ -<#@ assembly name="%USERPROFILE%\.nuget\packages\nlog\5.3.4\lib\net46\NLog.dll" #> -<#@ assembly name="%USERPROFILE%\.nuget\packages\nlog.database\5.3.4\lib\net46\NLog.Database.dll" #> +<#@ assembly name="%USERPROFILE%\.nuget\packages\nlog\5.4.0\lib\net46\NLog.dll" #> +<#@ assembly name="%USERPROFILE%\.nuget\packages\nlog.database\5.4.0\lib\net46\NLog.Database.dll" #> <#@ assembly name="System.Xml.dll" #> <#@ import namespace="System" #> <#@ import namespace="System.CodeDom" #> @@ -16,8 +16,8 @@ public static string UserProfile { get; } = Environment.GetEnvironmentVariable(" public static string[] XmlPaths { get; } = [ - Path.Combine(UserProfile, @".nuget\packages\nlog\5.3.4\lib\net46\NLog.xml"), - Path.Combine(UserProfile, @".nuget\packages\nlog.database\5.3.4\lib\net46\NLog.Database.xml") + Path.Combine(UserProfile, @".nuget\packages\nlog\5.4.0\lib\net46\NLog.xml"), + Path.Combine(UserProfile, @".nuget\packages\nlog.database\5.4.0\lib\net46\NLog.Database.xml") ]; public static Type[] NLogTypes { get; } = Assembly.GetAssembly(typeof(NLog.Targets.Target)).GetTypes() diff --git a/src/Tests/Tests.csproj b/src/Tests/Tests.csproj index 3bcadee..3f97f07 100644 --- a/src/Tests/Tests.csproj +++ b/src/Tests/Tests.csproj @@ -8,21 +8,21 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive - + - - + + all runtime; build; native; contentfiles; analyzers; buildtransitive - - + + runtime; build; native; contentfiles; analyzers; buildtransitive all