Skip to content

Commit 8a44803

Browse files
committed
Mark Serilog.Formatting.Log4Net as trimmable for AOT compatibility
1 parent 3d6a848 commit 8a44803

File tree

4 files changed

+9
-1
lines changed

4 files changed

+9
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66

77
## [Unreleased][Unreleased]
88

9-
- Add support for .NET 8.
9+
- Add support for .NET 8 and mark `Serilog.Formatting.Log4Net` as [trimmable](https://learn.microsoft.com/en-us/dotnet/core/deploying/trimming/trim-self-contained) for [AOT compatibility](https://learn.microsoft.com/en-us/dotnet/core/deploying/native-aot/).
1010

1111
## [1.1.0][1.1.0] - 2023-05-02
1212

src/Serilog.Formatting.Log4Net.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
<LangVersion>12</LangVersion>
99
<Nullable>enable</Nullable>
1010
<AnalysisMode>All</AnalysisMode>
11+
<IsAotCompatible Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net7.0'))">true</IsAotCompatible>
1112
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
1213
</PropertyGroup>
1314

src/packages.lock.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -697,6 +697,12 @@
697697
}
698698
},
699699
"net8.0": {
700+
"Microsoft.NET.ILLink.Tasks": {
701+
"type": "Direct",
702+
"requested": "[8.0.6, )",
703+
"resolved": "8.0.6",
704+
"contentHash": "E+lDylsTeP4ZiDmnEkiJ5wobnGaIJzFhOgZppznJCb69UZgbh6G3cfv1pnLDLLBx6JAgl0kAlnINDeT3uCuczQ=="
705+
},
700706
"MinVer": {
701707
"type": "Direct",
702708
"requested": "[5.0.0, )",

tests/PublicApi.net8.0.verified.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
[assembly: System.CLSCompliant(true)]
2+
[assembly: System.Reflection.AssemblyMetadata("IsTrimmable", "True")]
23
[assembly: System.Reflection.AssemblyMetadata("RepositoryUrl", "https://github.com/serilog-contrib/serilog-formatting-log4net")]
34
[assembly: System.Runtime.Versioning.TargetFramework(".NETCoreApp,Version=v8.0", FrameworkDisplayName=".NET 8.0")]
45
namespace Serilog.Formatting.Log4Net

0 commit comments

Comments
 (0)