Skip to content

Commit 5bf6884

Browse files
Set IsAotCompatible=true for .NET8.0 (#124)
* Set IsAotCompatible=true for .NET8.0 This activates warnings if the code is not compatible to AOT. There is no active warnings to fix for now. Information: https://learn.microsoft.com/en-us/dotnet/core/deploying/native-aot * Disable JsonSerializerIsReflectionEnabledByDefault https://learn.microsoft.com/en-us/dotnet/standard/serialization/system-text-json/source-generation?pivots=dotnet-8-0#disable-reflection-defaults
1 parent cfdf25b commit 5bf6884

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

src/Serilog.Sinks.AzureBlobStorage/Serilog.Sinks.AzureBlobStorage.csproj

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,13 @@
2323
<PackageReadmeFile>README.md</PackageReadmeFile>
2424
<PackageIcon>serilog-sink-nuget.png</PackageIcon>
2525
</PropertyGroup>
26+
<PropertyGroup Condition="'$(TargetFramework)' == 'net8.0'">
27+
<IsAotCompatible>true</IsAotCompatible>
28+
<JsonSerializerIsReflectionEnabledByDefault>false</JsonSerializerIsReflectionEnabledByDefault>
29+
</PropertyGroup>
2630

2731
<ItemGroup>
2832
<None Include="../../LICENSE.md" Pack="true" PackagePath="/" />
29-
</ItemGroup>
30-
31-
<ItemGroup>
3233
<None Include="../../README.md" Pack="true" PackagePath="/" />
3334
<None Include="..\..\serilog-sink-nuget.png">
3435
<Pack>True</Pack>
@@ -41,14 +42,11 @@
4142
<PackageReference Include="Azure.Storage.Blobs" Version="12.21.1" />
4243
<PackageReference Include="Microsoft.Extensions.Configuration.Abstractions" Version="8.0.0" />
4344
<PackageReference Include="Serilog" Version="4.0.1" />
44-
4545
</ItemGroup>
46-
4746
<ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.0'">
4847
<PackageReference Include="Microsoft.Bcl.AsyncInterfaces" Version="8.0.0" />
4948
</ItemGroup>
5049
<ItemGroup Condition="'$(TargetFramework)' != 'net8.0'">
5150
<PackageReference Include="System.Text.Json" Version="8.0.4" />
5251
</ItemGroup>
53-
54-
</Project>
52+
</Project>

0 commit comments

Comments
 (0)