Skip to content

Commit 6188e3f

Browse files
Fix package references
- Use VersionOverride and IsTargetFrameworkCompatible for System.Text.Json versions. - Fix net7.0 target not using the right version of System.Text.Json. - Simplify AoT properties.
1 parent 66d7992 commit 6188e3f

File tree

2 files changed

+6
-10
lines changed

2 files changed

+6
-10
lines changed

Directory.Packages.props

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,6 @@
2222
<PackageVersion Include="xunit" Version="2.7.0" />
2323
<PackageVersion Include="xunit.runner.visualstudio" Version="2.5.7" />
2424
</ItemGroup>
25-
<ItemGroup Condition=" '$(AssemblyName)' == 'JustEat.HttpClientInterception' and '$(TargetFramework)' == 'net6.0' ">
26-
<PackageVersion Update="System.Text.Json" Version="6.0.0" />
27-
</ItemGroup>
28-
<ItemGroup Condition=" '$(AssemblyName)' != 'JustEat.HttpClientInterception' ">
29-
<PackageVersion Update="System.Text.Json" Version="8.0.0" />
30-
</ItemGroup>
3125
<ItemGroup>
3226
<PackageReference Include="Microsoft.CodeAnalysis.PublicApiAnalyzers" PrivateAssets="All" />
3327
<PackageReference Include="StyleCop.Analyzers" PrivateAssets="All" />

src/HttpClientInterception/JustEat.HttpClientInterception.csproj

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,12 @@
1919
<PackageReference Include="Microsoft.AspNetCore.WebUtilities" />
2020
<PackageReference Include="System.Text.Json" />
2121
</ItemGroup>
22+
<ItemGroup Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net6.0'))">
23+
<PackageVersion Update="System.Text.Json" VersionOverride="6.0.0" />
24+
</ItemGroup>
25+
<ItemGroup Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net7.0'))">
26+
<PackageVersion Update="System.Text.Json" VersionOverride="7.0.0" />
27+
</ItemGroup>
2228
<ItemGroup Condition=" '$(TargetFramework)' == 'net472' ">
2329
<PackageReference Include="System.Net.Http" />
2430
</ItemGroup>
@@ -27,10 +33,6 @@
2733
<AdditionalFiles Include="PublicAPI/$(TargetFramework)/PublicAPI.Unshipped.txt" />
2834
</ItemGroup>
2935
<PropertyGroup Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net6.0'))">
30-
<EnableAotAnalyzer>true</EnableAotAnalyzer>
31-
<EnableSingleFileAnalyzer>true</EnableSingleFileAnalyzer>
32-
<EnableTrimAnalyzer>true</EnableTrimAnalyzer>
3336
<IsAotCompatible>true</IsAotCompatible>
34-
<IsTrimmable>true</IsTrimmable>
3537
</PropertyGroup>
3638
</Project>

0 commit comments

Comments
 (0)