Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade dotnet to v8.0 and upgrade C# dependencies #3334

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/composite-actions/install-and-run-dotnet/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions test/dotnet/config.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ bcpPath=/usr/local/bin/bcp

runInParallel = false
printToConsole = true
runInRegression = true

driver = sql
provider = SQL NATIVE CLIENT
Expand Down
22 changes: 11 additions & 11 deletions test/dotnet/dotnet.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,26 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.7.1" />
<PackageReference Include="Serilog" Version="2.9.0" />
<PackageReference Include="Serilog.Sinks.File" Version="4.1.0" />
<PackageReference Include="System.Data.OleDb" Version="5.0.0" />
<PackageReference Include="System.Data.SqlClient" Version="4.8.6" />
<PackageReference Include="Microsoft.SqlServer.Types" Version="7.0.0" />
<PackageReference Include="xunit" Version="2.4.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.3">
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.12.0" />
<PackageReference Include="Serilog" Version="4.2.0" />
<PackageReference Include="Serilog.Sinks.File" Version="6.0.0" />
<PackageReference Include="System.Data.OleDb" Version="9.0.0" />
<PackageReference Include="Microsoft.Data.SqlClient" Version="5.2.2" />
<PackageReference Include="Microsoft.SqlServer.Types" Version="160.1000.6" />
<PackageReference Include="xunit" Version="2.9.2" />
<PackageReference Include="xunit.runner.visualstudio" Version="3.0.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="xunit.runner.console" Version="2.4.1">
<PackageReference Include="xunit.runner.console" Version="2.9.2">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="MathNet.Numerics" Version="4.15.0" />
<PackageReference Include="MathNet.Numerics" Version="5.0.0" />
</ItemGroup>

</Project>
2 changes: 1 addition & 1 deletion test/dotnet/src/BatchRun.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
1 change: 1 addition & 0 deletions test/dotnet/src/ExecuteTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ IEnumerable<FileInfo> 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<FileInfo> allFiles;
Expand Down
2 changes: 1 addition & 1 deletion test/dotnet/src/PrepareExecBinding.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
8 changes: 6 additions & 2 deletions test/dotnet/utils/ConfigSetup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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"];

Expand Down Expand Up @@ -42,6 +43,7 @@ public static Dictionary<string, string> 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"],
Expand All @@ -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");
}
Expand Down
4 changes: 2 additions & 2 deletions test/dotnet/utils/TestUtils.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down