Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
User Story 40114: Release activities for v5.1.8
- Fixed build issues that only appear when building on Windows.
  • Loading branch information
paulmedynski committed Nov 10, 2025
commit 2e701d800f8d4066893a3738cc4bb2d3eda2d28f
7 changes: 7 additions & 0 deletions src/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -110,4 +110,11 @@
<AddSyntheticProjectReferencesForSolutionDependencies>false</AddSyntheticProjectReferencesForSolutionDependencies>
</PropertyGroup>

<!--
We target .NET 6.0 and modern SDK tooling produces warnings since it is
out of support. Suppress these warnings to avoid noise in the builds.
-->
<PropertyGroup>
<NoWarn>$(NoWarn);NETSDK1138</NoWarn>
</PropertyGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Azure.Core" Version="$(AzureCoreVersion)" />
<PackageReference Include="System.Private.Uri" Version="$(SystemPrivateUriVersion)" />
<PackageReference Include="System.Text.Encodings.Web" Version="$(SystemTextEncodingsWebVersion)" />
<PackageReference Include="Azure.Security.KeyVault.Keys" Version="$(AzureSecurityKeyVaultKeysVersion)" />
<PackageReference Include="Microsoft.Extensions.Caching.Memory" Version="$(MicrosoftExtensionsCachingMemoryVersion)" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,6 @@
<ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.0'">
<PackageReference Include="System.Buffers" Version="$(SystemBuffersVersion)" />
</ItemGroup>
<ItemGroup Condition="'$(TargetsWindows)' == 'true' and '$(IsUAPAssembly)' != 'true'">
<Reference Include="Microsoft.Win32.Registry" />
</ItemGroup>
<ItemGroup Condition="'$(OSGroup)' != 'AnyOS' AND '$(IsUAPAssembly)' == 'true'">
<Reference Include="System.Collections.NonGeneric" />
<Reference Include="System.Memory" />
Expand All @@ -59,6 +56,7 @@
<!-- <ProjectReference Include="$(SqlServerSourceCode)\Microsoft.SqlServer.Server.csproj" /> -->
<PackageReference Include="Microsoft.SqlServer.Server" Version="$(MicrosoftSqlServerServerVersion)" />
<PackageReference Include="Azure.Identity" Version="$(AzureIdentityVersion)" />
<PackageReference Include="Azure.Core" Version="$(AzureCoreVersion)" />
<PackageReference Include="Microsoft.Identity.Client" Version="$(MicrosoftIdentityClientVersion)" />
<PackageReference Include="Microsoft.IdentityModel.Protocols.OpenIdConnect" Version="$(MicrosoftIdentityModelProtocolsOpenIdConnectVersion)" />
<PackageReference Include="Microsoft.IdentityModel.JsonWebTokens" Version="$(MicrosoftIdentityModelJsonWebTokensVersion)" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -948,9 +948,6 @@
<Compile Include="Microsoft\Data\SqlClient\TdsParserStateObjectFactory.Managed.cs" />
<Compile Include="Microsoft\Data\SqlClient\TdsParser.Unix.cs" />
</ItemGroup>
<ItemGroup Condition="'$(TargetsWindows)' == 'true' and '$(IsUAPAssembly)' != 'true'">
<Reference Include="Microsoft.Win32.Registry" />
</ItemGroup>
<ItemGroup Condition="'$(OSGroup)' != 'AnyOS' AND '$(IsUAPAssembly)' == 'true'">
<Reference Include="System.Collections.NonGeneric" />
<Reference Include="System.Memory" />
Expand All @@ -973,6 +970,7 @@
<PackageReference Include="Microsoft.SqlServer.Server" Version="$(MicrosoftSqlServerServerVersion)" />
<PackageReference Condition="$(TargetGroup) == 'netcoreapp' " Include="System.Diagnostics.DiagnosticSource" Version="$(SystemDiagnosticsDiagnosticSourceVersion)" />
<PackageReference Include="Azure.Identity" Version="$(AzureIdentityVersion)" />
<PackageReference Include="Azure.Core" Version="$(AzureCoreVersion)" />
<PackageReference Include="Microsoft.Identity.Client" Version="$(MicrosoftIdentityClientVersion)" />
<PackageReference Include="Microsoft.IdentityModel.Protocols.OpenIdConnect" Version="$(MicrosoftIdentityModelProtocolsOpenIdConnectVersion)" />
<PackageReference Include="Microsoft.IdentityModel.JsonWebTokens" Version="$(MicrosoftIdentityModelJsonWebTokensVersion)" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Azure.Identity" Version="$(AzureIdentityVersion)" />
<PackageReference Include="Azure.Core" Version="$(AzureCoreVersion)" />
<PackageReference Include="Microsoft.Identity.Client" Version="$(MicrosoftIdentityClientVersion)" />
<PackageReference Include="Microsoft.IdentityModel.JsonWebTokens" Version="$(MicrosoftIdentityModelJsonWebTokensVersion)" />
<PackageReference Include="Microsoft.IdentityModel.Protocols.OpenIdConnect" Version="$(MicrosoftIdentityModelProtocolsOpenIdConnectVersion)" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<ProjectGuid>{407890AC-9876-4FEF-A6F1-F36A876BAADE}</ProjectGuid>
<RootNamespace>SqlClient</RootNamespace>
<TargetFrameworkVersion>v4.6.2</TargetFrameworkVersion>
<TargetFramework>net462</TargetFramework>
<EnableDefaultCompileItems>false</EnableDefaultCompileItems>
<EnableDefaultEmbeddedResourceItems>false</EnableDefaultEmbeddedResourceItems>
<EnableLocalAppContext>true</EnableLocalAppContext>
<ResxFileName>Strings</ResxFileName>
<ResourceFileName>SqlClient.Resources.$(ResxFileName)</ResourceFileName>
Expand All @@ -27,7 +28,7 @@
<NoConfig>True</NoConfig>
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
<CheckForOverflowUnderflow>False</CheckForOverflowUnderflow>
<NoWarn>1701,1702</NoWarn>
<NoWarn>$(NoWarn);1701,1702</NoWarn>
<GenerateFullPaths>True</GenerateFullPaths>
<NoStandardLib>True</NoStandardLib>
<WarningLevel>4</WarningLevel>
Expand Down Expand Up @@ -713,6 +714,7 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Azure.Identity" Version="$(AzureIdentityVersion)" />
<PackageReference Include="Azure.Core" Version="$(AzureCoreVersion)" />
<PackageReference Include="Microsoft.Identity.Client" Version="$(MicrosoftIdentityClientVersion)" />
<PackageReference Include="Microsoft.IdentityModel.JsonWebTokens" Version="$(MicrosoftIdentityModelJsonWebTokensVersion)" />
<PackageReference Include="Microsoft.IdentityModel.Protocols.OpenIdConnect" Version="$(MicrosoftIdentityModelProtocolsOpenIdConnectVersion)" />
Expand All @@ -729,7 +731,6 @@
</PackageReference>
</ItemGroup>

<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="$(NetFxSource)tools\targets\GenerateResourceStringsSource.targets" />
<Import Project="$(NetFxSource)tools\targets\GenerateThisAssemblyCs.targets" />
<Import Project="$(NetFxSource)tools\targets\GenerateAssemblyRef.targets" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@
<PackageReference Include="System.Diagnostics.DiagnosticSource" Version="$(SystemDiagnosticsDiagnosticSourceVersion)" />
<PackageReference Include="Newtonsoft.Json" Version="$(NewtonsoftJsonVersion)" />
<Reference Condition="'$(TargetGroup)'=='netfx'" Include="System.Transactions" />
<PackageReference Include="System.Private.Uri" Version="$(SystemPrivateUriVersion)" />
</ItemGroup>
<ItemGroup Condition="'$(TargetGroup)' == 'netcoreapp'">
<PackageReference Include="System.Data.Odbc" Version="$(SystemDataOdbcVersion)" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public static void SqlExcpetionSerializationTest()
}
catch (Exception ex)
{
Assert.False(true, $"Unexpected Exception occurred: {ex.Message}");
Assert.Fail($"Unexpected Exception occurred: {ex.Message}");
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ private static void ValidateAKVTraces(List<EventWrittenEventArgs> eventData, Gui
}
break;
default:
Assert.False(true, "Unexpected event occurred: " + item.Message);
Assert.Fail("Unexpected event occurred: " + item.Message);
break;
}
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2918,7 +2918,7 @@ private void EndExecuteReaderAsyncCallBack(IAsyncResult asyncResult)
catch (Exception e)
{
testAsyncCallBackStateObject.Completion.SetException(e);
Assert.True(false, $"{e.Message}");
Assert.Fail($"{e.Message}");
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -525,7 +525,7 @@ List<ValueErrorTuple> GenerateOutOfRangeValuesForType(SqlDbType type, int length
list.Add(new ValueErrorTuple(Single.Epsilon, false));
break;
default:
Assert.True(false, "We should never get here");
Assert.Fail("We should never get here");
break;
}

Expand Down Expand Up @@ -563,7 +563,7 @@ private void ExecuteAndCheckForError(SqlCommand sqlCmd, bool expectError)
try
{
sqlCmd.ExecuteNonQuery();
Assert.True(false, "We should have gotten an error but passed instead.");
Assert.Fail("We should have gotten an error but passed instead.");
}
catch (Exception e)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ public void TestSelectOnEncryptedNonEncryptedColumnsWithEncryptedParameters(stri
break;

default:
Assert.True(false, "FAILED: No other data type is supported.");
Assert.Fail("FAILED: No other data type is supported.");
break;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ public static void CompareResults(SqlDataReader sqlDataReader, string[] paramete
break;
#endif
default:
Assert.True(false, "FAILED: unexpected data type.");
Assert.Fail("FAILED: unexpected data type.");
break;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,9 @@ private static Task<string> AcquireTokenAsync(string authorityURL, string userID
SecureString securePassword = new SecureString();

securePassword.MakeReadOnly();
#pragma warning disable CS0618 // Type or member is obsolete
result = app.AcquireTokenByUsernamePassword(scopes, userID, password).ExecuteAsync().Result;
#pragma warning restore CS0618 // Type or member is obsolete

return result.AccessToken;
});
Expand Down Expand Up @@ -787,7 +789,7 @@ public static TException ExpectFailure<TException>(Action actionThatFails, strin
try
{
actionThatFails();
Assert.False(true, "ERROR: Did not get expected exception");
Assert.Fail("ERROR: Did not get expected exception");
return null;
}
catch (Exception ex)
Expand All @@ -808,7 +810,7 @@ public static TException ExpectFailure<TException, TInnerException>(Action actio
try
{
actionThatFails();
Assert.False(true, "ERROR: Did not get expected exception");
Assert.Fail("ERROR: Did not get expected exception");
return null;
}
catch (Exception ex)
Expand All @@ -829,7 +831,7 @@ public static TException ExpectFailure<TException, TInnerException, TInnerInnerE
try
{
actionThatFails();
Assert.False(true, "ERROR: Did not get expected exception");
Assert.Fail("ERROR: Did not get expected exception");
return null;
}
catch (Exception ex)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -335,6 +335,7 @@
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="$(MicrosoftNETTestSdkVersion)" />
<PackageReference Condition="'$(TargetGroup)'=='netfx'" Include="Microsoft.SqlServer.Types" Version="$(MicrosoftSqlServerTypesVersion)" />
<PackageReference Condition="'$(TargetGroup)'!='netfx'" Include="System.ServiceProcess.ServiceController" Version="$(SystemServiceProcessServiceControllerVersion)" />
<PackageReference Include="System.Private.Uri" Version="$(SystemPrivateUriVersion)" />
</ItemGroup>
<ItemGroup>
<None Condition="'$(TargetGroup)'=='netfx' AND $(ReferenceType)=='Project'" Include="$(BinFolder)$(Configuration).AnyCPU\Microsoft.Data.SqlClient\netfx\**\*SNI*.dll" CopyToOutputDirectory="PreserveNewest" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ private static async Task QueryAndValidate(AsyncAPI api, int index, string delay
}
catch (Exception ex)
{
Assert.False(true, "Exception occurred: " + ex.Message);
Assert.Fail("Exception occurred: " + ex.Message);
}
}
break;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ public static async void MoveToContentAsyncTest()
}
catch (Exception ex)
{
Assert.False(true, "Exception occurred: " + ex.Message);
Assert.Fail("Exception occurred: " + ex.Message);
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,9 @@ public override async Task<SqlAuthenticationToken> AcquireTokenAsync(SqlAuthenti
string[] scopes = new string[] { scope };
SecureString password = new SecureString();

#pragma warning disable CS0618 // Type or member is obsolete
AuthenticationResult result = await PublicClientApplicationBuilder.Create(_appClientId)
#pragma warning restore CS0618 // Type or member is obsolete
.WithAuthority(parameters.Authority)
.Build().AcquireTokenByUsernamePassword(scopes, parameters.UserId, parameters.Password)
.WithCorrelationId(parameters.ConnectionId)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ public static void EnvironmentHostNameSPIDTest()
// Confirm Server Process Id stays the same after query execution
Assert.Equal(sessionSpid, sqlConnection.ServerProcessId);
}
Assert.True(false, "No non-empty hostname found for the application");
Assert.Fail("No non-empty hostname found for the application");
}

[ConditionalFact(typeof(DataTestUtility), nameof(DataTestUtility.AreConnStringsSetup))]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ public static void CollatedDataReaderTest()
}
catch (SqlException e)
{
Assert.True(false, $"Unexpected Exception occurred: {e.Message}");
Assert.Fail($"Unexpected Exception occurred: {e.Message}");
}
finally
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,17 +106,17 @@ static async Task LocalCopyTo(Stream source, Stream destination, int bufferSize,
int sharedLength = Math.Min(inputData.Length, outputData.Length);
if (sharedLength < outputData.Length)
{
Assert.False(true, $"output is longer than input, input={inputData.Length} bytes, output={outputData.Length} bytes");
Assert.Fail($"output is longer than input, input={inputData.Length} bytes, output={outputData.Length} bytes");
}
if (sharedLength < inputData.Length)
{
Assert.False(true, $"input is longer than output, input={inputData.Length} bytes, output={outputData.Length} bytes");
Assert.Fail($"input is longer than output, input={inputData.Length} bytes, output={outputData.Length} bytes");
}
for (int index = 0; index < sharedLength; index++)
{
if (inputData[index] != outputData[index]) // avoid formatting the output string unless there is a difference
{
Assert.True(false, $"input and output differ at index {index}, input={inputData[index]}, output={outputData[index]}");
Assert.Fail($"input and output differ at index {index}, input={inputData[index]}, output={outputData[index]}");
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -688,7 +688,7 @@ FROM [{table}] AS [l]
}
catch (Exception e)
{
Assert.False(true, "CRITIAL: Test should not fail randomly. Exception occurred: " + e.Message);
Assert.Fail("CRITIAL: Test should not fail randomly. Exception occurred: " + e.Message);
}
finally
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -761,7 +761,7 @@ public static void ClosedConnection_SqlParameterValueTest()
}
catch (Exception e)
{
Assert.False(true, $"Unexpected exception occurred: {e.Message}");
Assert.Fail($"Unexpected exception occurred: {e.Message}");
}
}
});
Expand Down Expand Up @@ -804,7 +804,7 @@ private static void RunParameterTest()
return;
else if ((Guid)cm.Parameters["@id2"].Value != expectedGuid)
{
Assert.False(true, "CRITICAL : Unexpected data found in SqlCommand parameters, this is a MAJOR issue.");
Assert.Fail("CRITICAL : Unexpected data found in SqlCommand parameters, this is a MAJOR issue.");
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ public void TestConnectionIsSafeToReuse()
cmd.CommandTimeout = 100;
AddCommandParameters(cmd, parameters);
new SqlDataAdapter(cmd).Fill(new("BadFunc"));
Assert.False(true, "Expected exception did not occur");
Assert.Fail("Expected exception did not occur");
}
catch (Exception e)
{
Expand All @@ -140,7 +140,7 @@ public void TestConnectionIsSafeToReuse()
}
catch (Exception e)
{
Assert.False(true, $"Unexpected error occurred: {e.Message}");
Assert.Fail($"Unexpected error occurred: {e.Message}");
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public async void ValidateRetryCount_SqlCommand_Async(string methodName, int num
default:
break;
}
Assert.False(true, "Exception did not occur.");
Assert.Fail("Exception did not occur.");
}
catch
{
Expand Down Expand Up @@ -103,7 +103,7 @@ public void ValidateRetryCount_SqlCommand_Sync(string methodName, int numOfTries
default:
break;
}
Assert.False(true, "Exception did not occur.");
Assert.Fail("Exception did not occur.");
}
catch
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ IF EXISTS (SELECT name FROM msdb.dbo.sysalerts WHERE name = N'{alertName}')
{
if (retryAttempt >= 3 || e.Message.Contains("The transaction operation cannot be performed"))
{
Assert.False(true, $"Retry Attempt: {retryAttempt} | Unexpected Exception occurred: {e.Message}");
Assert.Fail($"Retry Attempt: {retryAttempt} | Unexpected Exception occurred: {e.Message}");
}
else
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ public void SqlDependencyStartStopTest()
}
catch (Exception e)
{
Assert.True(false, e.Message);
Assert.Fail(e.Message);
}
}

Expand Down Expand Up @@ -152,7 +152,7 @@ public void SqlDependencyStartStopDefaultTest()
}
catch (Exception e)
{
Assert.True(false, e.Message);
Assert.Fail(e.Message);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public static void TestEnlistmentPrepare_TxScopeComplete()
connection.Open();
System.Transactions.Transaction.Current.EnlistDurable(EnlistmentForPrepare.s_id, new EnlistmentForPrepare(), EnlistmentOptions.None);
txScope.Complete();
Assert.False(true, "Expected exception not thrown.");
Assert.Fail("Expected exception not thrown.");
});
}

Expand Down
Loading
Loading