Fix all configurations build break on SqlClient (dotnet/corefx#42548)
authorSantiago Fernandez Madero <safern@microsoft.com>
Tue, 12 Nov 2019 03:41:12 +0000 (19:41 -0800)
committerDavid Shulman <david.shulman@microsoft.com>
Tue, 12 Nov 2019 03:41:12 +0000 (19:41 -0800)
Commit migrated from https://github.com/dotnet/corefx/commit/63c85b9de80d101262be231ec9c33a915b2013c4

src/libraries/Common/src/System/Net/Security/NegotiateStreamPal.Unix.cs

index 948ae79..bec9e8f 100644 (file)
@@ -263,7 +263,11 @@ namespace System.Net.Security
                     tokenBytes = tokenBytes.Slice(0, length - 1);
                 }
 
+#if NETSTANDARD2_0
+                return Encoding.UTF8.GetString(tokenBytes.ToArray(), 0, tokenBytes.Length);
+#else
                 return Encoding.UTF8.GetString(tokenBytes);
+#endif
             }
             finally
             {