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 da5a2d1062..c0f4fe4e4d 100644
--- a/src/Microsoft.Data.SqlClient/netcore/src/Microsoft.Data.SqlClient.csproj
+++ b/src/Microsoft.Data.SqlClient/netcore/src/Microsoft.Data.SqlClient.csproj
@@ -505,9 +505,6 @@
-
- Microsoft\Data\SqlClient\AlwaysEncryptedAttestationException.cs
-
Microsoft\Data\SqlClient\AlwaysEncryptedEnclaveProviderUtils.cs
diff --git a/src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/SqlCommand.cs b/src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/SqlCommand.cs
index 93792a7b62..61b061610f 100644
--- a/src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/SqlCommand.cs
+++ b/src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/SqlCommand.cs
@@ -2015,10 +2015,9 @@ protected override DbDataReader ExecuteDbDataReader(CommandBehavior behavior)
}
catch (Exception ex)
{
- if (ex is SqlException)
+ if (ex is SqlException sqlException)
{
- SqlException exception = (SqlException)ex;
- sqlExceptionNumber = exception.Number;
+ sqlExceptionNumber = sqlException.Number;
}
e = ex;
diff --git a/src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/SqlUtil.cs b/src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/SqlUtil.cs
index 8e9039a6aa..6c9247b9ef 100644
--- a/src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/SqlUtil.cs
+++ b/src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/SqlUtil.cs
@@ -185,7 +185,7 @@ internal static void ContinueTaskWithState(Task task,
completion.SetException(e);
}
}
- },
+ },
state: state,
scheduler: TaskScheduler.Default
);
@@ -228,7 +228,7 @@ internal static void SetTimeoutException(TaskCompletionSource