diff --git a/SIL.WritingSystems.Tests/SIL.WritingSystems.Tests.csproj b/SIL.WritingSystems.Tests/SIL.WritingSystems.Tests.csproj
index b143dcd73..b30da6476 100644
--- a/SIL.WritingSystems.Tests/SIL.WritingSystems.Tests.csproj
+++ b/SIL.WritingSystems.Tests/SIL.WritingSystems.Tests.csproj
@@ -16,7 +16,7 @@
-
+
diff --git a/SIL.WritingSystems/IcuRulesCollator.cs b/SIL.WritingSystems/IcuRulesCollator.cs
index d3b4a7147..fd6fac7ea 100644
--- a/SIL.WritingSystems/IcuRulesCollator.cs
+++ b/SIL.WritingSystems/IcuRulesCollator.cs
@@ -62,37 +62,7 @@ public static bool ValidateSortRules(string rules, out string message)
public SortKey GetSortKey(string source)
{
-#if NET461
return _collator.GetSortKey(source);
-#elif NETSTANDARD2_0
- Icu.SortKey icuSortKey = _collator.GetSortKey(source);
- SortKey sortKey = CultureInfo.InvariantCulture.CompareInfo.GetSortKey(string.Empty, CompareOptions.None);
- string keyDataFieldName, origStringFieldName;
- if (Platform.IsDotNetFramework)
- {
- keyDataFieldName = "m_KeyData";
- origStringFieldName = "m_String";
- }
- else if (Platform.IsDotNetCore)
- {
- keyDataFieldName = "_keyData";
- origStringFieldName = "_string";
- }
- else if (Platform.IsMono)
- {
- keyDataFieldName = "key";
- origStringFieldName = "source";
- }
- else
- {
- throw new PlatformNotSupportedException();
- }
-
- SetInternalFieldForPublicProperty(sortKey, "SortKey.KeyData", keyDataFieldName, icuSortKey.KeyData);
- SetInternalFieldForPublicProperty(sortKey, "SortKey.OriginalString", origStringFieldName,
- icuSortKey.OriginalString);
- return sortKey;
-#endif
}
///Compares two strings and returns a value indicating whether one is less than,
@@ -114,24 +84,5 @@ public int Compare(object x, object y)
{
return Compare((string) x, (string) y);
}
-
-#if NETSTANDARD2_0
- private static void SetInternalFieldForPublicProperty(object instance, string propertyName, string fieldName,
- object value)
- {
- Type type = instance.GetType();
-
- FieldInfo fieldInfo = type.GetField(fieldName, BindingFlags.Instance | BindingFlags.NonPublic);
-
- Debug.Assert(fieldInfo != null,
- "Unsupported runtime",
- "Could not figure out an internal field for" + propertyName);
-
- if (fieldInfo == null)
- throw new PlatformNotSupportedException();
-
- fieldInfo.SetValue(instance, value);
- }
-#endif
}
}
diff --git a/SIL.WritingSystems/SIL.WritingSystems.csproj b/SIL.WritingSystems/SIL.WritingSystems.csproj
index ca4f1b81b..65d4698fd 100644
--- a/SIL.WritingSystems/SIL.WritingSystems.csproj
+++ b/SIL.WritingSystems/SIL.WritingSystems.csproj
@@ -12,7 +12,7 @@
-
+