diff --git a/src/Microsoft.Data.SqlClient/netcore/src/Microsoft.Data.SqlClient.csproj b/src/Microsoft.Data.SqlClient/netcore/src/Microsoft.Data.SqlClient.csproj
index c4020a797d..9feb08e1ae 100644
--- a/src/Microsoft.Data.SqlClient/netcore/src/Microsoft.Data.SqlClient.csproj
+++ b/src/Microsoft.Data.SqlClient/netcore/src/Microsoft.Data.SqlClient.csproj
@@ -851,6 +851,9 @@
Microsoft\Data\SqlClient\PacketHandle.netcore.Windows.cs
+
+ Microsoft\Data\SqlClient\SessionHandle.netcore.Windows.cs
+
Microsoft\Data\SqlClient\SqlColumnEncryptionCngProvider.Windows.cs
@@ -870,7 +873,6 @@
Microsoft\Data\SqlTypes\SqlFileStream.Windows.cs
-
@@ -891,9 +893,11 @@
Microsoft\Data\SqlClient\PacketHandle.netcore.Unix.cs
+
+ Microsoft\Data\SqlClient\SessionHandle.netcore.Unix.cs
+
-
diff --git a/src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/SessionHandle.Unix.cs b/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SessionHandle.netcore.Unix.cs
similarity index 98%
rename from src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/SessionHandle.Unix.cs
rename to src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SessionHandle.netcore.Unix.cs
index 1ba0deafea..72dc26f8f9 100644
--- a/src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/SessionHandle.Unix.cs
+++ b/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SessionHandle.netcore.Unix.cs
@@ -2,6 +2,8 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
+#if NET
+
namespace Microsoft.Data.SqlClient
{
// this structure is used for transporting packet handle references between the TdsParserStateObject
@@ -31,3 +33,5 @@ public SessionHandle(SNI.SNIHandle managedHandle, int type)
public static SessionHandle FromManagedSession(SNI.SNIHandle managedSessionHandle) => new SessionHandle(managedSessionHandle, ManagedHandleType);
}
}
+
+#endif
diff --git a/src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/SessionHandle.Windows.cs b/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SessionHandle.netcore.Windows.cs
similarity index 98%
rename from src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/SessionHandle.Windows.cs
rename to src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SessionHandle.netcore.Windows.cs
index 3783256cc0..015395bd6f 100644
--- a/src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/SessionHandle.Windows.cs
+++ b/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SessionHandle.netcore.Windows.cs
@@ -2,6 +2,8 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
+#if NET
+
namespace Microsoft.Data.SqlClient
{
// this structure is used for transporting packet handle references between the TdsParserStateObject
@@ -36,3 +38,5 @@ public SessionHandle(SNI.SNIHandle managedHandle, SNIHandle nativeHandle, int ty
public static SessionHandle FromNativeHandle(SNIHandle nativeSessionHandle) => new SessionHandle(default, nativeSessionHandle, NativeHandleType);
}
}
+
+#endif