-
Notifications
You must be signed in to change notification settings - Fork 34
Add .NET 6 to other target frameworks, add conditions based on TFM for Nuget packages. #57
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
Closed
Closed
Changes from 4 commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
761e76d
Add .NET 6 to other target frameworks, add conditions based on TFM fo…
ArminShoeibi 1d096d7
Fix formatting of csprojs.
ArminShoeibi 70e25bb
Alignment.
ArminShoeibi 96c43f1
Change order of ItemGroups
ArminShoeibi b7002e0
bring back LangVersion and 2 space indentation in csprojs.
ArminShoeibi 8ac9480
Update Visual Studio image in appveyor.yml to 2022
ArminShoeibi 44aa966
Bump Microsoft.SourceLink.GitHub to version 1.1.1
ArminShoeibi e6a7779
Fix indentation
ArminShoeibi File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
{ | ||
"sdk": { | ||
"allowPrerelease": false, | ||
"version": "5.0.102", | ||
"version": "6.0.100", | ||
"rollForward": "latestFeature" | ||
} | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,17 @@ | ||
<Project Sdk="Microsoft.NET.Sdk.Worker"> | ||
|
||
<PropertyGroup> | ||
<TargetFramework>netcoreapp3.1</TargetFramework> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<ProjectReference Include="..\..\src\Serilog.Extensions.Hosting\Serilog.Extensions.Hosting.csproj" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="Microsoft.Extensions.Hosting" Version="3.1.4" /> | ||
<PackageReference Include="Serilog.Sinks.Console" Version="3.1.1" /> | ||
<PackageReference Include="Serilog.Settings.Configuration" Version="3.1.0" /> | ||
</ItemGroup> | ||
<PropertyGroup> | ||
<TargetFramework>net6.0</TargetFramework> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<ProjectReference Include="..\..\src\Serilog.Extensions.Hosting\Serilog.Extensions.Hosting.csproj" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="Microsoft.Extensions.Hosting" Version="6.0.0" /> | ||
<PackageReference Include="Serilog.Sinks.Console" Version="4.0.1" /> | ||
<PackageReference Include="Serilog.Settings.Configuration" Version="3.3.0" /> | ||
</ItemGroup> | ||
|
||
</Project> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,17 @@ | ||
<Project Sdk="Microsoft.NET.Sdk.Web"> | ||
<Project Sdk="Microsoft.NET.Sdk.Web"> | ||
|
||
<PropertyGroup> | ||
<TargetFramework>netcoreapp3.1</TargetFramework> | ||
</PropertyGroup> | ||
<PropertyGroup> | ||
<TargetFramework>net6.0</TargetFramework> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<ProjectReference Include="..\..\src\Serilog.Extensions.Hosting\Serilog.Extensions.Hosting.csproj" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<ProjectReference Include="..\..\src\Serilog.Extensions.Hosting\Serilog.Extensions.Hosting.csproj" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="serilog.settings.configuration" Version="3.1.0" /> | ||
<PackageReference Include="serilog.sinks.console" Version="3.1.1" /> | ||
<PackageReference Include="serilog.sinks.file" Version="4.1.0" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<PackageReference Include="Serilog.Sinks.File" Version="5.0.0" /> | ||
<PackageReference Include="Serilog.Sinks.Console" Version="4.0.1" /> | ||
<PackageReference Include="Serilog.Settings.Configuration" Version="3.3.0" /> | ||
</ItemGroup> | ||
|
||
</Project> |
88 changes: 51 additions & 37 deletions
88
src/Serilog.Extensions.Hosting/Serilog.Extensions.Hosting.csproj
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,42 +1,56 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<Description>Serilog support for .NET Core logging in hosted services</Description> | ||
<VersionPrefix>4.2.1</VersionPrefix> | ||
<Authors>Microsoft;Serilog Contributors</Authors> | ||
<TargetFrameworks>netstandard2.0;netstandard2.1</TargetFrameworks> | ||
<LangVersion>8</LangVersion> | ||
<TreatWarningsAsErrors>true</TreatWarningsAsErrors> | ||
<GenerateDocumentationFile>true</GenerateDocumentationFile> | ||
<AssemblyName>Serilog.Extensions.Hosting</AssemblyName> | ||
<AssemblyOriginatorKeyFile>../../assets/Serilog.snk</AssemblyOriginatorKeyFile> | ||
<SignAssembly>true</SignAssembly> | ||
<PublicSign Condition=" '$(OS)' != 'Windows_NT' ">true</PublicSign> | ||
<PackageId>Serilog.Extensions.Hosting</PackageId> | ||
<PackageTags>serilog;aspnet;aspnetcore;hosting</PackageTags> | ||
<PackageIcon>icon.png</PackageIcon> | ||
<PackageProjectUrl>https://github.com/serilog/serilog-extensions-hosting</PackageProjectUrl> | ||
<PackageLicenseExpression>Apache-2.0</PackageLicenseExpression> | ||
<RepositoryUrl>https://github.com/serilog/serilog-extensions-hosting</RepositoryUrl> | ||
<RepositoryType>git</RepositoryType> | ||
<GenerateAssemblyVersionAttribute>false</GenerateAssemblyVersionAttribute> | ||
<RootNamespace>Serilog</RootNamespace> | ||
</PropertyGroup> | ||
<PropertyGroup> | ||
<Description>Serilog support for .NET Core logging in hosted services</Description> | ||
<VersionPrefix>4.2.1</VersionPrefix> | ||
<Authors>Microsoft;Serilog Contributors</Authors> | ||
<TargetFrameworks>netstandard2.0;netstandard2.1;net5.0;net6.0</TargetFrameworks> | ||
<TreatWarningsAsErrors>true</TreatWarningsAsErrors> | ||
<GenerateDocumentationFile>true</GenerateDocumentationFile> | ||
<AssemblyName>Serilog.Extensions.Hosting</AssemblyName> | ||
<AssemblyOriginatorKeyFile>../../assets/Serilog.snk</AssemblyOriginatorKeyFile> | ||
<SignAssembly>true</SignAssembly> | ||
<PublicSign Condition=" '$(OS)' != 'Windows_NT' ">true</PublicSign> | ||
<PackageId>Serilog.Extensions.Hosting</PackageId> | ||
<PackageTags>serilog;aspnet;aspnetcore;hosting</PackageTags> | ||
<PackageIcon>icon.png</PackageIcon> | ||
<PackageProjectUrl>https://github.com/serilog/serilog-extensions-hosting</PackageProjectUrl> | ||
<PackageLicenseExpression>Apache-2.0</PackageLicenseExpression> | ||
<RepositoryUrl>https://github.com/serilog/serilog-extensions-hosting</RepositoryUrl> | ||
<RepositoryType>git</RepositoryType> | ||
<GenerateAssemblyVersionAttribute>false</GenerateAssemblyVersionAttribute> | ||
<RootNamespace>Serilog</RootNamespace> | ||
</PropertyGroup> | ||
|
||
<PropertyGroup Condition=" '$(TargetFramework)' == 'netstandard2.0' "> | ||
<DefineConstants>$(DefineConstants);NO_RELOADABLE_LOGGER</DefineConstants> | ||
</PropertyGroup> | ||
<PropertyGroup Condition=" '$(TargetFramework)' == 'netstandard2.0' "> | ||
<DefineConstants>$(DefineConstants);NO_RELOADABLE_LOGGER</DefineConstants> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="Serilog" Version="2.10.0" /> | ||
<PackageReference Include="Serilog.Extensions.Logging" Version="3.1.0" /> | ||
<PackageReference Include="Microsoft.Extensions.Hosting.Abstractions" Version="3.1.8" /> | ||
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="3.1.8" /> | ||
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="3.1.8" /> | ||
</ItemGroup> | ||
<ItemGroup Condition=" '$(TargetFramework)' == 'net6.0' "> | ||
<PackageReference Include="Microsoft.Extensions.Hosting.Abstractions" Version="6.0.0" /> | ||
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="6.0.0" /> | ||
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="6.0.0" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup Condition=" '$(TargetFramework)' == 'net5.0' "> | ||
<PackageReference Include="Microsoft.Extensions.Hosting.Abstractions" Version="5.0.0" /> | ||
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="5.0.0" /> | ||
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="5.0.0" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<None Include="..\..\assets\icon.png" Pack="true" Visible="false" PackagePath="" /> | ||
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0" PrivateAssets="All" /> | ||
</ItemGroup> | ||
<ItemGroup Condition=" '$(TargetFramework)' == 'netstandard2.0' OR '$(TargetFramework)' == 'netstandard2.1' "> | ||
<PackageReference Include="Microsoft.Extensions.Hosting.Abstractions" Version="3.1.22" /> | ||
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="3.1.22" /> | ||
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="3.1.22" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="Serilog" Version="2.10.0" /> | ||
<PackageReference Include="Serilog.Extensions.Logging" Version="3.1.0" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<None Include="..\..\assets\icon.png" Pack="true" Visible="false" PackagePath="" /> | ||
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0" PrivateAssets="All" /> | ||
</ItemGroup> | ||
</Project> |
56 changes: 30 additions & 26 deletions
56
test/Serilog.Extensions.Hosting.Tests/Serilog.Extensions.Hosting.Tests.csproj
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,35 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<TargetFrameworks>netcoreapp3.1;net5.0;net4.8</TargetFrameworks> | ||
<AssemblyName>Serilog.Extensions.Hosting.Tests</AssemblyName> | ||
<AssemblyOriginatorKeyFile>../../assets/Serilog.snk</AssemblyOriginatorKeyFile> | ||
<SignAssembly>true</SignAssembly> | ||
<PublicSign Condition=" '$(OS)' != 'Windows_NT' ">true</PublicSign> | ||
<GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles> | ||
<LangVersion>latest</LangVersion> | ||
</PropertyGroup> | ||
<PropertyGroup> | ||
<TargetFrameworks>net4.8;netcoreapp3.1;net5.0;net6.0</TargetFrameworks> | ||
<AssemblyName>Serilog.Extensions.Hosting.Tests</AssemblyName> | ||
<AssemblyOriginatorKeyFile>../../assets/Serilog.snk</AssemblyOriginatorKeyFile> | ||
<SignAssembly>true</SignAssembly> | ||
<PublicSign Condition=" '$(OS)' != 'Windows_NT' ">true</PublicSign> | ||
<GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles> | ||
<LangVersion>latest</LangVersion> | ||
</PropertyGroup> | ||
|
||
<PropertyGroup Condition=" '$(TargetFramework)' == 'net4.8' "> | ||
<DefineConstants>$(DefineConstants);NO_RELOADABLE_LOGGER</DefineConstants> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<ProjectReference Include="..\..\src\Serilog.Extensions.Hosting\Serilog.Extensions.Hosting.csproj" /> | ||
</ItemGroup> | ||
<PropertyGroup Condition=" '$(TargetFramework)' == 'net4.8' "> | ||
<DefineConstants>$(DefineConstants);NO_RELOADABLE_LOGGER</DefineConstants> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<ProjectReference Include="..\..\src\Serilog.Extensions.Hosting\Serilog.Extensions.Hosting.csproj" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="3.1.22" Condition=" '$(TargetFramework)' == 'netcoreapp3.1' OR '$(TargetFramework)' == 'net4.8' " /> | ||
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="5.0.2" Condition=" '$(TargetFramework)' == 'net5.0' " /> | ||
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="6.0.0" Condition=" '$(TargetFramework)' == 'net6.0' " /> | ||
|
||
|
||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.2.0" /> | ||
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.1"> | ||
<PrivateAssets>all</PrivateAssets> | ||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets> | ||
</PackageReference> | ||
<PackageReference Include="xunit" Version="2.4.1" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="3.1.4" /> | ||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.2.0" /> | ||
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.1"> | ||
<PrivateAssets>all</PrivateAssets> | ||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets> | ||
</PackageReference> | ||
<PackageReference Include="xunit" Version="2.4.1" /> | ||
</ItemGroup> | ||
|
||
</Project> |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.