Skip to content

Commit

Permalink
Merge pull request #1187 from lahma/tweak-refs
Browse files Browse the repository at this point in the history
Remove unnecessary System.Text.Encoding.CodePages ref from NET 6+
  • Loading branch information
FlorianRappl committed Apr 13, 2024
2 parents a0c9591 + 08a7bfd commit 5e77fb1
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 23 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ Every collection in AngleSharp supports LINQ statements. AngleSharp also provide
AngleSharp has been created as a .NET Standard 2.0 compatible library. This includes, but is not limited to:

- .NET Core (2.0 and later)
- .NET Framework (4.6.1 and later)
- .NET Framework (4.6.2 and later)
- Xamarin.Android (7.0 and 8.0)
- Xamarin.iOS (10.0 and 10.14)
- Xamarin.Mac (3.0 and 3.8)
Expand Down
4 changes: 2 additions & 2 deletions docs/general/01-Basics.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ section: "AngleSharp.Core"

## Requirements

AngleSharp comes currently in two flavors: on Windows for .NET 4.6.1 or newer and in general targeting .NET Standard 2.0 platforms.
AngleSharp comes currently in two flavors: on Windows for .NET 4.6.2 or newer and in general targeting .NET Standard 2.0 platforms.

Most of the features of the library do not require .NET 4.6.1, which means you could create your own fork and modify it to work with previous versions of the .NET-Framework.
Most of the features of the library do not require .NET 4.6.2, which means you could create your own fork and modify it to work with previous versions of the .NET-Framework.

## Getting AngleSharp over NuGet

Expand Down
2 changes: 1 addition & 1 deletion src/AngleSharp.Benchmarks/AngleSharp.Benchmarks.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="BenchmarkDotNet" Version="0.13.7" />
<PackageReference Include="BenchmarkDotNet" Version="0.13.12" />
<PackageReference Include="CsQuery" Version="1.3.5-beta5" Condition=" '$(TargetFramework)' == 'net472' " />
<PackageReference Include="HtmlAgilityPack" Version="1.11.46" />
<PackageReference Include="System.Net.Http" Version="4.3.4" />
Expand Down
10 changes: 5 additions & 5 deletions src/AngleSharp.Core.Tests/AngleSharp.Core.Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks Condition=" '$(OS)' != 'Windows_NT' ">net6.0;net7.0;net8.0</TargetFrameworks>
<TargetFrameworks Condition=" '$(OS)' == 'Windows_NT' ">net461;net472;net6.0;net7.0;net8.0</TargetFrameworks>
<TargetFrameworks>net6.0;net7.0;net8.0</TargetFrameworks>
<TargetFrameworks Condition=" '$(OS)' == 'Windows_NT' ">$(TargetFrameworks);net462;net472</TargetFrameworks>
<IsPackable>false</IsPackable>
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies> <!-- https://github.com/Tyrrrz/GitHubActionsTestLogger/issues/5 -->
</PropertyGroup>
Expand All @@ -12,11 +12,11 @@

<ItemGroup>
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
<PackageReference Include="GitHubActionsTestLogger" Version="2.0.1" PrivateAssets="all" />
<PackageReference Include="GitHubActionsTestLogger" Version="2.3.3" PrivateAssets="all" />
<PackageReference Include="NUnit" Version="3.14.0" />
<PackageReference Include="NUnit3TestAdapter" Version="4.5.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.8.0" />
<PackageReference Include="Microsoft.Net.Http" Version="2.2.29" Condition="'$(TargetFramework)' == 'net472' or '$(TargetFramework)' == 'net461'" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.9.0" />
<PackageReference Include="Microsoft.Net.Http" Version="2.2.29" Condition="!$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net6.0'))" />
</ItemGroup>

<ItemGroup>
Expand Down
1 change: 1 addition & 0 deletions src/AngleSharp.Core.sln
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
AngleSharp.nuspec = AngleSharp.nuspec
Directory.Build.props = Directory.Build.props
..\.editorconfig = ..\.editorconfig
..\README.md = ..\README.md
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AngleSharp.Core.Tests", "AngleSharp.Core.Tests\AngleSharp.Core.Tests.csproj", "{C3074D7E-CA6C-4F2C-813D-BD97462DC3EB}"
Expand Down
11 changes: 1 addition & 10 deletions src/AngleSharp.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -19,21 +19,12 @@
<group targetFramework="netstandard2.0">
<dependency id="System.Text.Encoding.CodePages" version="7.0.0" />
</group>
<group targetFramework="net461">
<group targetFramework="net462">
<dependency id="System.Text.Encoding.CodePages" version="6.0.0" />
</group>
<group targetFramework="net472">
<dependency id="System.Text.Encoding.CodePages" version="6.0.0" />
</group>
<group targetFramework="net60">
<dependency id="System.Text.Encoding.CodePages" version="6.0.0" />
</group>
<group targetFramework="net70">
<dependency id="System.Text.Encoding.CodePages" version="7.0.0" />
</group>
<group targetFramework="net80">
<dependency id="System.Text.Encoding.CodePages" version="8.0.0" />
</group>
</dependencies>
</metadata>
</package>
8 changes: 4 additions & 4 deletions src/AngleSharp/AngleSharp.Core.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
<PropertyGroup>
<AssemblyName>AngleSharp</AssemblyName>
<RootNamespace>AngleSharp</RootNamespace>
<TargetFrameworks Condition=" '$(OS)' != 'Windows_NT' ">netstandard2.0;net6.0;net7.0;net8.0</TargetFrameworks>
<TargetFrameworks Condition=" '$(OS)' == 'Windows_NT' ">netstandard2.0;net461;net472;net6.0;net7.0;net8.0</TargetFrameworks>
<TargetFrameworks>netstandard2.0;net6.0;net7.0;net8.0</TargetFrameworks>
<TargetFrameworks Condition=" '$(OS)' == 'Windows_NT' ">$(TargetFrameworks);net462;net472</TargetFrameworks>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<Nullable>enable</Nullable>
<RepositoryUrl>https://github.com/AngleSharp/AngleSharp</RepositoryUrl>
Expand All @@ -17,11 +17,11 @@

<ItemGroup>
<PackageReference Include="ConfigureAwaitChecker.Analyzer" Version="5.0.0.1" PrivateAssets="all" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="All" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0" PrivateAssets="All" />
<PackageReference Include="Nullable" Version="1.3.1" PrivateAssets="all" />
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'netstandard2.0' or '$(TargetFramework)' == 'net461' or '$(TargetFramework)' == 'net472' or '$(TargetFramework)' == 'net6.0' ">
<ItemGroup Condition="!$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net6.0'))">
<PackageReference Include="System.Text.Encoding.CodePages" Version="6.0.0" />
</ItemGroup>

Expand Down

0 comments on commit 5e77fb1

Please sign in to comment.