diff --git a/.github/composite-actions/install-and-run-dotnet/action.yml b/.github/composite-actions/install-and-run-dotnet/action.yml
index bfd0aad508..63784689e4 100644
--- a/.github/composite-actions/install-and-run-dotnet/action.yml
+++ b/.github/composite-actions/install-and-run-dotnet/action.yml
@@ -24,9 +24,9 @@ runs:
sudo dpkg -i packages-microsoft-prod.deb
rm packages-microsoft-prod.deb
sudo apt-get install -y apt-transport-https
- sudo apt-get install -y dotnet-sdk-5.0
+ sudo apt-get install -y dotnet-sdk-8.0
sudo apt-get install -y apt-transport-https
- sudo apt-get install -y aspnetcore-runtime-5.0
+ sudo apt-get install -y aspnetcore-runtime-8.0
shell: bash
- name: Run Dotnet Tests
diff --git a/test/dotnet/config.txt b/test/dotnet/config.txt
index 54140048bc..7c1f5eddc8 100644
--- a/test/dotnet/config.txt
+++ b/test/dotnet/config.txt
@@ -11,6 +11,7 @@ bcpPath=/usr/local/bin/bcp
runInParallel = false
printToConsole = true
+runInRegression = true
driver = sql
provider = SQL NATIVE CLIENT
diff --git a/test/dotnet/dotnet.csproj b/test/dotnet/dotnet.csproj
index a45cff35d1..6430c5c02c 100644
--- a/test/dotnet/dotnet.csproj
+++ b/test/dotnet/dotnet.csproj
@@ -2,26 +2,26 @@
Exe
- net7.0
+ net8.0
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
all
runtime; build; native; contentfiles; analyzers; buildtransitive
-
+
runtime; build; native; contentfiles; analyzers; buildtransitive
all
-
+
diff --git a/test/dotnet/src/BatchRun.cs b/test/dotnet/src/BatchRun.cs
index 82e58b7869..767ff93f66 100644
--- a/test/dotnet/src/BatchRun.cs
+++ b/test/dotnet/src/BatchRun.cs
@@ -2,7 +2,7 @@
using System.Collections.Generic;
using System.Data;
using System.Data.Common;
-using System.Data.SqlClient;
+using Microsoft.Data.SqlClient;
using System.IO;
using Serilog;
diff --git a/test/dotnet/src/ExecuteTests.cs b/test/dotnet/src/ExecuteTests.cs
index 3c326d3642..25be92785c 100644
--- a/test/dotnet/src/ExecuteTests.cs
+++ b/test/dotnet/src/ExecuteTests.cs
@@ -28,6 +28,7 @@ IEnumerable GetFilesByExtensions(DirectoryInfo dir, String[] noExecTes
[Fact]
public void Test()
{
+ AppContext.SetSwitch("Switch.Microsoft.Data.SqlClient.TruncateScaledDecimal", true);
BatchRun batchRun = new BatchRun();
DirectoryInfo dir = new DirectoryInfo(ConfigSetup.QueryFolder);
IEnumerable allFiles;
diff --git a/test/dotnet/src/PrepareExecBinding.cs b/test/dotnet/src/PrepareExecBinding.cs
index 642f206252..64fe228102 100644
--- a/test/dotnet/src/PrepareExecBinding.cs
+++ b/test/dotnet/src/PrepareExecBinding.cs
@@ -3,7 +3,7 @@
using System.Data;
using System.Data.Common;
using System.Data.OleDb;
-using System.Data.SqlClient;
+using Microsoft.Data.SqlClient;
using System.Data.SqlTypes;
using Microsoft.SqlServer.Types;
using System.IO;
diff --git a/test/dotnet/utils/ConfigSetup.cs b/test/dotnet/utils/ConfigSetup.cs
index 0dcd749c84..17880917d8 100644
--- a/test/dotnet/utils/ConfigSetup.cs
+++ b/test/dotnet/utils/ConfigSetup.cs
@@ -13,6 +13,7 @@ public static class ConfigSetup
public static readonly string TestName = Dictionary["testName"];
public static readonly bool RunInParallel = bool.Parse(Dictionary["runInParallel"]);
public static readonly bool PrintToConsole = bool.Parse(Dictionary["printToConsole"]);
+ public static bool RunInRegression;
public static string Database;
public static string Provider = Dictionary["provider"];
@@ -42,6 +43,7 @@ public static Dictionary LoadConfig()
}
Database = dictionary["driver"];
Provider = dictionary["provider"];
+ RunInRegression = bool.Parse(dictionary["runInRegression"]);
/* Creating Server Connection String and Query. */
dictionary["bblConnectionString"] = BuildConnectionString(dictionary["babel_URL"], dictionary["babel_port"],
@@ -58,8 +60,10 @@ static string BuildConnectionString(string url, string port, string db, string u
return @"Provider = " + ConfigSetup.Provider + ";Data Source = " + url + "," + port + "; Initial Catalog = " + db
+ "; User ID = " + uid + "; Password = " + pwd + ";";
case "sql":
- return @"Data Source = " + url + "," + port + "; Initial Catalog = " + db
- + "; User ID = " + uid + "; Password = " + pwd + ";";
+ string baseConnectionString = $"Data Source={url},{port};Initial Catalog={db};User ID={uid};Password={pwd};";
+ return ConfigSetup.RunInRegression
+ ? $"{baseConnectionString};Encrypt=false"
+ : baseConnectionString;
default:
throw new Exception("Driver Not Supported");
}
diff --git a/test/dotnet/utils/TestUtils.cs b/test/dotnet/utils/TestUtils.cs
index 0c90e0ddeb..c5d9578e24 100644
--- a/test/dotnet/utils/TestUtils.cs
+++ b/test/dotnet/utils/TestUtils.cs
@@ -3,13 +3,13 @@
using System.Data;
using System.Data.Common;
using System.Data.OleDb;
-using System.Data.SqlClient;
+using Microsoft.Data.SqlClient;
using System.Data.SqlTypes;
using System.Diagnostics;
using System.IO;
using System.Net.NetworkInformation;
using System.Runtime.InteropServices;
-using Microsoft.SqlServer.Server;
+using Microsoft.Data.SqlClient.Server;
using Serilog;
using Serilog.Core;
using Xunit;