You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucenenet.apache.org by ni...@apache.org on 2021/02/25 04:06:46 UTC
[lucenenet] 07/08: Lucene.Net.Tests.Analysis.Common: Removed
dependency on System.Text.Encoding.Codepages,
as it is not required in .NET Core 2.x and higher
This is an automated email from the ASF dual-hosted git repository.
nightowl888 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/lucenenet.git
commit 88ae70443edceb3b0a541d7ae5e90828654b01ff
Author: Shad Storhaug <sh...@shadstorhaug.com>
AuthorDate: Thu Feb 25 07:31:28 2021 +0700
Lucene.Net.Tests.Analysis.Common: Removed dependency on System.Text.Encoding.Codepages, as it is not required in .NET Core 2.x and higher
---
.../Lucene.Net.Tests.Analysis.Common.csproj | 5 -----
src/Lucene.Net.Tests.Analysis.Common/Startup.cs | 4 ++++
2 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/src/Lucene.Net.Tests.Analysis.Common/Lucene.Net.Tests.Analysis.Common.csproj b/src/Lucene.Net.Tests.Analysis.Common/Lucene.Net.Tests.Analysis.Common.csproj
index 0e8f2eb..b4b3e9a 100644
--- a/src/Lucene.Net.Tests.Analysis.Common/Lucene.Net.Tests.Analysis.Common.csproj
+++ b/src/Lucene.Net.Tests.Analysis.Common/Lucene.Net.Tests.Analysis.Common.csproj
@@ -48,14 +48,9 @@
<Import Project="$(SolutionDir)build/TestReferences.Common.targets" />
<ItemGroup Condition=" '$(TargetFramework)' == 'netcoreapp3.1' ">
- <PackageReference Include="System.Text.Encoding.CodePages" Version="$(SystemTextEncodingCodePagesPackageVersion)" />
<PackageReference Include="System.Net.Primitives" Version="$(SystemNetPrimitivesPackageVersion)" />
</ItemGroup>
- <ItemGroup Condition="'$(TargetFramework)' == 'netcoreapp2.1' ">
- <PackageReference Include="System.Text.Encoding.CodePages" Version="$(SystemTextEncodingCodePagesPackageVersion)" />
- </ItemGroup>
-
<ItemGroup Condition=" '$(TargetFramework)' == 'net48' ">
<Reference Include="System.IO.Compression" />
</ItemGroup>
diff --git a/src/Lucene.Net.Tests.Analysis.Common/Startup.cs b/src/Lucene.Net.Tests.Analysis.Common/Startup.cs
index a9502ca..7cdc10d 100644
--- a/src/Lucene.Net.Tests.Analysis.Common/Startup.cs
+++ b/src/Lucene.Net.Tests.Analysis.Common/Startup.cs
@@ -26,6 +26,10 @@ public class Startup : LuceneTestFrameworkInitializer
protected override void TestFrameworkSetUp()
{
#if FEATURE_ENCODINGPROVIDERS
+ // LUCENENET NOTE: Hunspell manual tests require additional encoding types. End users may
+ // require it to be added as well when using Hunspell, but there is no reason to load
+ // the code pages by default in Lucene.Net.Analysis.Common. It should be added by consumers
+ // or Hunspell that require it.
System.Text.Encoding.RegisterProvider(System.Text.CodePagesEncodingProvider.Instance);
#endif
}