Skip to content

Commit

Permalink
Implement .NET standard 2 features for .NET 4.6.1
Browse files Browse the repository at this point in the history
  • Loading branch information
304NotModified committed Nov 30, 2017
1 parent c8165fa commit ae27090
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion examples/NetCore2/ConsoleExample/ConsoleExample.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<ItemGroup>
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="1.1.0" />
<PackageReference Include="Microsoft.Extensions.Logging" Version="2.0.0" />
<PackageReference Include="NLog" Version="4.5.0-beta07" />
<PackageReference Include="NLog" Version="4.5.0-rc01" />
</ItemGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion src/NLog.Extensions.Logging/ConfigureExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public static ILoggerFactory AddNLog(this ILoggerFactory factory, NLogProviderOp
return factory;
}

#if NETSTANDARD2_0
#if NETSTANDARD2_0 || NET461

/// <summary>
/// Enable NLog as logging provider in .NET Core.
Expand Down
6 changes: 3 additions & 3 deletions src/NLog.Extensions.Logging/NLog.Extensions.Logging.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ rc2 (see https://github.com/NLog/NLog.Extensions.Logging/milestone/9?closed=1)
<Reference Include="Microsoft.CSharp" />
</ItemGroup>
<ItemGroup Condition=" '$(TargetFramework)' == 'net461' ">
<PackageReference Include="NLog" Version="[4.4.12,5)" />
<PackageReference Include="NLog" Version="[4.5-rc01,5)" />
<PackageReference Include="Microsoft.Extensions.Logging" Version="2.0.0" />
<Reference Include="System.Xml" />
<Reference Include="System.Runtime" />
Expand All @@ -66,12 +66,12 @@ rc2 (see https://github.com/NLog/NLog.Extensions.Logging/milestone/9?closed=1)
</ItemGroup>
<ItemGroup Condition=" '$(TargetFramework)' == 'netstandard1.5' ">
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="1.1.2" />
<PackageReference Include="NLog" Version="[4.5.0-beta07,5)" />
<PackageReference Include="NLog" Version="[4.5.0-rc01,5)" />
<PackageReference Include="System.AppContext" Version="4.3.0" />
</ItemGroup>
<ItemGroup Condition=" '$(TargetFramework)' == 'netstandard2.0' ">
<PackageReference Include="Microsoft.Extensions.Logging" Version="2.0.0" />
<PackageReference Include="NLog" Version="[4.5.0-beta07,5)" />
<PackageReference Include="NLog" Version="[4.5.0-rc01,5)" />
<PackageReference Include="System.AppContext" Version="4.3.0" />
</ItemGroup>
</Project>
2 changes: 1 addition & 1 deletion src/NLog.Extensions.Logging/NLogLogger.cs
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ private LogEventInfo CreateLogEventInfo(LogLevel nLogLogLevel, string message, I
{
if (firstParameterName.Length != 1 || !char.IsDigit(firstParameterName[0]))
{
#if NETSTANDARD2_0
#if NETSTANDARD2_0 || NET461
var originalFormat = parameterList[parameterList.Count - 1];
string originalMessage = null;
if (originalFormat.Key == OriginalFormatPropertyName)
Expand Down
2 changes: 1 addition & 1 deletion src/NLog.Extensions.Logging/NLogMessageParameterList.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

namespace NLog.Extensions.Logging
{
#if NETSTANDARD2_0
#if NETSTANDARD2_0 || NET461
/// <summary>
/// Converts Microsoft Extension Logging ParameterList into NLog MessageTemplate ParameterList
/// </summary>
Expand Down
12 changes: 6 additions & 6 deletions test/NLog.Extensions.Logging.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.0.0" />
<PackageReference Include="xunit" Version="2.3.0-beta5-build3769" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.3.0-beta5-build3769" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.5.0" />
<PackageReference Include="xunit" Version="2.3.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.3.1" />
</ItemGroup>


Expand All @@ -16,18 +16,18 @@
<ItemGroup Condition=" '$(TargetFramework)' == 'netcoreapp1.1' ">
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="1.1.1" />
<PackageReference Include="Microsoft.Extensions.Logging" Version="1.1.2" />
<PackageReference Include="NLog" Version="4.5.0-beta07" />
<PackageReference Include="NLog" Version="4.5.0-rc01" />
<PackageReference Include="System.AppContext" Version="4.3.0" />
</ItemGroup>
<ItemGroup Condition=" '$(TargetFramework)' == 'netcoreapp2.0' ">
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="2.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging" Version="2.0.0" />
<PackageReference Include="NLog" Version="4.5.0-beta07" />
<PackageReference Include="NLog" Version="4.5.0-rc01" />
<PackageReference Include="System.AppContext" Version="4.3.0" />
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'net461' ">
<PackageReference Include="NLog" Version="4.4.12" />
<PackageReference Include="NLog" Version="4.5-rc01" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="2.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging" Version="2.0.0" />
<Reference Include="System.Xml" />
Expand Down

0 comments on commit ae27090

Please sign in to comment.