Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 10 additions & 0 deletions src/PSNLog/NewColoredConsoleTargetCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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<bool> NoColor { get; set; }

[Parameter(
ValueFromPipelineByPropertyName = true,
HelpMessage = "Gets the row highlighting rules.")]
Expand Down Expand Up @@ -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)
Expand Down
6 changes: 3 additions & 3 deletions src/PSNLog/PSNLog.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Meziantou.Analyzer" Version="2.0.163">
<PackageReference Include="Meziantou.Analyzer" Version="2.0.186">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.PowerShell.5.1.ReferenceAssemblies" Version="1.0.0" PrivateAssets="All" />
<PackageReference Include="NLog" Version="5.3.4" />
<PackageReference Include="NLog.Database" Version="5.3.4" />
<PackageReference Include="NLog" Version="5.4.0" />
<PackageReference Include="NLog.Database" Version="5.4.0" />
<PackageReference Include="StyleCop.Analyzers.Unstable" Version="1.2.0.556">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
Expand Down
8 changes: 4 additions & 4 deletions src/PSNLog/base.t4
Original file line number Diff line number Diff line change
@@ -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" #>
Expand All @@ -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()
Expand Down
12 changes: 6 additions & 6 deletions src/Tests/Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,21 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Meziantou.Analyzer" Version="2.0.163">
<PackageReference Include="Meziantou.Analyzer" Version="2.0.186">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="9.0.1" />
<PackageReference Include="Microsoft.PowerShell.5.1.ReferenceAssemblies" Version="1.0.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.11.1" />
<PackageReference Include="MimeKit" Version="4.7.1" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.12.0" />
<PackageReference Include="MimeKit" Version="4.10.0" />
<PackageReference Include="SmtpServer" Version="10.0.1" />
<PackageReference Include="StyleCop.Analyzers.Unstable" Version="1.2.0.556">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="System.IO.Pipelines" Version="8.0.0" />
<PackageReference Include="xunit" Version="2.9.0" />
<PackageReference Include="System.IO.Pipelines" Version="9.0.1" />
<PackageReference Include="xunit" Version="2.9.3" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.8.2">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
Expand Down