8000 Explicit support for NET8 by snakefoot · Pull Request #1010 · NLog/NLog.Web · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Explicit support for NET8 #1010

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Dec 5, 2023
Merged
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
80 changes: 42 additions & 38 deletions src/NLog.Web.AspNetCore/NLog.Web.AspNetCore.csproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net461;netstandard2.0;netcoreapp3.1;net5.0;net6.0</TargetFrameworks>
<TargetFrameworks>net461;netstandard2.0;netcoreapp3.1;net5.0;net6.0;net8.0</TargetFrameworks>
<Product>NLog.Web.AspNetCore v$(VersionPrefix)</Product>
<Description>
Integrates NLog as provider for Microsoft.Extensions.Logging, and provides NLog LayoutRenderers to enrich logging output with details from HttpContext.
Expand Down Expand Up @@ -35,82 +35,86 @@ List of available Layout Renderers: https://nlog-project.org/config/?tab=layout-
<RootNamespace>NLog.Web</RootNamespace>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<AssemblyTitle>$(Title)</AssemblyTitle>
<!-- EmbedUntrackedSources for deterministic build -->
<EmbedUntrackedSources>true</EmbedUntrackedSources>
<EnableTrimAnalyzer>true</EnableTrimAnalyzer>
<IsTrimmable>true</IsTrimmable>
<PackageReadmeFile>README.md</PackageReadmeFile>
</PropertyGroup>
<ItemGroup>
<None Update="Internal\AssemblyExtensionTypes.tt">
<Generator>TextTemplatingFileGenerator</Generator>
<LastGenOutput>AssemblyExtensionTypes.cs</LastGenOutput>
</None>
<Compile Update="Internal\AssemblyExtensionTypes.cs">
<DesignTime>True</DesignTime>
<AutoGen>True</AutoGen>
<DependentUpon>AssemblyExtensionTypes.tt</DependentUpon>
</Compile>
</ItemGroup>
<ItemGroup>
<None Include="N.png" Pack="true" PackagePath="" Visible="false" />
<None Include="README.md" Pack="true" PackagePath="" />
</ItemGroup>
<Target Name="DownloadMissingContent" BeforeTargets="GenerateNuspec">
<DownloadFile SourceUrl="https://nlog-project.org/N.png" DestinationFolder="$(MSBuildThisFileDirectory)" />
</Target>

<PropertyGroup Condition=" '$(TargetFramework)' == 'net461' ">
<Title>ASP.NET Core 2 integration for NLog - .NET Framework 4.6+</Title>
<Title>$(AssemblyName) - .NET Framework 4.6.1</Title>
<DisableImplicitFrameworkReferences>true</DisableImplicitFrameworkReferences>
<DefineConstants>$(DefineConstants);ASP_NET_CORE</DefineConstants>
<DebugType Condition=" '$(Configuration)' == 'Debug' ">Full</DebugType>
</PropertyGroup>
<PropertyGroup Condition=" '$(TargetFramework)' == 'netstandard2.0' ">
<Title>ASP.NET Core 2 integration for NLog - .NET Standard 2</Title>
<Title>$(AssemblyName) - .NET Standard 2.0</Title>
<DefineConstants>$(DefineConstants);ASP_NET_CORE</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition=" '$(TargetFramework)' == 'netcoreapp3.1' ">
<Title>ASP.NET Core 3 integration for NLog - .NET Core 3.1</Title>
<Title>$(AssemblyName) - .NET Core 3.1</Title>
<DefineConstants>$(DefineConstants);ASP_NET_CORE</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition=" '$(TargetFramework)' == 'net5.0' ">
<Title>ASP.NET Core 5 integration for NLog - .NET 5.0</Title>
<Title>$(AssemblyName) - .NET 5.0</Title>
<DefineConstants>$(DefineConstants);ASP_NET_CORE</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition=" '$(TargetFramework)' == 'net6.0' ">
<Title>ASP.NET Core 6 integration for NLog - .NET 6.0</Title>
<Title>$(AssemblyName) - .NET 6.0</Title>
<DefineConstants>$(DefineConstants);ASP_NET_CORE</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition=" '$(TargetFramework)' == 'net8.0' ">
<Title>$(AssemblyName) - .NET 8.0</Title>
<DefineConstants>$(DefineConstants);ASP_NET_CORE</DefineConstants>
</PropertyGroup>
<PropertyGroup>
<AssemblyTitle>$(Title)</AssemblyTitle>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="NLog.Extensions.Logging" Version="5.3.5" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0" PrivateAssets="All" />
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' != 'netstandard2.0' and '$(TargetFramework)' != 'net461' ">
<FrameworkReference Include="Microsoft.AspNetCore.App" />
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'netstandard2.0' or '$(TargetFramework)' == 'net461' ">
<!-- Fixed to 2.1.0 as 2.1 is Long Term Supported (LTS) and only supported version for .NET Framework 4.6.1 -->
<PackageReference Include="Microsoft.AspNetCore.Http" Version="2.1.22" />
<PackageReference Include="Microsoft.AspNetCore.Hosting.Abstractions" Version="2.1.1" />
<PackageReference Include="Microsoft.AspNetCore.Routing.Abstractions" Version="2.1.1" />
<PackageReference Include="System.Text.Encodings.Web" Version="4.5.1" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0" PrivateAssets="All" />
</ItemGroup>
<ItemGroup Condition=" '$(TargetFramework)' == 'netcoreapp3.1' ">
<FrameworkReference Include="Microsoft.AspNetCore.App" />
</ItemGroup>
<ItemGroup Condition=" '$(TargetFramework)' == 'net5.0' ">
<FrameworkReference Include="Microsoft.AspNetCore.App" />
</ItemGroup>
<ItemGroup Condition=" '$(TargetFramework)' == 'net6.0' ">
<FrameworkReference Include="Microsoft.AspNetCore.App" />
<EmbeddedResource Include="ILLink.Descriptors.xml">
<LogicalName>ILLink.Descriptors.xml</LogicalName>
</EmbeddedResource>
</ItemGroup>

<ItemGroup>
<Compile Include="..\Shared\**\*.cs" />
</ItemGroup>

<ItemGroup>
<EmbeddedResource Include="ILLink.Descriptors.xml">
<LogicalName>ILLink.Descriptors.xml</LogicalName>
</EmbeddedResource>
<None Update="Internal\AssemblyExtensionTypes.tt">
<Generator>TextTemplatingFileGenerator</Generator>
<LastGenOutput>AssemblyExtensionTypes.cs</LastGenOutput>
</None>
<Compile Update="Internal\AssemblyExtensionTypes.cs">
<DesignTime>True</DesignTime>
<AutoGen>True</AutoGen>
<DependentUpon>AssemblyExtensionTypes.tt</DependentUpon>
</Compile>
</ItemGroup>
<ItemGroup>
<None Include="N.png" Pack="true" PackagePath="" Visible="false" />
<None Include="README.md" Pack="true" PackagePath="" />
</ItemGroup>
<Target Name="DownloadMissingContent" BeforeTargets="GenerateNuspec">
<DownloadFile SourceUrl="https://nlog-project.org/N.png" DestinationFolder="$(MSBuildThisFileDirectory)" />
</Target>

</Project>
0