lucenenet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nightowl...@apache.org
Subject [16/50] [abbrv] lucenenet git commit: SWEEP: Factored out exceptions into a new feature FEATURE_SERIALIZABLE_EXCEPTIONS, since we cannot support them on .NET Standard 2.0 and reworked build configurations to remove any .NET Standard 2.0 configurations th
Date Sat, 09 Sep 2017 00:31:34 GMT
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/71612621/src/Lucene.Net.Tests.Analysis.Kuromoji/Lucene.Net.Tests.Analysis.Kuromoji.csproj
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Analysis.Kuromoji/Lucene.Net.Tests.Analysis.Kuromoji.csproj b/src/Lucene.Net.Tests.Analysis.Kuromoji/Lucene.Net.Tests.Analysis.Kuromoji.csproj
index 411114b..91413c5 100644
--- a/src/Lucene.Net.Tests.Analysis.Kuromoji/Lucene.Net.Tests.Analysis.Kuromoji.csproj
+++ b/src/Lucene.Net.Tests.Analysis.Kuromoji/Lucene.Net.Tests.Analysis.Kuromoji.csproj
@@ -58,7 +58,6 @@
   </ItemGroup>
 
   <PropertyGroup Condition=" '$(TargetFramework)' == 'netcoreapp2.0' ">
-    <DefineConstants>$(DefineConstants);FEATURE_SERIALIZABLE</DefineConstants>
     <DebugType>portable</DebugType>
   </PropertyGroup>
 
@@ -72,7 +71,7 @@
   </PropertyGroup>
 
   <PropertyGroup Condition=" '$(TargetFramework)' == 'net451' ">
-    <DefineConstants>$(DefineConstants);FEATURE_SERIALIZABLE</DefineConstants>
+    <DefineConstants>$(DefineConstants);FEATURE_SERIALIZABLE_EXCEPTIONS</DefineConstants>
     <DebugType>full</DebugType>
   </PropertyGroup>
 

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/71612621/src/Lucene.Net.Tests.Analysis.Kuromoji/Support/TestExceptionSerialization.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Analysis.Kuromoji/Support/TestExceptionSerialization.cs b/src/Lucene.Net.Tests.Analysis.Kuromoji/Support/TestExceptionSerialization.cs
index 7dcea20..80d5b43 100644
--- a/src/Lucene.Net.Tests.Analysis.Kuromoji/Support/TestExceptionSerialization.cs
+++ b/src/Lucene.Net.Tests.Analysis.Kuromoji/Support/TestExceptionSerialization.cs
@@ -1,4 +1,4 @@
-#if FEATURE_SERIALIZABLE
+#if FEATURE_SERIALIZABLE_EXCEPTIONS
 using Lucene.Net.Attributes;
 using NUnit.Framework;
 using System;

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/71612621/src/Lucene.Net.Tests.Analysis.Phonetic/Lucene.Net.Tests.Analysis.Phonetic.csproj
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Analysis.Phonetic/Lucene.Net.Tests.Analysis.Phonetic.csproj b/src/Lucene.Net.Tests.Analysis.Phonetic/Lucene.Net.Tests.Analysis.Phonetic.csproj
index c71e77c..c19971f 100644
--- a/src/Lucene.Net.Tests.Analysis.Phonetic/Lucene.Net.Tests.Analysis.Phonetic.csproj
+++ b/src/Lucene.Net.Tests.Analysis.Phonetic/Lucene.Net.Tests.Analysis.Phonetic.csproj
@@ -57,7 +57,7 @@
   </ItemGroup>
 
   <PropertyGroup Condition=" '$(TargetFramework)' == 'netcoreapp2.0' ">
-    <DefineConstants>$(DefineConstants);NETSTANDARD;FEATURE_SERIALIZABLE</DefineConstants>
+    <DefineConstants>$(DefineConstants);NETSTANDARD</DefineConstants>
     <DebugType>portable</DebugType>
   </PropertyGroup>
   
@@ -67,7 +67,7 @@
   </PropertyGroup>
 
   <PropertyGroup Condition=" '$(TargetFramework)' == 'net451' ">
-    <DefineConstants>$(DefineConstants);FEATURE_SERIALIZABLE</DefineConstants>
+    <DefineConstants>$(DefineConstants);FEATURE_SERIALIZABLE_EXCEPTIONS</DefineConstants>
     <DebugType>full</DebugType>
   </PropertyGroup>
 

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/71612621/src/Lucene.Net.Tests.Analysis.Phonetic/Support/TestExceptionSerialization.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Analysis.Phonetic/Support/TestExceptionSerialization.cs b/src/Lucene.Net.Tests.Analysis.Phonetic/Support/TestExceptionSerialization.cs
index ac85e1a..282daff 100644
--- a/src/Lucene.Net.Tests.Analysis.Phonetic/Support/TestExceptionSerialization.cs
+++ b/src/Lucene.Net.Tests.Analysis.Phonetic/Support/TestExceptionSerialization.cs
@@ -1,4 +1,4 @@
-#if FEATURE_SERIALIZABLE
+#if FEATURE_SERIALIZABLE_EXCEPTIONS
 using Lucene.Net.Attributes;
 using NUnit.Framework;
 using System;

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/71612621/src/Lucene.Net.Tests.Analysis.SmartCn/Lucene.Net.Tests.Analysis.SmartCn.csproj
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Analysis.SmartCn/Lucene.Net.Tests.Analysis.SmartCn.csproj b/src/Lucene.Net.Tests.Analysis.SmartCn/Lucene.Net.Tests.Analysis.SmartCn.csproj
index 48e6e2e..7d113c7 100644
--- a/src/Lucene.Net.Tests.Analysis.SmartCn/Lucene.Net.Tests.Analysis.SmartCn.csproj
+++ b/src/Lucene.Net.Tests.Analysis.SmartCn/Lucene.Net.Tests.Analysis.SmartCn.csproj
@@ -61,7 +61,6 @@
   </ItemGroup>-->
 
   <PropertyGroup Condition=" '$(TargetFramework)' == 'netcoreapp2.0' ">
-    <DefineConstants>$(DefineConstants);FEATURE_SERIALIZABLE</DefineConstants>
     <DebugType>portable</DebugType>
   </PropertyGroup>
 
@@ -75,7 +74,7 @@
   </PropertyGroup>
 
   <PropertyGroup Condition=" '$(TargetFramework)' == 'net451' ">
-    <DefineConstants>$(DefineConstants);FEATURE_SERIALIZABLE</DefineConstants>
+    <DefineConstants>$(DefineConstants);FEATURE_SERIALIZABLE_EXCEPTIONS</DefineConstants>
     <DebugType>full</DebugType>
   </PropertyGroup>
 

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/71612621/src/Lucene.Net.Tests.Analysis.SmartCn/Support/TestExceptionSerialization.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Analysis.SmartCn/Support/TestExceptionSerialization.cs b/src/Lucene.Net.Tests.Analysis.SmartCn/Support/TestExceptionSerialization.cs
index 8c8d6a2..f01a3c3 100644
--- a/src/Lucene.Net.Tests.Analysis.SmartCn/Support/TestExceptionSerialization.cs
+++ b/src/Lucene.Net.Tests.Analysis.SmartCn/Support/TestExceptionSerialization.cs
@@ -1,4 +1,4 @@
-#if FEATURE_SERIALIZABLE
+#if FEATURE_SERIALIZABLE_EXCEPTIONS
 using Lucene.Net.Attributes;
 using NUnit.Framework;
 using System;

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/71612621/src/Lucene.Net.Tests.Analysis.Stempel/Lucene.Net.Tests.Analysis.Stempel.csproj
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Analysis.Stempel/Lucene.Net.Tests.Analysis.Stempel.csproj b/src/Lucene.Net.Tests.Analysis.Stempel/Lucene.Net.Tests.Analysis.Stempel.csproj
index ce0858d..32fb3d3 100644
--- a/src/Lucene.Net.Tests.Analysis.Stempel/Lucene.Net.Tests.Analysis.Stempel.csproj
+++ b/src/Lucene.Net.Tests.Analysis.Stempel/Lucene.Net.Tests.Analysis.Stempel.csproj
@@ -58,7 +58,6 @@
   </ItemGroup>
 
   <PropertyGroup Condition=" '$(TargetFramework)' == 'netcoreapp2.0' ">
-    <DefineConstants>$(DefineConstants);FEATURE_SERIALIZABLE</DefineConstants>
     <DebugType>portable</DebugType>
   </PropertyGroup>
   
@@ -68,7 +67,7 @@
   </PropertyGroup>
 
   <PropertyGroup Condition=" '$(TargetFramework)' == 'net451' ">
-    <DefineConstants>$(DefineConstants);FEATURE_SERIALIZABLE</DefineConstants>
+    <DefineConstants>$(DefineConstants);FEATURE_SERIALIZABLE_EXCEPTIONS</DefineConstants>
     <DebugType>full</DebugType>
   </PropertyGroup>
 

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/71612621/src/Lucene.Net.Tests.Analysis.Stempel/Support/TestExceptionSerialization.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Analysis.Stempel/Support/TestExceptionSerialization.cs b/src/Lucene.Net.Tests.Analysis.Stempel/Support/TestExceptionSerialization.cs
index 53a5e0e..4fc50cb 100644
--- a/src/Lucene.Net.Tests.Analysis.Stempel/Support/TestExceptionSerialization.cs
+++ b/src/Lucene.Net.Tests.Analysis.Stempel/Support/TestExceptionSerialization.cs
@@ -1,4 +1,4 @@
-#if FEATURE_SERIALIZABLE
+#if FEATURE_SERIALIZABLE_EXCEPTIONS
 using Lucene.Net.Attributes;
 using NUnit.Framework;
 using System;

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/71612621/src/Lucene.Net.Tests.Benchmark/Lucene.Net.Tests.Benchmark.csproj
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Benchmark/Lucene.Net.Tests.Benchmark.csproj b/src/Lucene.Net.Tests.Benchmark/Lucene.Net.Tests.Benchmark.csproj
index 6dbd284..000f24d 100644
--- a/src/Lucene.Net.Tests.Benchmark/Lucene.Net.Tests.Benchmark.csproj
+++ b/src/Lucene.Net.Tests.Benchmark/Lucene.Net.Tests.Benchmark.csproj
@@ -63,7 +63,7 @@
   
   <PropertyGroup Condition=" '$(TargetFramework)' == 'netcoreapp2.0' ">
     <!-- LUCENENET TODO: Change FEATURE_THREADINTERRUPTEDEXCEPTION to FEATURE_THREADINTERRUPT and add solution wide -->
-    <DefineConstants>$(DefineConstants);FEATURE_SERIALIZABLE;FEATURE_THREAD_PRIORITY;FEATURE_THREADINTERRUPTEDEXCEPTION</DefineConstants>
+    <DefineConstants>$(DefineConstants);FEATURE_THREAD_PRIORITY;FEATURE_THREADINTERRUPTEDEXCEPTION</DefineConstants>
     <DebugType>portable</DebugType>
   </PropertyGroup>
 
@@ -77,7 +77,7 @@
   </PropertyGroup>
 
   <PropertyGroup Condition=" '$(TargetFramework)' == 'net451' ">
-    <DefineConstants>$(DefineConstants);FEATURE_SERIALIZABLE;FEATURE_THREAD_PRIORITY;FEATURE_THREADINTERRUPTEDEXCEPTION</DefineConstants>
+    <DefineConstants>$(DefineConstants);FEATURE_SERIALIZABLE_EXCEPTIONS;FEATURE_THREAD_PRIORITY;FEATURE_THREADINTERRUPTEDEXCEPTION</DefineConstants>
     <DebugType>full</DebugType>
   </PropertyGroup>
 

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/71612621/src/Lucene.Net.Tests.Benchmark/Support/TestExceptionSerialization.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Benchmark/Support/TestExceptionSerialization.cs b/src/Lucene.Net.Tests.Benchmark/Support/TestExceptionSerialization.cs
index fdd7b5b..9e2933c 100644
--- a/src/Lucene.Net.Tests.Benchmark/Support/TestExceptionSerialization.cs
+++ b/src/Lucene.Net.Tests.Benchmark/Support/TestExceptionSerialization.cs
@@ -1,4 +1,4 @@
-#if FEATURE_SERIALIZABLE
+#if FEATURE_SERIALIZABLE_EXCEPTIONS
 using Lucene.Net.Attributes;
 using NUnit.Framework;
 using System;

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/71612621/src/Lucene.Net.Tests.Classification/Lucene.Net.Tests.Classification.csproj
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Classification/Lucene.Net.Tests.Classification.csproj b/src/Lucene.Net.Tests.Classification/Lucene.Net.Tests.Classification.csproj
index 0110cf9..6f1383a 100644
--- a/src/Lucene.Net.Tests.Classification/Lucene.Net.Tests.Classification.csproj
+++ b/src/Lucene.Net.Tests.Classification/Lucene.Net.Tests.Classification.csproj
@@ -58,17 +58,16 @@
   </ItemGroup>
 
   <PropertyGroup Condition=" '$(TargetFramework)' == 'netcoreapp2.0' ">
-    <DefineConstants>$(DefineConstants);NETSTANDARD;FEATURE_SERIALIZABLE</DefineConstants>
     <DebugType>portable</DebugType>
   </PropertyGroup>
 
   <PropertyGroup Condition=" '$(TargetFramework)' == 'netcoreapp1.0' ">
-    <DefineConstants>$(DefineConstants);NETSTANDARD;NETSTANDARD1_5</DefineConstants>
+    <DefineConstants>$(DefineConstants);NETSTANDARD1_5</DefineConstants>
     <DebugType>portable</DebugType>
   </PropertyGroup>
 
   <PropertyGroup Condition=" '$(TargetFramework)' == 'net451' ">
-    <DefineConstants>$(DefineConstants);FEATURE_SERIALIZABLE</DefineConstants>
+    <DefineConstants>$(DefineConstants);FEATURE_SERIALIZABLE_EXCEPTIONS</DefineConstants>
     <DebugType>full</DebugType>
   </PropertyGroup>
 

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/71612621/src/Lucene.Net.Tests.Classification/Support/TestExceptionSerialization.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Classification/Support/TestExceptionSerialization.cs b/src/Lucene.Net.Tests.Classification/Support/TestExceptionSerialization.cs
index f67bc79..1f5e4d1 100644
--- a/src/Lucene.Net.Tests.Classification/Support/TestExceptionSerialization.cs
+++ b/src/Lucene.Net.Tests.Classification/Support/TestExceptionSerialization.cs
@@ -1,4 +1,4 @@
-#if FEATURE_SERIALIZABLE
+#if FEATURE_SERIALIZABLE_EXCEPTIONS
 using Lucene.Net.Attributes;
 using NUnit.Framework;
 using System;

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/71612621/src/Lucene.Net.Tests.Codecs/Lucene.Net.Tests.Codecs.csproj
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Codecs/Lucene.Net.Tests.Codecs.csproj b/src/Lucene.Net.Tests.Codecs/Lucene.Net.Tests.Codecs.csproj
index b5d7cfa..856345a 100644
--- a/src/Lucene.Net.Tests.Codecs/Lucene.Net.Tests.Codecs.csproj
+++ b/src/Lucene.Net.Tests.Codecs/Lucene.Net.Tests.Codecs.csproj
@@ -58,7 +58,7 @@
   </ItemGroup>
 
   <PropertyGroup Condition=" '$(TargetFramework)' == 'netcoreapp2.0' ">
-    <DefineConstants>$(DefineConstants);NETSTANDARD;FEATURE_SERIALIZABLE</DefineConstants>
+    <DefineConstants>$(DefineConstants);NETSTANDARD</DefineConstants>
     <DebugType>portable</DebugType>
   </PropertyGroup>
 
@@ -68,7 +68,7 @@
   </PropertyGroup>
 
   <PropertyGroup Condition=" '$(TargetFramework)' == 'net451' ">
-    <DefineConstants>$(DefineConstants);FEATURE_SERIALIZABLE</DefineConstants>
+    <DefineConstants>$(DefineConstants);FEATURE_SERIALIZABLE_EXCEPTIONS</DefineConstants>
     <DebugType>full</DebugType>
   </PropertyGroup>
 

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/71612621/src/Lucene.Net.Tests.Codecs/Support/TestExceptionSerialization.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Codecs/Support/TestExceptionSerialization.cs b/src/Lucene.Net.Tests.Codecs/Support/TestExceptionSerialization.cs
index 86002ee..293f3cc 100644
--- a/src/Lucene.Net.Tests.Codecs/Support/TestExceptionSerialization.cs
+++ b/src/Lucene.Net.Tests.Codecs/Support/TestExceptionSerialization.cs
@@ -1,4 +1,4 @@
-#if FEATURE_SERIALIZABLE
+#if FEATURE_SERIALIZABLE_EXCEPTIONS
 using Lucene.Net.Attributes;
 using NUnit.Framework;
 using System;

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/71612621/src/Lucene.Net.Tests.Demo/Lucene.Net.Tests.Demo.csproj
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Demo/Lucene.Net.Tests.Demo.csproj b/src/Lucene.Net.Tests.Demo/Lucene.Net.Tests.Demo.csproj
index 3299d26..710cacf 100644
--- a/src/Lucene.Net.Tests.Demo/Lucene.Net.Tests.Demo.csproj
+++ b/src/Lucene.Net.Tests.Demo/Lucene.Net.Tests.Demo.csproj
@@ -59,17 +59,14 @@
   </ItemGroup>
 
   <PropertyGroup Condition=" '$(TargetFramework)' == 'netcoreapp2.0' ">
-    <DefineConstants>$(DefineConstants);FEATURE_SERIALIZABLE</DefineConstants>
     <DebugType>portable</DebugType>
   </PropertyGroup>
   
   <PropertyGroup Condition=" '$(TargetFramework)' == 'netcoreapp1.0' ">
-    <DefineConstants>$(DefineConstants);NETSTANDARD1_5</DefineConstants>
     <DebugType>portable</DebugType>
   </PropertyGroup>
 
   <PropertyGroup Condition=" '$(TargetFramework)' == 'net451' ">
-    <DefineConstants>$(DefineConstants);FEATURE_SERIALIZABLE</DefineConstants>
     <DebugType>full</DebugType>
   </PropertyGroup>
 

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/71612621/src/Lucene.Net.Tests.Expressions/Lucene.Net.Tests.Expressions.csproj
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Expressions/Lucene.Net.Tests.Expressions.csproj b/src/Lucene.Net.Tests.Expressions/Lucene.Net.Tests.Expressions.csproj
index 6304692..572c211 100644
--- a/src/Lucene.Net.Tests.Expressions/Lucene.Net.Tests.Expressions.csproj
+++ b/src/Lucene.Net.Tests.Expressions/Lucene.Net.Tests.Expressions.csproj
@@ -58,17 +58,16 @@
   </ItemGroup>
 
   <PropertyGroup Condition=" '$(TargetFramework)' == 'netcoreapp2.0' ">
-    <DefineConstants>$(DefineConstants);NETSTANDARD;FEATURE_SERIALIZABLE</DefineConstants>
     <DebugType>portable</DebugType>
   </PropertyGroup>
 
   <PropertyGroup Condition=" '$(TargetFramework)' == 'netcoreapp1.0' ">
-    <DefineConstants>$(DefineConstants);NETSTANDARD;NETSTANDARD1_5</DefineConstants>
+    <DefineConstants>$(DefineConstants);NETSTANDARD1_5</DefineConstants>
     <DebugType>portable</DebugType>
   </PropertyGroup>
 
   <PropertyGroup Condition=" '$(TargetFramework)' == 'net451' ">
-    <DefineConstants>$(DefineConstants);FEATURE_SERIALIZABLE</DefineConstants>
+    <DefineConstants>$(DefineConstants);FEATURE_SERIALIZABLE_EXCEPTIONS</DefineConstants>
     <DebugType>full</DebugType>
   </PropertyGroup>
 

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/71612621/src/Lucene.Net.Tests.Expressions/Support/TestExceptionSerialization.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Expressions/Support/TestExceptionSerialization.cs b/src/Lucene.Net.Tests.Expressions/Support/TestExceptionSerialization.cs
index 51d04aa..37efac9 100644
--- a/src/Lucene.Net.Tests.Expressions/Support/TestExceptionSerialization.cs
+++ b/src/Lucene.Net.Tests.Expressions/Support/TestExceptionSerialization.cs
@@ -1,4 +1,4 @@
-#if FEATURE_SERIALIZABLE
+#if FEATURE_SERIALIZABLE_EXCEPTIONS
 using Lucene.Net.Attributes;
 using NUnit.Framework;
 using System;

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/71612621/src/Lucene.Net.Tests.Facet/Lucene.Net.Tests.Facet.csproj
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Facet/Lucene.Net.Tests.Facet.csproj b/src/Lucene.Net.Tests.Facet/Lucene.Net.Tests.Facet.csproj
index 944427a..8382701 100644
--- a/src/Lucene.Net.Tests.Facet/Lucene.Net.Tests.Facet.csproj
+++ b/src/Lucene.Net.Tests.Facet/Lucene.Net.Tests.Facet.csproj
@@ -58,7 +58,7 @@
   </ItemGroup>
 
   <PropertyGroup Condition=" '$(TargetFramework)' == 'netcoreapp2.0' ">
-    <DefineConstants>$(DefineConstants);FEATURE_SERIALIZABLE;FEATURE_THREAD_PRIORITY;FEATURE_THREADINTERRUPTEDEXCEPTION</DefineConstants>
+    <DefineConstants>$(DefineConstants);FEATURE_THREAD_PRIORITY;FEATURE_THREADINTERRUPTEDEXCEPTION</DefineConstants>
     <DebugType>portable</DebugType>
   </PropertyGroup>
 
@@ -68,7 +68,7 @@
   </PropertyGroup>
 
   <PropertyGroup Condition=" '$(TargetFramework)' == 'net451' ">
-    <DefineConstants>$(DefineConstants);FEATURE_SERIALIZABLE;FEATURE_THREAD_PRIORITY;FEATURE_THREADINTERRUPTEDEXCEPTION</DefineConstants>
+    <DefineConstants>$(DefineConstants);FEATURE_SERIALIZABLE_EXCEPTIONS;FEATURE_THREAD_PRIORITY;FEATURE_THREADINTERRUPTEDEXCEPTION</DefineConstants>
     <DebugType>full</DebugType>
   </PropertyGroup>
 

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/71612621/src/Lucene.Net.Tests.Facet/Support/TestExceptionSerialization.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Facet/Support/TestExceptionSerialization.cs b/src/Lucene.Net.Tests.Facet/Support/TestExceptionSerialization.cs
index 9e6a746..947e21a 100644
--- a/src/Lucene.Net.Tests.Facet/Support/TestExceptionSerialization.cs
+++ b/src/Lucene.Net.Tests.Facet/Support/TestExceptionSerialization.cs
@@ -1,4 +1,4 @@
-#if FEATURE_SERIALIZABLE
+#if FEATURE_SERIALIZABLE_EXCEPTIONS
 using Lucene.Net.Attributes;
 using NUnit.Framework;
 using System;

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/71612621/src/Lucene.Net.Tests.Grouping/Lucene.Net.Tests.Grouping.csproj
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Grouping/Lucene.Net.Tests.Grouping.csproj b/src/Lucene.Net.Tests.Grouping/Lucene.Net.Tests.Grouping.csproj
index 89d6ed0..70c16e7 100644
--- a/src/Lucene.Net.Tests.Grouping/Lucene.Net.Tests.Grouping.csproj
+++ b/src/Lucene.Net.Tests.Grouping/Lucene.Net.Tests.Grouping.csproj
@@ -58,7 +58,6 @@
   </ItemGroup>
 
   <PropertyGroup Condition=" '$(TargetFramework)' == 'netcoreapp2.0' ">
-    <DefineConstants>$(DefineConstants);FEATURE_SERIALIZABLE</DefineConstants>
     <DebugType>portable</DebugType>
   </PropertyGroup>
 
@@ -68,7 +67,7 @@
   </PropertyGroup>
 
   <PropertyGroup Condition=" '$(TargetFramework)' == 'net451' ">
-    <DefineConstants>$(DefineConstants);FEATURE_SERIALIZABLE</DefineConstants>
+    <DefineConstants>$(DefineConstants);FEATURE_SERIALIZABLE_EXCEPTIONS</DefineConstants>
     <DebugType>full</DebugType>
   </PropertyGroup>
 

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/71612621/src/Lucene.Net.Tests.Grouping/Support/TestExceptionSerialization.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Grouping/Support/TestExceptionSerialization.cs b/src/Lucene.Net.Tests.Grouping/Support/TestExceptionSerialization.cs
index 3cfd8ab..6642c21 100644
--- a/src/Lucene.Net.Tests.Grouping/Support/TestExceptionSerialization.cs
+++ b/src/Lucene.Net.Tests.Grouping/Support/TestExceptionSerialization.cs
@@ -1,4 +1,4 @@
-#if FEATURE_SERIALIZABLE
+#if FEATURE_SERIALIZABLE_EXCEPTIONS
 using Lucene.Net.Attributes;
 using NUnit.Framework;
 using System;

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/71612621/src/Lucene.Net.Tests.Highlighter/Lucene.Net.Tests.Highlighter.csproj
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Highlighter/Lucene.Net.Tests.Highlighter.csproj b/src/Lucene.Net.Tests.Highlighter/Lucene.Net.Tests.Highlighter.csproj
index 2b60b19..c10a860 100644
--- a/src/Lucene.Net.Tests.Highlighter/Lucene.Net.Tests.Highlighter.csproj
+++ b/src/Lucene.Net.Tests.Highlighter/Lucene.Net.Tests.Highlighter.csproj
@@ -59,7 +59,6 @@
   </ItemGroup>
 
   <PropertyGroup Condition=" '$(TargetFramework)' == 'netcoreapp2.0' ">
-    <DefineConstants>$(DefineConstants);FEATURE_SERIALIZABLE</DefineConstants>
     <DebugType>portable</DebugType>
   </PropertyGroup>
 
@@ -73,7 +72,7 @@
   </PropertyGroup>
 
   <PropertyGroup Condition=" '$(TargetFramework)' == 'net451' ">
-    <DefineConstants>$(DefineConstants);FEATURE_SERIALIZABLE</DefineConstants>
+    <DefineConstants>$(DefineConstants);FEATURE_SERIALIZABLE_EXCEPTIONS</DefineConstants>
     <DebugType>full</DebugType>
   </PropertyGroup>
 

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/71612621/src/Lucene.Net.Tests.Highlighter/Support/TestExceptionSerialization.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Highlighter/Support/TestExceptionSerialization.cs b/src/Lucene.Net.Tests.Highlighter/Support/TestExceptionSerialization.cs
index ad84905..4a11185 100644
--- a/src/Lucene.Net.Tests.Highlighter/Support/TestExceptionSerialization.cs
+++ b/src/Lucene.Net.Tests.Highlighter/Support/TestExceptionSerialization.cs
@@ -1,4 +1,4 @@
-#if FEATURE_SERIALIZABLE
+#if FEATURE_SERIALIZABLE_EXCEPTIONS
 using Lucene.Net.Attributes;
 using NUnit.Framework;
 using System;

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/71612621/src/Lucene.Net.Tests.Join/Lucene.Net.Tests.Join.csproj
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Join/Lucene.Net.Tests.Join.csproj b/src/Lucene.Net.Tests.Join/Lucene.Net.Tests.Join.csproj
index 557b4f2..8ae7db1 100644
--- a/src/Lucene.Net.Tests.Join/Lucene.Net.Tests.Join.csproj
+++ b/src/Lucene.Net.Tests.Join/Lucene.Net.Tests.Join.csproj
@@ -58,7 +58,6 @@
   </ItemGroup>
 
   <PropertyGroup Condition=" '$(TargetFramework)' == 'netcoreapp2.0' ">
-    <DefineConstants>$(DefineConstants);FEATURE_SERIALIZABLE</DefineConstants>
     <DebugType>portable</DebugType>
   </PropertyGroup>
 
@@ -68,7 +67,7 @@
   </PropertyGroup>
 
   <PropertyGroup Condition=" '$(TargetFramework)' == 'net451' ">
-    <DefineConstants>$(DefineConstants);FEATURE_SERIALIZABLE</DefineConstants>
+    <DefineConstants>$(DefineConstants);FEATURE_SERIALIZABLE_EXCEPTIONS</DefineConstants>
     <DebugType>full</DebugType>
   </PropertyGroup>
 

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/71612621/src/Lucene.Net.Tests.Join/Support/TestExceptionSerialization.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Join/Support/TestExceptionSerialization.cs b/src/Lucene.Net.Tests.Join/Support/TestExceptionSerialization.cs
index 4cccc74..5c7a668 100644
--- a/src/Lucene.Net.Tests.Join/Support/TestExceptionSerialization.cs
+++ b/src/Lucene.Net.Tests.Join/Support/TestExceptionSerialization.cs
@@ -1,4 +1,4 @@
-#if FEATURE_SERIALIZABLE
+#if FEATURE_SERIALIZABLE_EXCEPTIONS
 using Lucene.Net.Attributes;
 using NUnit.Framework;
 using System;

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/71612621/src/Lucene.Net.Tests.Memory/Lucene.Net.Tests.Memory.csproj
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Memory/Lucene.Net.Tests.Memory.csproj b/src/Lucene.Net.Tests.Memory/Lucene.Net.Tests.Memory.csproj
index a5670fa..aab20d2 100644
--- a/src/Lucene.Net.Tests.Memory/Lucene.Net.Tests.Memory.csproj
+++ b/src/Lucene.Net.Tests.Memory/Lucene.Net.Tests.Memory.csproj
@@ -58,13 +58,17 @@
     <PackageReference Include="TeamCity.VSTest.TestAdapter" Version="1.0.2" />
   </ItemGroup>
 
+  <PropertyGroup Condition=" '$(TargetFramework)' == 'netcoreapp2.0' ">
+    <DebugType>portable</DebugType>
+  </PropertyGroup>
+
   <PropertyGroup Condition=" '$(TargetFramework)' == 'netcoreapp1.0' ">
-    <DefineConstants>$(DefineConstants);NETSTANDARD;NETSTANDARD1_5</DefineConstants>
+    <DefineConstants>$(DefineConstants);NETSTANDARD1_5</DefineConstants>
     <DebugType>portable</DebugType>
   </PropertyGroup>
 
   <PropertyGroup Condition=" '$(TargetFramework)' == 'net451' ">
-    <DefineConstants>$(DefineConstants);FEATURE_SERIALIZABLE</DefineConstants>
+    <DefineConstants>$(DefineConstants);FEATURE_SERIALIZABLE_EXCEPTIONS</DefineConstants>
     <DebugType>full</DebugType>
   </PropertyGroup>
 

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/71612621/src/Lucene.Net.Tests.Memory/Support/TestExceptionSerialization.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Memory/Support/TestExceptionSerialization.cs b/src/Lucene.Net.Tests.Memory/Support/TestExceptionSerialization.cs
index a3e0ec6..43ec27a 100644
--- a/src/Lucene.Net.Tests.Memory/Support/TestExceptionSerialization.cs
+++ b/src/Lucene.Net.Tests.Memory/Support/TestExceptionSerialization.cs
@@ -1,4 +1,4 @@
-#if FEATURE_SERIALIZABLE
+#if FEATURE_SERIALIZABLE_EXCEPTIONS
 using Lucene.Net.Attributes;
 using NUnit.Framework;
 using System;

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/71612621/src/Lucene.Net.Tests.Misc/Lucene.Net.Tests.Misc.csproj
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Misc/Lucene.Net.Tests.Misc.csproj b/src/Lucene.Net.Tests.Misc/Lucene.Net.Tests.Misc.csproj
index 939c3fc..30b01e1 100644
--- a/src/Lucene.Net.Tests.Misc/Lucene.Net.Tests.Misc.csproj
+++ b/src/Lucene.Net.Tests.Misc/Lucene.Net.Tests.Misc.csproj
@@ -57,7 +57,6 @@
   </ItemGroup>
 
   <PropertyGroup Condition=" '$(TargetFramework)' == 'netcoreapp2.0' ">
-    <DefineConstants>$(DefineConstants);FEATURE_SERIALIZABLE</DefineConstants>
     <DebugType>portable</DebugType>
   </PropertyGroup>
 
@@ -67,7 +66,7 @@
   </PropertyGroup>
 
   <PropertyGroup Condition=" '$(TargetFramework)' == 'net451' ">
-    <DefineConstants>$(DefineConstants);FEATURE_SERIALIZABLE</DefineConstants>
+    <DefineConstants>$(DefineConstants);FEATURE_SERIALIZABLE_EXCEPTIONS</DefineConstants>
     <DebugType>full</DebugType>
   </PropertyGroup>
 

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/71612621/src/Lucene.Net.Tests.Misc/Support/TestExceptionSerialization.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Misc/Support/TestExceptionSerialization.cs b/src/Lucene.Net.Tests.Misc/Support/TestExceptionSerialization.cs
index 48609c6..c92102e 100644
--- a/src/Lucene.Net.Tests.Misc/Support/TestExceptionSerialization.cs
+++ b/src/Lucene.Net.Tests.Misc/Support/TestExceptionSerialization.cs
@@ -1,4 +1,4 @@
-#if FEATURE_SERIALIZABLE
+#if FEATURE_SERIALIZABLE_EXCEPTIONS
 using Lucene.Net.Attributes;
 using NUnit.Framework;
 using System;

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/71612621/src/Lucene.Net.Tests.Queries/Lucene.Net.Tests.Queries.csproj
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Queries/Lucene.Net.Tests.Queries.csproj b/src/Lucene.Net.Tests.Queries/Lucene.Net.Tests.Queries.csproj
index f3d363c..db3869b 100644
--- a/src/Lucene.Net.Tests.Queries/Lucene.Net.Tests.Queries.csproj
+++ b/src/Lucene.Net.Tests.Queries/Lucene.Net.Tests.Queries.csproj
@@ -57,17 +57,16 @@
   </ItemGroup>
 
   <PropertyGroup Condition=" '$(TargetFramework)' == 'netcoreapp2.0' ">
-    <DefineConstants>$(DefineConstants);NETSTANDARD;FEATURE_SERIALIZABLE</DefineConstants>
     <DebugType>portable</DebugType>
   </PropertyGroup>
 
   <PropertyGroup Condition=" '$(TargetFramework)' == 'netcoreapp1.0' ">
-    <DefineConstants>$(DefineConstants);NETSTANDARD;NETSTANDARD1_5</DefineConstants>
+    <DefineConstants>$(DefineConstants);NETSTANDARD1_5</DefineConstants>
     <DebugType>portable</DebugType>
   </PropertyGroup>
 
   <PropertyGroup Condition=" '$(TargetFramework)' == 'net451' ">
-    <DefineConstants>$(DefineConstants);FEATURE_SERIALIZABLE</DefineConstants>
+    <DefineConstants>$(DefineConstants);FEATURE_SERIALIZABLE_EXCEPTIONS</DefineConstants>
     <DebugType>full</DebugType>
   </PropertyGroup>
 

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/71612621/src/Lucene.Net.Tests.Queries/Support/TestExceptionSerialization.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Queries/Support/TestExceptionSerialization.cs b/src/Lucene.Net.Tests.Queries/Support/TestExceptionSerialization.cs
index aa8bd28..7d8442e 100644
--- a/src/Lucene.Net.Tests.Queries/Support/TestExceptionSerialization.cs
+++ b/src/Lucene.Net.Tests.Queries/Support/TestExceptionSerialization.cs
@@ -1,4 +1,4 @@
-#if FEATURE_SERIALIZABLE
+#if FEATURE_SERIALIZABLE_EXCEPTIONS
 using Lucene.Net.Attributes;
 using NUnit.Framework;
 using System;

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/71612621/src/Lucene.Net.Tests.QueryParser/Lucene.Net.Tests.QueryParser.csproj
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.QueryParser/Lucene.Net.Tests.QueryParser.csproj b/src/Lucene.Net.Tests.QueryParser/Lucene.Net.Tests.QueryParser.csproj
index 791401f..57ea515 100644
--- a/src/Lucene.Net.Tests.QueryParser/Lucene.Net.Tests.QueryParser.csproj
+++ b/src/Lucene.Net.Tests.QueryParser/Lucene.Net.Tests.QueryParser.csproj
@@ -68,7 +68,7 @@
   </PropertyGroup>
 
   <PropertyGroup Condition=" '$(TargetFramework)' == 'net451' ">
-    <DefineConstants>$(DefineConstants);FEATURE_SERIALIZABLE</DefineConstants>
+    <DefineConstants>$(DefineConstants);FEATURE_SERIALIZABLE_EXCEPTIONS</DefineConstants>
     <DebugType>full</DebugType>
   </PropertyGroup>
 

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/71612621/src/Lucene.Net.Tests.QueryParser/Support/TestExceptionSerialization.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.QueryParser/Support/TestExceptionSerialization.cs b/src/Lucene.Net.Tests.QueryParser/Support/TestExceptionSerialization.cs
index 1c1f1d7..f448c95 100644
--- a/src/Lucene.Net.Tests.QueryParser/Support/TestExceptionSerialization.cs
+++ b/src/Lucene.Net.Tests.QueryParser/Support/TestExceptionSerialization.cs
@@ -1,4 +1,4 @@
-#if FEATURE_SERIALIZABLE
+#if FEATURE_SERIALIZABLE_EXCEPTIONS
 using Lucene.Net.Attributes;
 using NUnit.Framework;
 using System;

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/71612621/src/Lucene.Net.Tests.Replicator/Lucene.Net.Tests.Replicator.csproj
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Replicator/Lucene.Net.Tests.Replicator.csproj b/src/Lucene.Net.Tests.Replicator/Lucene.Net.Tests.Replicator.csproj
index 6aeb24e..cff13ed 100644
--- a/src/Lucene.Net.Tests.Replicator/Lucene.Net.Tests.Replicator.csproj
+++ b/src/Lucene.Net.Tests.Replicator/Lucene.Net.Tests.Replicator.csproj
@@ -60,7 +60,6 @@
   </ItemGroup>
 
   <PropertyGroup Condition=" '$(TargetFramework)' == 'netcoreapp2.0' ">
-    <DefineConstants>$(DefineConstants);FEATURE_SERIALIZABLE</DefineConstants>
     <DebugType>portable</DebugType>
   </PropertyGroup>
 
@@ -70,7 +69,7 @@
   </PropertyGroup>
 
   <PropertyGroup Condition=" '$(TargetFramework)' == 'net451' ">
-    <DefineConstants>$(DefineConstants);FEATURE_SERIALIZABLE</DefineConstants>
+    <DefineConstants>$(DefineConstants);FEATURE_SERIALIZABLE_EXCEPTIONS</DefineConstants>
     <DebugType>full</DebugType>
   </PropertyGroup>
 

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/71612621/src/Lucene.Net.Tests.Replicator/Support/TestExceptionSerialization.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Replicator/Support/TestExceptionSerialization.cs b/src/Lucene.Net.Tests.Replicator/Support/TestExceptionSerialization.cs
index 59535e3..02b9665 100644
--- a/src/Lucene.Net.Tests.Replicator/Support/TestExceptionSerialization.cs
+++ b/src/Lucene.Net.Tests.Replicator/Support/TestExceptionSerialization.cs
@@ -1,4 +1,4 @@
-#if FEATURE_SERIALIZABLE
+#if FEATURE_SERIALIZABLE_EXCEPTIONS
 using Lucene.Net.Attributes;
 using NUnit.Framework;
 using System;

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/71612621/src/Lucene.Net.Tests.Sandbox/Lucene.Net.Tests.Sandbox.csproj
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Sandbox/Lucene.Net.Tests.Sandbox.csproj b/src/Lucene.Net.Tests.Sandbox/Lucene.Net.Tests.Sandbox.csproj
index 8cf125d..a50c4ab 100644
--- a/src/Lucene.Net.Tests.Sandbox/Lucene.Net.Tests.Sandbox.csproj
+++ b/src/Lucene.Net.Tests.Sandbox/Lucene.Net.Tests.Sandbox.csproj
@@ -59,7 +59,6 @@
   </ItemGroup>
 
   <PropertyGroup Condition=" '$(TargetFramework)' == 'netcoreapp2.0' ">
-    <DefineConstants>$(DefineConstants);FEATURE_SERIALIZABLE</DefineConstants>
     <DebugType>portable</DebugType>
   </PropertyGroup>
 
@@ -69,7 +68,7 @@
   </PropertyGroup>
 
   <PropertyGroup Condition=" '$(TargetFramework)' == 'net451' ">
-    <DefineConstants>$(DefineConstants);FEATURE_SERIALIZABLE</DefineConstants>
+    <DefineConstants>$(DefineConstants);FEATURE_SERIALIZABLE_EXCEPTIONS</DefineConstants>
     <DebugType>full</DebugType>
   </PropertyGroup>
 

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/71612621/src/Lucene.Net.Tests.Sandbox/Support/TestExceptionSerialization.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Sandbox/Support/TestExceptionSerialization.cs b/src/Lucene.Net.Tests.Sandbox/Support/TestExceptionSerialization.cs
index 01ce552..0b45e48 100644
--- a/src/Lucene.Net.Tests.Sandbox/Support/TestExceptionSerialization.cs
+++ b/src/Lucene.Net.Tests.Sandbox/Support/TestExceptionSerialization.cs
@@ -1,4 +1,4 @@
-#if FEATURE_SERIALIZABLE
+#if FEATURE_SERIALIZABLE_EXCEPTIONS
 using Lucene.Net.Attributes;
 using NUnit.Framework;
 using System;

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/71612621/src/Lucene.Net.Tests.Spatial/Lucene.Net.Tests.Spatial.csproj
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Spatial/Lucene.Net.Tests.Spatial.csproj b/src/Lucene.Net.Tests.Spatial/Lucene.Net.Tests.Spatial.csproj
index 98ae1bf..12b1c37 100644
--- a/src/Lucene.Net.Tests.Spatial/Lucene.Net.Tests.Spatial.csproj
+++ b/src/Lucene.Net.Tests.Spatial/Lucene.Net.Tests.Spatial.csproj
@@ -61,7 +61,6 @@
   </ItemGroup>
 
   <PropertyGroup Condition=" '$(TargetFramework)' == 'netcoreapp2.0' ">
-    <DefineConstants>$(DefineConstants);NETSTANDARD;FEATURE_SERIALIZABLE</DefineConstants>
     <DebugType>portable</DebugType>
   </PropertyGroup>
 
@@ -70,12 +69,12 @@
   </ItemGroup>
 
   <PropertyGroup Condition=" '$(TargetFramework)' == 'netcoreapp1.0' ">
-    <DefineConstants>$(DefineConstants);NETSTANDARD;NETSTANDARD1_5</DefineConstants>
+    <DefineConstants>$(DefineConstants);NETSTANDARD1_5</DefineConstants>
     <DebugType>portable</DebugType>
   </PropertyGroup>
 
   <PropertyGroup Condition=" '$(TargetFramework)' == 'net451' ">
-    <DefineConstants>$(DefineConstants);FEATURE_SERIALIZABLE</DefineConstants>
+    <DefineConstants>$(DefineConstants);FEATURE_SERIALIZABLE_EXCEPTIONS</DefineConstants>
     <DebugType>full</DebugType>
   </PropertyGroup>
 

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/71612621/src/Lucene.Net.Tests.Spatial/Support/TestExceptionSerialization.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Spatial/Support/TestExceptionSerialization.cs b/src/Lucene.Net.Tests.Spatial/Support/TestExceptionSerialization.cs
index d37d97c..9dd217d 100644
--- a/src/Lucene.Net.Tests.Spatial/Support/TestExceptionSerialization.cs
+++ b/src/Lucene.Net.Tests.Spatial/Support/TestExceptionSerialization.cs
@@ -1,4 +1,4 @@
-#if FEATURE_SERIALIZABLE
+#if FEATURE_SERIALIZABLE_EXCEPTIONS
 using Lucene.Net.Attributes;
 using NUnit.Framework;
 using System;

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/71612621/src/Lucene.Net.Tests.Suggest/Lucene.Net.Tests.Suggest.csproj
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Suggest/Lucene.Net.Tests.Suggest.csproj b/src/Lucene.Net.Tests.Suggest/Lucene.Net.Tests.Suggest.csproj
index 81f7e1d..1605e3a 100644
--- a/src/Lucene.Net.Tests.Suggest/Lucene.Net.Tests.Suggest.csproj
+++ b/src/Lucene.Net.Tests.Suggest/Lucene.Net.Tests.Suggest.csproj
@@ -60,7 +60,7 @@
   </ItemGroup>
 
   <PropertyGroup Condition=" '$(TargetFramework)' == 'netcoreapp2.0' ">
-    <DefineConstants>$(DefineConstants);FEATURE_SERIALIZABLE;FEATURE_THREAD_PRIORITY</DefineConstants>
+    <DefineConstants>$(DefineConstants);FEATURE_THREAD_PRIORITY</DefineConstants>
     <DebugType>portable</DebugType>
   </PropertyGroup>
 
@@ -70,7 +70,7 @@
   </PropertyGroup>
 
   <PropertyGroup Condition=" '$(TargetFramework)' == 'net451' ">
-    <DefineConstants>$(DefineConstants);FEATURE_SERIALIZABLE;FEATURE_THREAD_PRIORITY</DefineConstants>
+    <DefineConstants>$(DefineConstants);FEATURE_SERIALIZABLE_EXCEPTIONS;FEATURE_THREAD_PRIORITY</DefineConstants>
     <DebugType>full</DebugType>
   </PropertyGroup>
 

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/71612621/src/Lucene.Net.Tests.Suggest/Support/TestExceptionSerialization.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Suggest/Support/TestExceptionSerialization.cs b/src/Lucene.Net.Tests.Suggest/Support/TestExceptionSerialization.cs
index eca1d90..3fbf209 100644
--- a/src/Lucene.Net.Tests.Suggest/Support/TestExceptionSerialization.cs
+++ b/src/Lucene.Net.Tests.Suggest/Support/TestExceptionSerialization.cs
@@ -1,4 +1,4 @@
-#if FEATURE_SERIALIZABLE
+#if FEATURE_SERIALIZABLE_EXCEPTIONS
 using Lucene.Net.Attributes;
 using NUnit.Framework;
 using System;

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/71612621/src/Lucene.Net.Tests/Lucene.Net.Tests.csproj
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/Lucene.Net.Tests.csproj b/src/Lucene.Net.Tests/Lucene.Net.Tests.csproj
index 7631a69..a5cab4f 100644
--- a/src/Lucene.Net.Tests/Lucene.Net.Tests.csproj
+++ b/src/Lucene.Net.Tests/Lucene.Net.Tests.csproj
@@ -79,7 +79,7 @@
   </ItemGroup>
 
   <PropertyGroup Condition=" '$(TargetFramework)' == 'net451' ">
-    <DefineConstants>$(DefineConstants);FEATURE_CONCURRENTMERGESCHEDULER;FEATURE_SERIALIZABLE</DefineConstants>
+    <DefineConstants>$(DefineConstants);FEATURE_CONCURRENTMERGESCHEDULER;FEATURE_SERIALIZABLE;FEATURE_SERIALIZABLE_EXCEPTIONS</DefineConstants>
     <DebugType>full</DebugType>
   </PropertyGroup>
 

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/71612621/src/Lucene.Net.Tests/Support/TestExceptionSerialization.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/Support/TestExceptionSerialization.cs b/src/Lucene.Net.Tests/Support/TestExceptionSerialization.cs
index 5283458..2c359b5 100644
--- a/src/Lucene.Net.Tests/Support/TestExceptionSerialization.cs
+++ b/src/Lucene.Net.Tests/Support/TestExceptionSerialization.cs
@@ -1,4 +1,4 @@
-#if FEATURE_SERIALIZABLE
+#if FEATURE_SERIALIZABLE_EXCEPTIONS
 using Lucene.Net.Attributes;
 using NUnit.Framework;
 using System;

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/71612621/src/Lucene.Net/Index/CorruptIndexException.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Index/CorruptIndexException.cs b/src/Lucene.Net/Index/CorruptIndexException.cs
index d4c1f58..30af147 100644
--- a/src/Lucene.Net/Index/CorruptIndexException.cs
+++ b/src/Lucene.Net/Index/CorruptIndexException.cs
@@ -1,6 +1,6 @@
 using System;
 using System.IO;
-#if FEATURE_SERIALIZABLE
+#if FEATURE_SERIALIZABLE_EXCEPTIONS
 using System.Runtime.Serialization;
 #endif
 
@@ -27,8 +27,9 @@ namespace Lucene.Net.Index
     /// This exception is thrown when Lucene detects
     /// an inconsistency in the index.
     /// </summary>
-    // LUCENENET: All exeption classes should be marked serializable
-#if FEATURE_SERIALIZABLE
+    // LUCENENET: It is no longer good practice to use binary serialization. 
+    // See: https://github.com/dotnet/corefx/issues/23584#issuecomment-325724568
+#if FEATURE_SERIALIZABLE_EXCEPTIONS
     [Serializable]
 #endif
     public class CorruptIndexException : IOException // LUCENENENET specific - made public instead of internal because there are public subclasses
@@ -47,7 +48,7 @@ namespace Lucene.Net.Index
         {
         }
 
-#if FEATURE_SERIALIZABLE
+#if FEATURE_SERIALIZABLE_EXCEPTIONS
         /// <summary>
         /// Initializes a new instance of this class with serialized data.
         /// </summary>

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/71612621/src/Lucene.Net/Index/IndexFormatTooNewException.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Index/IndexFormatTooNewException.cs b/src/Lucene.Net/Index/IndexFormatTooNewException.cs
index 486abcd..acb58a8 100644
--- a/src/Lucene.Net/Index/IndexFormatTooNewException.cs
+++ b/src/Lucene.Net/Index/IndexFormatTooNewException.cs
@@ -1,6 +1,6 @@
 using System;
 using System.Diagnostics;
-#if FEATURE_SERIALIZABLE
+#if FEATURE_SERIALIZABLE_EXCEPTIONS
 using System.Runtime.Serialization;
 #endif
 
@@ -29,8 +29,9 @@ namespace Lucene.Net.Index
     /// This exception is thrown when Lucene detects
     /// an index that is newer than this Lucene version.
     /// </summary>
-    // LUCENENET: All exeption classes should be marked serializable
-#if FEATURE_SERIALIZABLE
+    // LUCENENET: It is no longer good practice to use binary serialization. 
+    // See: https://github.com/dotnet/corefx/issues/23584#issuecomment-325724568
+#if FEATURE_SERIALIZABLE_EXCEPTIONS
     [Serializable]
 #endif
     public class IndexFormatTooNewException : CorruptIndexException
@@ -64,13 +65,13 @@ namespace Lucene.Net.Index
         {
         }
 
+#if FEATURE_SERIALIZABLE_EXCEPTIONS
         // For testing purposes
-        internal IndexFormatTooNewException(string message)
+        public IndexFormatTooNewException(string message)
             : base(message)
         {
         }
 
-#if FEATURE_SERIALIZABLE
         /// <summary>
         /// Initializes a new instance of this class with serialized data.
         /// </summary>

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/71612621/src/Lucene.Net/Index/IndexFormatTooOldException.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Index/IndexFormatTooOldException.cs b/src/Lucene.Net/Index/IndexFormatTooOldException.cs
index 58af882..8b8f942 100644
--- a/src/Lucene.Net/Index/IndexFormatTooOldException.cs
+++ b/src/Lucene.Net/Index/IndexFormatTooOldException.cs
@@ -1,6 +1,6 @@
 using System;
 using System.Diagnostics;
-#if FEATURE_SERIALIZABLE
+#if FEATURE_SERIALIZABLE_EXCEPTIONS
 using System.Runtime.Serialization;
 #endif
 
@@ -29,8 +29,9 @@ namespace Lucene.Net.Index
     /// This exception is thrown when Lucene detects
     /// an index that is too old for this Lucene version
     /// </summary>
-    // LUCENENET: All exeption classes should be marked serializable
-#if FEATURE_SERIALIZABLE
+    // LUCENENET: It is no longer good practice to use binary serialization. 
+    // See: https://github.com/dotnet/corefx/issues/23584#issuecomment-325724568
+#if FEATURE_SERIALIZABLE_EXCEPTIONS
     [Serializable]
 #endif
     public class IndexFormatTooOldException : CorruptIndexException
@@ -89,13 +90,13 @@ namespace Lucene.Net.Index
         {
         }
 
+#if FEATURE_SERIALIZABLE_EXCEPTIONS
         // For testing purposes
-        internal IndexFormatTooOldException(string message)
+        public IndexFormatTooOldException(string message)
             : base(message)
         {
         }
 
-#if FEATURE_SERIALIZABLE
         /// <summary>
         /// Initializes a new instance of this class with serialized data.
         /// </summary>

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/71612621/src/Lucene.Net/Index/IndexNotFoundException.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Index/IndexNotFoundException.cs b/src/Lucene.Net/Index/IndexNotFoundException.cs
index 221c6ca..487f16a 100644
--- a/src/Lucene.Net/Index/IndexNotFoundException.cs
+++ b/src/Lucene.Net/Index/IndexNotFoundException.cs
@@ -1,6 +1,6 @@
 using System;
 using System.IO;
-#if FEATURE_SERIALIZABLE
+#if FEATURE_SERIALIZABLE_EXCEPTIONS
 using System.Runtime.Serialization;
 #endif
 
@@ -27,8 +27,9 @@ namespace Lucene.Net.Index
     /// Signals that no index was found in the <see cref="Directory"/>. Possibly because the
     /// directory is empty, however can also indicate an index corruption.
     /// </summary>
-    // LUCENENET: All exeption classes should be marked serializable
-#if FEATURE_SERIALIZABLE
+    // LUCENENET: It is no longer good practice to use binary serialization. 
+    // See: https://github.com/dotnet/corefx/issues/23584#issuecomment-325724568
+#if FEATURE_SERIALIZABLE_EXCEPTIONS
     [Serializable]
 #endif
     public sealed class IndexNotFoundException : FileNotFoundException
@@ -37,12 +38,12 @@ namespace Lucene.Net.Index
         /// Creates <see cref="IndexNotFoundException"/> with the
         /// description message.
         /// </summary>
-        public IndexNotFoundException(string msg)
-            : base(msg)
+        public IndexNotFoundException(string message)
+            : base(message)
         {
         }
 
-#if FEATURE_SERIALIZABLE
+#if FEATURE_SERIALIZABLE_EXCEPTIONS
         /// <summary>
         /// Initializes a new instance of this class with serialized data.
         /// </summary>

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/71612621/src/Lucene.Net/Index/MergePolicy.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Index/MergePolicy.cs b/src/Lucene.Net/Index/MergePolicy.cs
index 0d59108..66c07f0 100644
--- a/src/Lucene.Net/Index/MergePolicy.cs
+++ b/src/Lucene.Net/Index/MergePolicy.cs
@@ -3,7 +3,7 @@ using Lucene.Net.Util;
 using System;
 using System.Collections.Generic;
 using System.Diagnostics;
-#if FEATURE_SERIALIZABLE
+#if FEATURE_SERIALIZABLE_EXCEPTIONS
 using System.Runtime.Serialization;
 #endif
 using System.Text;
@@ -473,8 +473,9 @@ namespace Lucene.Net.Index
         /// Exception thrown if there are any problems while
         /// executing a merge.
         /// </summary>
-        // LUCENENET: All exeption classes should be marked serializable
-#if FEATURE_SERIALIZABLE
+        // LUCENENET: It is no longer good practice to use binary serialization. 
+        // See: https://github.com/dotnet/corefx/issues/23584#issuecomment-325724568
+#if FEATURE_SERIALIZABLE_EXCEPTIONS
         [Serializable]
 #endif
         public class MergeException : Exception
@@ -497,13 +498,13 @@ namespace Lucene.Net.Index
                 this.dir = dir;
             }
 
+#if FEATURE_SERIALIZABLE_EXCEPTIONS
             // For testing purposes
-            internal MergeException(string message)
+            public MergeException(string message)
                 : base(message)
             {
             }
 
-#if FEATURE_SERIALIZABLE
             /// <summary>
             /// Initializes a new instance of this class with serialized data.
             /// </summary>
@@ -534,8 +535,9 @@ namespace Lucene.Net.Index
         /// <c>false</c>.  Normally this exception is
         /// privately caught and suppresed by <see cref="IndexWriter"/>.
         /// </summary>
-        // LUCENENET: All exeption classes should be marked serializable
-#if FEATURE_SERIALIZABLE
+        // LUCENENET: It is no longer good practice to use binary serialization. 
+        // See: https://github.com/dotnet/corefx/issues/23584#issuecomment-325724568
+#if FEATURE_SERIALIZABLE_EXCEPTIONS
         [Serializable]
 #endif
         public class MergeAbortedException : System.IO.IOException
@@ -556,7 +558,7 @@ namespace Lucene.Net.Index
             {
             }
 
-#if FEATURE_SERIALIZABLE
+#if FEATURE_SERIALIZABLE_EXCEPTIONS
             /// <summary>
             /// Initializes a new instance of this class with serialized data.
             /// </summary>

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/71612621/src/Lucene.Net/Index/TwoPhaseCommitTool.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Index/TwoPhaseCommitTool.cs b/src/Lucene.Net/Index/TwoPhaseCommitTool.cs
index 5739c2b..0eda03c 100644
--- a/src/Lucene.Net/Index/TwoPhaseCommitTool.cs
+++ b/src/Lucene.Net/Index/TwoPhaseCommitTool.cs
@@ -1,5 +1,5 @@
 using System;
-#if FEATURE_SERIALIZABLE
+#if FEATURE_SERIALIZABLE_EXCEPTIONS
 using System.Runtime.Serialization;
 #endif
 
@@ -40,8 +40,9 @@ namespace Lucene.Net.Index
         /// Thrown by <see cref="TwoPhaseCommitTool.Execute(ITwoPhaseCommit[])"/> when an
         /// object fails to <see cref="ITwoPhaseCommit.PrepareCommit()"/>.
         /// </summary>
-        // LUCENENET: All exeption classes should be marked serializable
-#if FEATURE_SERIALIZABLE
+        // LUCENENET: It is no longer good practice to use binary serialization. 
+        // See: https://github.com/dotnet/corefx/issues/23584#issuecomment-325724568
+#if FEATURE_SERIALIZABLE_EXCEPTIONS
         [Serializable]
 #endif
         public class PrepareCommitFailException
@@ -52,15 +53,15 @@ namespace Lucene.Net.Index
             public PrepareCommitFailException(Exception cause, ITwoPhaseCommit obj)
                 : base("prepareCommit() failed on " + obj, cause)
             {
-            }
+            }  
 
+#if FEATURE_SERIALIZABLE_EXCEPTIONS
             // For testing purposes
-            internal PrepareCommitFailException(string message)
+            public PrepareCommitFailException(string message)
                 : base(message)
             {
             }
 
-#if FEATURE_SERIALIZABLE
             /// <summary>
             /// Initializes a new instance of this class with serialized data.
             /// </summary>
@@ -77,8 +78,9 @@ namespace Lucene.Net.Index
         /// Thrown by <see cref="TwoPhaseCommitTool.Execute(ITwoPhaseCommit[])"/> when an
         /// object fails to <see cref="ITwoPhaseCommit.Commit()"/>.
         /// </summary>
-        // LUCENENET: All exeption classes should be marked serializable
-#if FEATURE_SERIALIZABLE
+        // LUCENENET: It is no longer good practice to use binary serialization. 
+        // See: https://github.com/dotnet/corefx/issues/23584#issuecomment-325724568
+#if FEATURE_SERIALIZABLE_EXCEPTIONS
         [Serializable]
 #endif
         public class CommitFailException : System.IO.IOException
@@ -90,13 +92,13 @@ namespace Lucene.Net.Index
             {
             }
 
+#if FEATURE_SERIALIZABLE_EXCEPTIONS
             // For testing purposes
-            internal CommitFailException(string message)
+            public CommitFailException(string message)
                 : base(message)
             {
             }
 
-#if FEATURE_SERIALIZABLE
             /// <summary>
             /// Initializes a new instance of this class with serialized data.
             /// </summary>

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/71612621/src/Lucene.Net/Lucene.Net.csproj
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Lucene.Net.csproj b/src/Lucene.Net/Lucene.Net.csproj
index 817ab25..ff7e6bc 100644
--- a/src/Lucene.Net/Lucene.Net.csproj
+++ b/src/Lucene.Net/Lucene.Net.csproj
@@ -68,7 +68,7 @@
   </ItemGroup>
 
   <PropertyGroup Condition=" '$(TargetFramework)' == 'netstandard2.0' ">
-    <DefineConstants>$(DefineConstants);NETSTANDARD;FEATURE_CLONEABLE;FEATURE_CONCURRENTMERGESCHEDULER;FEATURE_SERIALIZABLE;FEATURE_THREADPOOL_UNSAFEQUEUEWORKITEM;FEATURE_FILESTREAM_LOCK</DefineConstants>
+    <DefineConstants>$(DefineConstants);NETSTANDARD;FEATURE_CLONEABLE;FEATURE_CONCURRENTMERGESCHEDULER;FEATURE_THREADPOOL_UNSAFEQUEUEWORKITEM;FEATURE_FILESTREAM_LOCK;FEATURE_SERIALIZABLE</DefineConstants>
     <DebugType>portable</DebugType>
   </PropertyGroup>
   
@@ -78,7 +78,7 @@
   </PropertyGroup>
 
   <PropertyGroup Condition=" '$(TargetFramework)' == 'net451' ">
-    <DefineConstants>$(DefineConstants);FEATURE_CLONEABLE;FEATURE_CONCURRENTMERGESCHEDULER;FEATURE_SERIALIZABLE;FEATURE_THREADPOOL_UNSAFEQUEUEWORKITEM;FEATURE_FILESTREAM_LOCK</DefineConstants>
+    <DefineConstants>$(DefineConstants);FEATURE_CLONEABLE;FEATURE_CONCURRENTMERGESCHEDULER;FEATURE_THREADPOOL_UNSAFEQUEUEWORKITEM;FEATURE_FILESTREAM_LOCK;FEATURE_SERIALIZABLE;FEATURE_SERIALIZABLE_EXCEPTIONS</DefineConstants>
     <DebugType>full</DebugType>
   </PropertyGroup>
 

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/71612621/src/Lucene.Net/Search/BooleanQuery.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Search/BooleanQuery.cs b/src/Lucene.Net/Search/BooleanQuery.cs
index fd5e3cc..80ae085 100644
--- a/src/Lucene.Net/Search/BooleanQuery.cs
+++ b/src/Lucene.Net/Search/BooleanQuery.cs
@@ -3,7 +3,7 @@ using System;
 using System.Collections;
 using System.Collections.Generic;
 using System.Linq;
-#if FEATURE_SERIALIZABLE
+#if FEATURE_SERIALIZABLE_EXCEPTIONS
 using System.Runtime.Serialization;
 #endif
 using System.Text;
@@ -76,8 +76,9 @@ namespace Lucene.Net.Search
         /// a <see cref="PrefixQuery"/>, <see cref="FuzzyQuery"/>, <see cref="WildcardQuery"/>, or <see cref="TermRangeQuery"/>
         /// is expanded to many terms during search.
         /// </summary>
-        // LUCENENET: All exeption classes should be marked serializable
-#if FEATURE_SERIALIZABLE
+        // LUCENENET: It is no longer good practice to use binary serialization. 
+        // See: https://github.com/dotnet/corefx/issues/23584#issuecomment-325724568
+#if FEATURE_SERIALIZABLE_EXCEPTIONS
         [Serializable]
 #endif
         public class TooManyClausesException : Exception // LUCENENET specific - added Exception suffix
@@ -87,7 +88,7 @@ namespace Lucene.Net.Search
             {
             }
 
-#if FEATURE_SERIALIZABLE
+#if FEATURE_SERIALIZABLE_EXCEPTIONS
             /// <summary>
             /// Initializes a new instance of this class with serialized data.
             /// </summary>

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/71612621/src/Lucene.Net/Search/CollectionTerminatedException.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Search/CollectionTerminatedException.cs b/src/Lucene.Net/Search/CollectionTerminatedException.cs
index a03c181..292dccb 100644
--- a/src/Lucene.Net/Search/CollectionTerminatedException.cs
+++ b/src/Lucene.Net/Search/CollectionTerminatedException.cs
@@ -1,5 +1,5 @@
 using System;
-#if FEATURE_SERIALIZABLE
+#if FEATURE_SERIALIZABLE_EXCEPTIONS
 using System.Runtime.Serialization;
 #endif
 
@@ -30,8 +30,9 @@ namespace Lucene.Net.Search
     /// <see cref="IndexSearcher.Search(Weight, FieldDoc, int, Sort, bool, bool, bool)"/> as it is unnecessary and might hide misuse
     /// of this exception.
     /// </summary>
-    // LUCENENET: All exeption classes should be marked serializable
-#if FEATURE_SERIALIZABLE
+    // LUCENENET: It is no longer good practice to use binary serialization. 
+    // See: https://github.com/dotnet/corefx/issues/23584#issuecomment-325724568
+#if FEATURE_SERIALIZABLE_EXCEPTIONS
     [Serializable]
 #endif
     public sealed class CollectionTerminatedException : Exception
@@ -43,7 +44,7 @@ namespace Lucene.Net.Search
         {
         }
 
-#if FEATURE_SERIALIZABLE
+#if FEATURE_SERIALIZABLE_EXCEPTIONS
         /// <summary>
         /// Initializes a new instance of this class with serialized data.
         /// </summary>

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/71612621/src/Lucene.Net/Search/TimeLimitingCollector.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Search/TimeLimitingCollector.cs b/src/Lucene.Net/Search/TimeLimitingCollector.cs
index b050ffc..4044249 100644
--- a/src/Lucene.Net/Search/TimeLimitingCollector.cs
+++ b/src/Lucene.Net/Search/TimeLimitingCollector.cs
@@ -1,6 +1,6 @@
 using Lucene.Net.Support.Threading;
 using System;
-#if FEATURE_SERIALIZABLE
+#if FEATURE_SERIALIZABLE_EXCEPTIONS
 using System.Runtime.Serialization;
 #endif
 using System.Threading;
@@ -37,8 +37,9 @@ namespace Lucene.Net.Search
     {
         /// <summary>
         /// Thrown when elapsed search time exceeds allowed search time. </summary>
-        // LUCENENET: All exeption classes should be marked serializable
-#if FEATURE_SERIALIZABLE
+        // LUCENENET: It is no longer good practice to use binary serialization. 
+        // See: https://github.com/dotnet/corefx/issues/23584#issuecomment-325724568
+#if FEATURE_SERIALIZABLE_EXCEPTIONS
         [Serializable]
 #endif
         public class TimeExceededException : Exception
@@ -61,7 +62,7 @@ namespace Lucene.Net.Search
             {
             }
 
-#if FEATURE_SERIALIZABLE
+#if FEATURE_SERIALIZABLE_EXCEPTIONS
             /// <summary>
             /// Initializes a new instance of this class with serialized data.
             /// </summary>

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/71612621/src/Lucene.Net/Store/AlreadyClosedException.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Store/AlreadyClosedException.cs b/src/Lucene.Net/Store/AlreadyClosedException.cs
index 5488320..3e2f7e3 100644
--- a/src/Lucene.Net/Store/AlreadyClosedException.cs
+++ b/src/Lucene.Net/Store/AlreadyClosedException.cs
@@ -27,8 +27,9 @@
 //    /// this exception is thrown when there is an attempt to
 //    /// access something that has already been closed.
 //    /// </summary>
-//    // LUCENENET: All exeption classes should be marked serializable
-//#if FEATURE_SERIALIZABLE
+//    // LUCENENET: It is no longer good practice to use binary serialization. 
+//    // See: https://github.com/dotnet/corefx/issues/23584#issuecomment-325724568
+//#if FEATURE_SERIALIZABLE_EXCEPTIONS
 //    [Serializable]
 //#endif
 //    public class AlreadyClosedException : InvalidOperationException

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/71612621/src/Lucene.Net/Store/LockObtainFailedException.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Store/LockObtainFailedException.cs b/src/Lucene.Net/Store/LockObtainFailedException.cs
index 783c057..a7adac6 100644
--- a/src/Lucene.Net/Store/LockObtainFailedException.cs
+++ b/src/Lucene.Net/Store/LockObtainFailedException.cs
@@ -1,6 +1,6 @@
 using System;
 using System.IO;
-#if FEATURE_SERIALIZABLE
+#if FEATURE_SERIALIZABLE_EXCEPTIONS
 using System.Runtime.Serialization;
 #endif
 
@@ -29,8 +29,9 @@ namespace Lucene.Net.Store
     /// happens when a writer tries to open an index
     /// that another writer already has open. </summary>
     /// <seealso cref="Lock.Obtain(long)"/>
-    // LUCENENET: All exeption classes should be marked serializable
-#if FEATURE_SERIALIZABLE
+    // LUCENENET: It is no longer good practice to use binary serialization. 
+    // See: https://github.com/dotnet/corefx/issues/23584#issuecomment-325724568
+#if FEATURE_SERIALIZABLE_EXCEPTIONS
     [Serializable]
 #endif
     public class LockObtainFailedException : IOException
@@ -45,7 +46,7 @@ namespace Lucene.Net.Store
         {
         }
 
-#if FEATURE_SERIALIZABLE
+#if FEATURE_SERIALIZABLE_EXCEPTIONS
         /// <summary>
         /// Initializes a new instance of this class with serialized data.
         /// </summary>

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/71612621/src/Lucene.Net/Store/LockReleaseFailedException.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Store/LockReleaseFailedException.cs b/src/Lucene.Net/Store/LockReleaseFailedException.cs
index 12732a1..24b88e6 100644
--- a/src/Lucene.Net/Store/LockReleaseFailedException.cs
+++ b/src/Lucene.Net/Store/LockReleaseFailedException.cs
@@ -1,6 +1,6 @@
 using System;
 using System.IO;
-#if FEATURE_SERIALIZABLE
+#if FEATURE_SERIALIZABLE_EXCEPTIONS
 using System.Runtime.Serialization;
 #endif
 
@@ -27,8 +27,9 @@ namespace Lucene.Net.Store
     /// This exception is thrown when the <c>write.lock</c>
     /// could not be released. </summary>
     /// <seealso cref="Lock.Dispose()"/>
-    // LUCENENET: All exeption classes should be marked serializable
-#if FEATURE_SERIALIZABLE
+    // LUCENENET: It is no longer good practice to use binary serialization. 
+    // See: https://github.com/dotnet/corefx/issues/23584#issuecomment-325724568
+#if FEATURE_SERIALIZABLE_EXCEPTIONS
     [Serializable]
 #endif
     public class LockReleaseFailedException : IOException
@@ -38,7 +39,7 @@ namespace Lucene.Net.Store
         {
         }
 
-#if FEATURE_SERIALIZABLE
+#if FEATURE_SERIALIZABLE_EXCEPTIONS
         /// <summary>
         /// Initializes a new instance of this class with serialized data.
         /// </summary>

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/71612621/src/Lucene.Net/Store/NoSuchDirectoryException.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Store/NoSuchDirectoryException.cs b/src/Lucene.Net/Store/NoSuchDirectoryException.cs
index a75c4dc..699e9e9 100644
--- a/src/Lucene.Net/Store/NoSuchDirectoryException.cs
+++ b/src/Lucene.Net/Store/NoSuchDirectoryException.cs
@@ -28,8 +28,9 @@
 //    /// This exception is thrown when you try to list a
 //    /// non-existent directory.
 //    /// </summary>
-//    // LUCENENET: All exeption classes should be marked serializable
-//#if FEATURE_SERIALIZABLE
+//    // LUCENENET: It is no longer good practice to use binary serialization. 
+//    // See: https://github.com/dotnet/corefx/issues/23584#issuecomment-325724568
+//#if FEATURE_SERIALIZABLE_EXCEPTIONS
 //    [Serializable]
 //#endif
 //    public class NoSuchDirectoryException : FileNotFoundException

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/71612621/src/Lucene.Net/Support/C5.Support.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Support/C5.Support.cs b/src/Lucene.Net/Support/C5.Support.cs
index ab6600a..fc80bbc 100644
--- a/src/Lucene.Net/Support/C5.Support.cs
+++ b/src/Lucene.Net/Support/C5.Support.cs
@@ -22,7 +22,7 @@
 using System;
 using System.Linq;
 using System.Reflection;
-#if FEATURE_SERIALIZABLE
+#if FEATURE_SERIALIZABLE_EXCEPTIONS
 using System.Runtime.Serialization;
 #endif
 using SCG = System.Collections.Generic;
@@ -7090,14 +7090,16 @@ namespace Lucene.Net.Support.C5
     /// <summary>
     /// An exception to throw from library code when an internal inconsistency is encountered.
     /// </summary>
-#if FEATURE_SERIALIZABLE
+    // LUCENENET: It is no longer good practice to use binary serialization. 
+    // See: https://github.com/dotnet/corefx/issues/23584#issuecomment-325724568
+#if FEATURE_SERIALIZABLE_EXCEPTIONS
     [Serializable]
 #endif
     public class InternalException : Exception
     {
         internal InternalException(string message) : base(message) { }
 
-#if FEATURE_SERIALIZABLE
+#if FEATURE_SERIALIZABLE_EXCEPTIONS
         /// <summary>
         /// Initializes a new instance of this class with serialized data.
         /// </summary>
@@ -7116,7 +7118,9 @@ namespace Lucene.Net.Support.C5
     /// (method or set property) is called. No check is made to see if the update operation, 
     /// if allowed, would actually change the collection. </para>
     /// </summary>
-#if FEATURE_SERIALIZABLE
+    // LUCENENET: It is no longer good practice to use binary serialization. 
+    // See: https://github.com/dotnet/corefx/issues/23584#issuecomment-325724568
+#if FEATURE_SERIALIZABLE_EXCEPTIONS
     [Serializable]
 #endif
     public class ReadOnlyCollectionException : Exception
@@ -7130,7 +7134,7 @@ namespace Lucene.Net.Support.C5
         /// </summary>
         /// <param name="message"></param>
         public ReadOnlyCollectionException(string message) : base(message) { }
-#if FEATURE_SERIALIZABLE
+#if FEATURE_SERIALIZABLE_EXCEPTIONS
         /// <summary>
         /// Initializes a new instance of this class with serialized data.
         /// </summary>
@@ -7146,7 +7150,9 @@ namespace Lucene.Net.Support.C5
     /// <summary>
     /// 
     /// </summary>
-#if FEATURE_SERIALIZABLE
+    // LUCENENET: It is no longer good practice to use binary serialization. 
+    // See: https://github.com/dotnet/corefx/issues/23584#issuecomment-325724568
+#if FEATURE_SERIALIZABLE_EXCEPTIONS
     [Serializable]
 #endif
     public class FixedSizeCollectionException : Exception
@@ -7160,7 +7166,7 @@ namespace Lucene.Net.Support.C5
         /// </summary>
         /// <param name="message"></param>
         public FixedSizeCollectionException(string message) : base(message) { }
-#if FEATURE_SERIALIZABLE
+#if FEATURE_SERIALIZABLE_EXCEPTIONS
         /// <summary>
         /// Initializes a new instance of this class with serialized data.
         /// </summary>
@@ -7176,7 +7182,9 @@ namespace Lucene.Net.Support.C5
     /// <summary>
     /// 
     /// </summary>
-#if FEATURE_SERIALIZABLE
+    // LUCENENET: It is no longer good practice to use binary serialization. 
+    // See: https://github.com/dotnet/corefx/issues/23584#issuecomment-325724568
+#if FEATURE_SERIALIZABLE_EXCEPTIONS
     [Serializable]
 #endif
     public class UnlistenableEventException : Exception
@@ -7190,7 +7198,7 @@ namespace Lucene.Net.Support.C5
         /// </summary>
         /// <param name="message"></param>
         public UnlistenableEventException(string message) : base(message) { }
-#if FEATURE_SERIALIZABLE
+#if FEATURE_SERIALIZABLE_EXCEPTIONS
         /// <summary>
         /// Initializes a new instance of this class with serialized data.
         /// </summary>
@@ -7206,7 +7214,9 @@ namespace Lucene.Net.Support.C5
     /// <summary>
     /// An exception thrown by the MemorySafeEnumerator if the collection is enumerated by multiple threads concurrently
     /// </summary>
-#if FEATURE_SERIALIZABLE
+    // LUCENENET: It is no longer good practice to use binary serialization. 
+    // See: https://github.com/dotnet/corefx/issues/23584#issuecomment-325724568
+#if FEATURE_SERIALIZABLE_EXCEPTIONS
     [Serializable]
 #endif
     public class ConcurrentEnumerationException : Exception
@@ -7224,7 +7234,7 @@ namespace Lucene.Net.Support.C5
         /// <param name="message"></param>
         public ConcurrentEnumerationException(string message) : base(message) { }
 
-#if FEATURE_SERIALIZABLE
+#if FEATURE_SERIALIZABLE_EXCEPTIONS
         /// <summary>
         /// Initializes a new instance of this class with serialized data.
         /// </summary>
@@ -7240,7 +7250,9 @@ namespace Lucene.Net.Support.C5
     /// An exception thrown by the MemorySafeEnumerator if the collection is enumerated multiple times when the 
     /// memory mode is set to Strict 
     /// </summary>
-#if FEATURE_SERIALIZABLE
+    // LUCENENET: It is no longer good practice to use binary serialization. 
+    // See: https://github.com/dotnet/corefx/issues/23584#issuecomment-325724568
+#if FEATURE_SERIALIZABLE_EXCEPTIONS
     [Serializable]
 #endif
     public class MultipleEnumerationException : Exception
@@ -7258,7 +7270,7 @@ namespace Lucene.Net.Support.C5
         /// <param name="message"></param>
         public MultipleEnumerationException(string message) : base(message) { }
 
-#if FEATURE_SERIALIZABLE
+#if FEATURE_SERIALIZABLE_EXCEPTIONS
         /// <summary>
         /// Initializes a new instance of this class with serialized data.
         /// </summary>
@@ -7274,7 +7286,9 @@ namespace Lucene.Net.Support.C5
     /// An exception thrown by enumerators, range views etc. when accessed after 
     /// the underlying collection has been modified.
     /// </summary>
-#if FEATURE_SERIALIZABLE
+    // LUCENENET: It is no longer good practice to use binary serialization. 
+    // See: https://github.com/dotnet/corefx/issues/23584#issuecomment-325724568
+#if FEATURE_SERIALIZABLE_EXCEPTIONS
     [Serializable]
 #endif
     public class CollectionModifiedException : Exception
@@ -7288,7 +7302,7 @@ namespace Lucene.Net.Support.C5
         /// </summary>
         /// <param name="message"></param>
         public CollectionModifiedException(string message) : base(message) { }
-#if FEATURE_SERIALIZABLE
+#if FEATURE_SERIALIZABLE_EXCEPTIONS
         /// <summary>
         /// Initializes a new instance of this class with serialized data.
         /// </summary>
@@ -7310,7 +7324,9 @@ namespace Lucene.Net.Support.C5
     /// Sort, Reverse or Shuffle on some other, overlapping view or the whole list.
     /// </para>
     /// </summary>
-#if FEATURE_SERIALIZABLE
+    // LUCENENET: It is no longer good practice to use binary serialization. 
+    // See: https://github.com/dotnet/corefx/issues/23584#issuecomment-325724568
+#if FEATURE_SERIALIZABLE_EXCEPTIONS
     [Serializable]
 #endif
     public class ViewDisposedException : Exception
@@ -7324,7 +7340,7 @@ namespace Lucene.Net.Support.C5
         /// </summary>
         /// <param name="message"></param>
         public ViewDisposedException(string message) : base(message) { }
-#if FEATURE_SERIALIZABLE
+#if FEATURE_SERIALIZABLE_EXCEPTIONS
         /// <summary>
         /// Initializes a new instance of this class with serialized data.
         /// </summary>
@@ -7343,7 +7359,9 @@ namespace Lucene.Net.Support.C5
     /// <para>The typical scenario is a lookup by key in a dictionary with an indexer,
     /// see e.g. <see cref="P:C5.IDictionary`2.Item(`0)"/></para>
     /// </summary>
-#if FEATURE_SERIALIZABLE
+    // LUCENENET: It is no longer good practice to use binary serialization. 
+    // See: https://github.com/dotnet/corefx/issues/23584#issuecomment-325724568
+#if FEATURE_SERIALIZABLE_EXCEPTIONS
     [Serializable]
 #endif
     public class NoSuchItemException : Exception
@@ -7357,7 +7375,7 @@ namespace Lucene.Net.Support.C5
         /// </summary>
         /// <param name="message"></param>
         public NoSuchItemException(string message) : base(message) { }
-#if FEATURE_SERIALIZABLE
+#if FEATURE_SERIALIZABLE_EXCEPTIONS
         /// <summary>
         /// Initializes a new instance of this class with serialized data.
         /// </summary>
@@ -7374,7 +7392,9 @@ namespace Lucene.Net.Support.C5
     /// An exception thrown by an operation on a list (<see cref="T:C5.IList`1"/>)
     /// that only makes sense for a view, not for an underlying list.
     /// </summary>
-#if FEATURE_SERIALIZABLE
+    // LUCENENET: It is no longer good practice to use binary serialization. 
+    // See: https://github.com/dotnet/corefx/issues/23584#issuecomment-325724568
+#if FEATURE_SERIALIZABLE_EXCEPTIONS
     [Serializable]
 #endif
     public class NotAViewException : Exception
@@ -7388,7 +7408,7 @@ namespace Lucene.Net.Support.C5
         /// </summary>
         /// <param name="message"></param>
         public NotAViewException(string message) : base(message) { }
-#if FEATURE_SERIALIZABLE
+#if FEATURE_SERIALIZABLE_EXCEPTIONS
         /// <summary>
         /// Initializes a new instance of this class with serialized data.
         /// </summary>
@@ -7409,7 +7429,9 @@ namespace Lucene.Net.Support.C5
     /// </para>
     /// <para>With dictionaries this can happen with the <see cref="M:C5.IDictionary`2.Add(`0,`1)"/> metod.</para>
     /// </summary>
-#if FEATURE_SERIALIZABLE
+    // LUCENENET: It is no longer good practice to use binary serialization. 
+    // See: https://github.com/dotnet/corefx/issues/23584#issuecomment-325724568
+#if FEATURE_SERIALIZABLE_EXCEPTIONS
     [Serializable]
 #endif
     public class DuplicateNotAllowedException : Exception
@@ -7423,7 +7445,7 @@ namespace Lucene.Net.Support.C5
         /// </summary>
         /// <param name="message"></param>
         public DuplicateNotAllowedException(string message) : base(message) { }
-#if FEATURE_SERIALIZABLE
+#if FEATURE_SERIALIZABLE_EXCEPTIONS
         /// <summary>
         /// Initializes a new instance of this class with serialized data.
         /// </summary>
@@ -7439,7 +7461,9 @@ namespace Lucene.Net.Support.C5
     /// <summary>
     /// 
     /// </summary>
-#if FEATURE_SERIALIZABLE
+    // LUCENENET: It is no longer good practice to use binary serialization. 
+    // See: https://github.com/dotnet/corefx/issues/23584#issuecomment-325724568
+#if FEATURE_SERIALIZABLE_EXCEPTIONS
     [Serializable]
 #endif
     public class InvalidPriorityQueueHandleException : Exception
@@ -7453,7 +7477,7 @@ namespace Lucene.Net.Support.C5
         /// </summary>
         /// <param name="message"></param>
         public InvalidPriorityQueueHandleException(string message) : base(message) { }
-#if FEATURE_SERIALIZABLE
+#if FEATURE_SERIALIZABLE_EXCEPTIONS
         /// <summary>
         /// Initializes a new instance of this class with serialized data.
         /// </summary>
@@ -7470,7 +7494,9 @@ namespace Lucene.Net.Support.C5
     /// An exception thrown by an operation that need to construct a natural
     /// comparer for a type.
     /// </summary>
-#if FEATURE_SERIALIZABLE
+    // LUCENENET: It is no longer good practice to use binary serialization. 
+    // See: https://github.com/dotnet/corefx/issues/23584#issuecomment-325724568
+#if FEATURE_SERIALIZABLE_EXCEPTIONS
     [Serializable]
 #endif
     public class NotComparableException : Exception
@@ -7484,7 +7510,7 @@ namespace Lucene.Net.Support.C5
         /// </summary>
         /// <param name="message"></param>
         public NotComparableException(string message) : base(message) { }
-#if FEATURE_SERIALIZABLE
+#if FEATURE_SERIALIZABLE_EXCEPTIONS
         /// <summary>
         /// Initializes a new instance of this class with serialized data.
         /// </summary>
@@ -7501,7 +7527,9 @@ namespace Lucene.Net.Support.C5
     /// An exception thrown by operations on a list that expects an argument
     /// that is a view on the same underlying list.
     /// </summary>
-#if FEATURE_SERIALIZABLE
+    // LUCENENET: It is no longer good practice to use binary serialization. 
+    // See: https://github.com/dotnet/corefx/issues/23584#issuecomment-325724568
+#if FEATURE_SERIALIZABLE_EXCEPTIONS
     [Serializable]
 #endif
     public class IncompatibleViewException : Exception
@@ -7515,7 +7543,7 @@ namespace Lucene.Net.Support.C5
         /// </summary>
         /// <param name="message"></param>
         public IncompatibleViewException(string message) : base(message) { }
-#if FEATURE_SERIALIZABLE
+#if FEATURE_SERIALIZABLE_EXCEPTIONS
         /// <summary>
         /// Initializes a new instance of this class with serialized data.
         /// </summary>

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/71612621/src/Lucene.Net/Support/IO/BufferExceptions.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Support/IO/BufferExceptions.cs b/src/Lucene.Net/Support/IO/BufferExceptions.cs
index debc708..e8014f8 100644
--- a/src/Lucene.Net/Support/IO/BufferExceptions.cs
+++ b/src/Lucene.Net/Support/IO/BufferExceptions.cs
@@ -2,7 +2,7 @@
 // https://svn.apache.org/repos/asf/harmony/enhanced/java/trunk/
 
 using System;
-#if FEATURE_SERIALIZABLE
+#if FEATURE_SERIALIZABLE_EXCEPTIONS
 using System.Runtime.Serialization;
 #endif
 
@@ -25,16 +25,18 @@ namespace Lucene.Net.Support.IO
 	 * limitations under the License.
 	 */
 
-#if FEATURE_SERIALIZABLE
+    // LUCENENET: It is no longer good practice to use binary serialization. 
+    // See: https://github.com/dotnet/corefx/issues/23584#issuecomment-325724568
+#if FEATURE_SERIALIZABLE_EXCEPTIONS
     [Serializable]
 #endif
-    internal sealed class BufferUnderflowException : Exception
+    public sealed class BufferUnderflowException : Exception
     {
         public BufferUnderflowException()
         {
         }
 
-#if FEATURE_SERIALIZABLE
+#if FEATURE_SERIALIZABLE_EXCEPTIONS
         /// <summary>
         /// Initializes a new instance of this class with serialized data.
         /// </summary>
@@ -47,16 +49,18 @@ namespace Lucene.Net.Support.IO
 #endif
     }
 
-#if FEATURE_SERIALIZABLE
+    // LUCENENET: It is no longer good practice to use binary serialization. 
+    // See: https://github.com/dotnet/corefx/issues/23584#issuecomment-325724568
+#if FEATURE_SERIALIZABLE_EXCEPTIONS
     [Serializable]
 #endif
-    internal sealed class BufferOverflowException : Exception
+    public sealed class BufferOverflowException : Exception
     {
         public BufferOverflowException()
         {
         }
 
-#if FEATURE_SERIALIZABLE
+#if FEATURE_SERIALIZABLE_EXCEPTIONS
         /// <summary>
         /// Initializes a new instance of this class with serialized data.
         /// </summary>
@@ -69,16 +73,18 @@ namespace Lucene.Net.Support.IO
 #endif
     }
 
-#if FEATURE_SERIALIZABLE
+    // LUCENENET: It is no longer good practice to use binary serialization. 
+    // See: https://github.com/dotnet/corefx/issues/23584#issuecomment-325724568
+#if FEATURE_SERIALIZABLE_EXCEPTIONS
     [Serializable]
 #endif
-    internal sealed class ReadOnlyBufferException : /*NotSupported*/ Exception
+    public sealed class ReadOnlyBufferException : /*NotSupported*/ Exception
     {
         public ReadOnlyBufferException()
         {
         }
 
-#if FEATURE_SERIALIZABLE
+#if FEATURE_SERIALIZABLE_EXCEPTIONS
         /// <summary>
         /// Initializes a new instance of this class with serialized data.
         /// </summary>
@@ -91,16 +97,18 @@ namespace Lucene.Net.Support.IO
 #endif
     }
 
-#if FEATURE_SERIALIZABLE
+    // LUCENENET: It is no longer good practice to use binary serialization. 
+    // See: https://github.com/dotnet/corefx/issues/23584#issuecomment-325724568
+#if FEATURE_SERIALIZABLE_EXCEPTIONS
     [Serializable]
 #endif
-    internal sealed class InvalidMarkException : Exception
+    public sealed class InvalidMarkException : Exception
     {
         public InvalidMarkException()
         {
         }
 
-#if FEATURE_SERIALIZABLE
+#if FEATURE_SERIALIZABLE_EXCEPTIONS
         /// <summary>
         /// Initializes a new instance of this class with serialized data.
         /// </summary>

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/71612621/src/Lucene.Net/Util/BytesRefHash.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Util/BytesRefHash.cs b/src/Lucene.Net/Util/BytesRefHash.cs
index 4ad61d6..d312bc6 100644
--- a/src/Lucene.Net/Util/BytesRefHash.cs
+++ b/src/Lucene.Net/Util/BytesRefHash.cs
@@ -2,7 +2,7 @@ using Lucene.Net.Support;
 using System;
 using System.Collections.Generic;
 using System.Diagnostics;
-#if FEATURE_SERIALIZABLE
+#if FEATURE_SERIALIZABLE_EXCEPTIONS
 using System.Runtime.Serialization;
 #endif
 
@@ -558,9 +558,10 @@ namespace Lucene.Net.Util
         /// Thrown if a <see cref="BytesRef"/> exceeds the <see cref="BytesRefHash"/> limit of
         /// <see cref="ByteBlockPool.BYTE_BLOCK_SIZE"/>-2.
         /// </summary>
-        // LUCENENET: All exeption classes should be marked serializable
-#if FEATURE_SERIALIZABLE
-        [Serializable]
+        // LUCENENET: It is no longer good practice to use binary serialization. 
+        // See: https://github.com/dotnet/corefx/issues/23584#issuecomment-325724568
+#if FEATURE_SERIALIZABLE_EXCEPTIONS
+    [Serializable]
 #endif
         public class MaxBytesLengthExceededException : Exception
         {
@@ -569,7 +570,7 @@ namespace Lucene.Net.Util
             {
             }
 
-#if FEATURE_SERIALIZABLE
+#if FEATURE_SERIALIZABLE_EXCEPTIONS
             /// <summary>
             /// Initializes a new instance of this class with serialized data.
             /// </summary>

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/71612621/src/Lucene.Net/Util/SetOnce.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Util/SetOnce.cs b/src/Lucene.Net/Util/SetOnce.cs
index cc74d54..d05cf63 100644
--- a/src/Lucene.Net/Util/SetOnce.cs
+++ b/src/Lucene.Net/Util/SetOnce.cs
@@ -1,6 +1,6 @@
 using Lucene.Net.Support;
 using System;
-#if FEATURE_SERIALIZABLE
+#if FEATURE_SERIALIZABLE_EXCEPTIONS
 using System.Runtime.Serialization;
 #endif
 
@@ -90,8 +90,9 @@ namespace Lucene.Net.Util
     /// Thrown when <see cref="SetOnce{T}.Set(T)"/> is called more than once. </summary>
     // LUCENENET specific - de-nested the class from SetOnce<T> to allow the test
     // framework to serialize it without the generic type.
-    // LUCENENET: All exeption classes should be marked serializable
-#if FEATURE_SERIALIZABLE
+    // LUCENENET: It is no longer good practice to use binary serialization. 
+    // See: https://github.com/dotnet/corefx/issues/23584#issuecomment-325724568
+#if FEATURE_SERIALIZABLE_EXCEPTIONS
     [Serializable]
 #endif
     public sealed class AlreadySetException : InvalidOperationException
@@ -104,7 +105,7 @@ namespace Lucene.Net.Util
         {
         }
 
-#if FEATURE_SERIALIZABLE
+#if FEATURE_SERIALIZABLE_EXCEPTIONS
         /// <summary>
         /// Initializes a new instance of this class with serialized data.
         /// </summary>

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/71612621/src/dotnet/Lucene.Net.ICU/Lucene.Net.ICU.csproj
----------------------------------------------------------------------
diff --git a/src/dotnet/Lucene.Net.ICU/Lucene.Net.ICU.csproj b/src/dotnet/Lucene.Net.ICU/Lucene.Net.ICU.csproj
index cc3480b..813782d 100644
--- a/src/dotnet/Lucene.Net.ICU/Lucene.Net.ICU.csproj
+++ b/src/dotnet/Lucene.Net.ICU/Lucene.Net.ICU.csproj
@@ -83,7 +83,7 @@
   </ItemGroup>
 
   <PropertyGroup Condition=" '$(TargetFramework)' == 'netstandard2.0' ">
-    <DefineConstants>$(DefineConstants);NETSTANDARD;FEATURE_SERIALIZABLE</DefineConstants>
+    <DefineConstants>$(DefineConstants);NETSTANDARD</DefineConstants>
     <DebugType>portable</DebugType>
   </PropertyGroup>
 
@@ -98,7 +98,6 @@
   </PropertyGroup>
 
   <PropertyGroup Condition=" '$(TargetFramework)' == 'net451' ">
-    <DefineConstants>$(DefineConstants);FEATURE_SERIALIZABLE</DefineConstants>
     <DebugType>full</DebugType>
   </PropertyGroup>
 

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/71612621/src/dotnet/Lucene.Net.Replicator.AspNetCore/Lucene.Net.Replicator.AspNetCore.csproj
----------------------------------------------------------------------
diff --git a/src/dotnet/Lucene.Net.Replicator.AspNetCore/Lucene.Net.Replicator.AspNetCore.csproj b/src/dotnet/Lucene.Net.Replicator.AspNetCore/Lucene.Net.Replicator.AspNetCore.csproj
index 6697165..0b0e8d8 100644
--- a/src/dotnet/Lucene.Net.Replicator.AspNetCore/Lucene.Net.Replicator.AspNetCore.csproj
+++ b/src/dotnet/Lucene.Net.Replicator.AspNetCore/Lucene.Net.Replicator.AspNetCore.csproj
@@ -35,13 +35,15 @@
     <PackageReference Include="Microsoft.AspNetCore.Http.Abstractions" Version="1.0.3" />
   </ItemGroup>
 
+  <!--<PropertyGroup Condition=" '$(TargetFramework)' == 'netstandard2.0' ">
+    <DebugType>portable</DebugType>
+  </PropertyGroup>-->
+
   <PropertyGroup Condition=" '$(TargetFramework)' == 'netstandard1.5' ">
-    <DefineConstants>$(DefineConstants);NETSTANDARD</DefineConstants>
     <DebugType>portable</DebugType>
   </PropertyGroup>
 
   <PropertyGroup Condition=" '$(TargetFramework)' == 'net451' ">
-    <DefineConstants>$(DefineConstants);FEATURE_SERIALIZABLE</DefineConstants>
     <DebugType>full</DebugType>
   </PropertyGroup>
 

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/71612621/src/dotnet/Lucene.Net.Tests.ICU/Lucene.Net.Tests.ICU.csproj
----------------------------------------------------------------------
diff --git a/src/dotnet/Lucene.Net.Tests.ICU/Lucene.Net.Tests.ICU.csproj b/src/dotnet/Lucene.Net.Tests.ICU/Lucene.Net.Tests.ICU.csproj
index 3b8c4df..32c4e86 100644
--- a/src/dotnet/Lucene.Net.Tests.ICU/Lucene.Net.Tests.ICU.csproj
+++ b/src/dotnet/Lucene.Net.Tests.ICU/Lucene.Net.Tests.ICU.csproj
@@ -82,7 +82,7 @@
   </ItemGroup>
 
   <PropertyGroup Condition=" '$(TargetFramework)' == 'netcoreapp2.0' ">
-    <DefineConstants>$(DefineConstants);NETSTANDARD;FEATURE_SERIALIZABLE</DefineConstants>
+    <DefineConstants>$(DefineConstants);NETSTANDARD</DefineConstants>
     <DebugType>portable</DebugType>
   </PropertyGroup>
 
@@ -92,7 +92,7 @@
   </PropertyGroup>
 
   <PropertyGroup Condition=" '$(TargetFramework)' == 'net451' ">
-    <DefineConstants>$(DefineConstants);FEATURE_SERIALIZABLE</DefineConstants>
+    <DefineConstants>$(DefineConstants);FEATURE_SERIALIZABLE_EXCEPTIONS</DefineConstants>
     <DebugType>full</DebugType>
   </PropertyGroup>
 

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/71612621/src/dotnet/Lucene.Net.Tests.ICU/Support/TestExceptionSerialization.cs
----------------------------------------------------------------------
diff --git a/src/dotnet/Lucene.Net.Tests.ICU/Support/TestExceptionSerialization.cs b/src/dotnet/Lucene.Net.Tests.ICU/Support/TestExceptionSerialization.cs
index ad84905..4a11185 100644
--- a/src/dotnet/Lucene.Net.Tests.ICU/Support/TestExceptionSerialization.cs
+++ b/src/dotnet/Lucene.Net.Tests.ICU/Support/TestExceptionSerialization.cs
@@ -1,4 +1,4 @@
-#if FEATURE_SERIALIZABLE
+#if FEATURE_SERIALIZABLE_EXCEPTIONS
 using Lucene.Net.Attributes;
 using NUnit.Framework;
 using System;


Mime
View raw message