Skip to content

Commit

Permalink
.NET 4.6.1 + ASP.NET Core 2 support
Browse files Browse the repository at this point in the history
  • Loading branch information
304NotModified committed Nov 30, 2017
1 parent 6855a5a commit 1cd347b
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 26 deletions.
14 changes: 7 additions & 7 deletions NLog.Web.AspNetCore.Tests/NLog.Web.AspNetCore.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,25 +8,25 @@
<ItemGroup>
<ProjectReference Include="..\NLog.Web.AspNetCore\NLog.Web.AspNetCore.csproj" />
<PackageReference Include="NSubstitute" Version="2.0.3" />
<PackageReference Include="Castle.Core" Version="4.2.0" />
<PackageReference Include="Castle.Core" Version="4.2.1" />
<!-- Castle.Core upgrade for NSubstitute-->

<PackageReference Include="System.Runtime.InteropServices" Version="4.3.0" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.3.0-beta5-build3769" />
<PackageReference Include="xunit" Version="2.3.0-beta5-build3769" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.3.0" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.3.1" />
<PackageReference Include="xunit" Version="2.3.1" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.5.0" />
<!--
icrosoft.NET.Test.Sdk needed for xunit.runner.visualstudio
-->
<DotNetCliToolReference Include="dotnet-xunit" Version="2.3.0-beta5-build3769" />
<DotNetCliToolReference Include="dotnet-xunit" Version="2.3.1" />
</ItemGroup>
<ItemGroup Condition=" '$(TargetFramework)' != 'netcoreapp2.0' ">
<ItemGroup Condition=" '$(TargetFramework)' == 'netcoreapp1.1' ">
<PackageReference Include="Microsoft.AspNetCore.Http" Version="1.1.1" />
<PackageReference Include="Microsoft.AspNetCore.Hosting.Abstractions" Version="1.1.1" />
<PackageReference Include="Microsoft.AspNetCore.Http.Extensions" Version="1.1.1" />
<PackageReference Include="Microsoft.AspNetCore.Routing.Abstractions" Version="1.1.1" />
</ItemGroup>
<ItemGroup Condition=" '$(TargetFramework)' == 'netcoreapp2.0' ">
<ItemGroup Condition=" '$(TargetFramework)' != 'netcoreapp1.1' ">
<PackageReference Include="Microsoft.AspNetCore" Version="2.0.0" />
</ItemGroup>
<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion NLog.Web.AspNetCore.Tests/TestBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public HeaderDict()



#if NETCOREAPP2_0
#if NETCOREAPP2_0 || NET461
/// <summary>
/// Strongly typed access to the Content-Length header. Implementations must keep this in sync with the string representation.
/// </summary>
Expand Down
4 changes: 2 additions & 2 deletions NLog.Web.AspNetCore/AspNetExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
using NLog.Web.Internal;
using NLog.Extensions.Logging;
using NLog.Web.AspNetCore;
#if NETSTANDARD2_0
#if NETSTANDARD2_0 || NET461
using Microsoft.Extensions.DependencyInjection;
#endif

Expand Down Expand Up @@ -60,7 +60,7 @@ private static LoggingConfiguration ConfigureNLog(string fileName)
}


#if NETSTANDARD2_0
#if NETSTANDARD2_0 || NET461

/// <summary>
/// Apply NLog configuration from XML config.
Expand Down
21 changes: 6 additions & 15 deletions NLog.Web.AspNetCore/NLog.Web.AspNetCore.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<AssemblyTitle>NLog.Web.AspNetCore</AssemblyTitle>

<Authors>Julian Verdurmen</Authors>
<TargetFrameworks>netstandard1.3;netstandard1.5;net451;netstandard2.0</TargetFrameworks>
<TargetFrameworks>netstandard1.3;netstandard1.5;net451;net461;netstandard2.0</TargetFrameworks>
<DefineConstants>$(DefineConstants);ASP_NET_CORE</DefineConstants>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<AssemblyName>NLog.Web.AspNetCore</AssemblyName>
Expand Down Expand Up @@ -52,18 +52,16 @@
</PropertyGroup>

<ItemGroup>



<PackageReference Include="NLog.Extensions.Logging" Version="1.0.0-rtm-rc2" />
<PackageReference Include="NLog.Extensions.Logging" Version="1.0.0-rtm-rc3" />
<PackageReference Include="System.ValueTuple" Version="4.3.0" />
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'net451' ">
<Reference Include="System" />
<Reference Include="Microsoft.CSharp" />
</ItemGroup>
<ItemGroup Condition=" '$(TargetFramework)' != 'netstandard2.0' ">

<ItemGroup Condition=" '$(TargetFramework)' != 'netstandard2.0' and '$(TargetFramework)' != 'net461' ">
<PackageReference Include="Microsoft.AspNetCore.Http" Version="1.1.1" />
<PackageReference Include="Microsoft.AspNetCore.Http.Extensions" Version="1.1.1" />
<PackageReference Include="Microsoft.AspNetCore.Hosting.Abstractions" Version="1.1.1" />
Expand All @@ -73,19 +71,12 @@
<ItemGroup Condition=" '$(TargetFramework)' == 'netstandard1.3' ">
<PackageReference Include="Microsoft.Extensions.PlatformAbstractions" Version="1.0.0" />
</ItemGroup>
<ItemGroup Condition=" '$(TargetFramework)' == 'netstandard2.0' ">

<ItemGroup Condition=" '$(TargetFramework)' == 'netstandard2.0' or '$(TargetFramework)' == 'net461' ">
<PackageReference Include="Microsoft.AspNetCore.Http" Version="2.0.0" />
<PackageReference Include="Microsoft.AspNetCore.Http.Extensions" Version="2.0.0" />
<PackageReference Include="Microsoft.AspNetCore.Hosting.Abstractions" Version="2.0.0" />
<PackageReference Include="Microsoft.AspNetCore.Routing.Abstractions" Version="2.0.0" />


</ItemGroup>
<ItemGroup>

</ItemGroup>




</Project>
2 changes: 1 addition & 1 deletion NLog.Web.AspNetCore/NLogBuilder.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#if NETSTANDARD2_0
#if NETSTANDARD2_0 || NET461


using System;
Expand Down

0 comments on commit 1cd347b

Please sign in to comment.