Skip to content

Commit 722cf30

Browse files
authored
Delete System.Data.SqlClient package (dotnet#2275)
* Delete System.Data.SqlClient package * Delete unnecessary SqlClient references * Unify System.Data.SqlClient package reference * Add System.Data facade test * Add System.Data.SqlClient references - Add System.Data.SqlClient package references for tests that need it - Use System.Data.SqlClient reference assembly to build the System.Data shim - Disable ILLinker for the shims since it does not work well with incremental builds and it is not necessary anyway * Disable tests on Mono Fixes https://github.com/dotnet/corefx/issues/40846
1 parent 334391b commit 722cf30

File tree

582 files changed

+51
-149808
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

582 files changed

+51
-149808
lines changed

.config/CredScanSuppressions.json

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,6 @@
1717
"/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/EC/ECKeyFileTests.cs",
1818
"/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/RSA/RSAKeyFileTests.cs",
1919
"/src/libraries/System.Data.Common/tests/System/Data/Common/DbConnectionStringBuilderTest.cs",
20-
"/src/libraries/System.Data.SqlClient/src/System/Data/SqlClient/TdsEnums.cs",
21-
"/src/libraries/System.Data.SqlClient/tests/FunctionalTests/DiagnosticTest.cs",
22-
"/src/libraries/System.Data.SqlClient/tests/FunctionalTests/ExceptionTest.cs",
23-
"/src/libraries/System.Data.SqlClient/tests/FunctionalTests/SqlConnectionBasicTests.cs",
24-
"/src/libraries/System.Data.SqlClient/tests/Tools/TDS/TDS.Servers/TDSServerArguments.cs",
25-
"/src/libraries/System.Data.SqlClient/tests/Tools/TDS/TDS.Servers/TdsServerCertificate.pfx",
2620
"/src/libraries/System.Diagnostics.Process/tests/ProcessStartInfoTests.cs",
2721
"/src/libraries/System.DirectoryServices.AccountManagement/src/System/DirectoryServices/AccountManagement/constants.cs",
2822
"/src/libraries/System.DirectoryServices.AccountManagement/tests/PrincipalTest.cs",

eng/Versions.props

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,8 +110,8 @@
110110
<RefOnlyMicrosoftBuildUtilitiesCoreVersion>$(RefOnlyMicrosoftBuildVersion)</RefOnlyMicrosoftBuildUtilitiesCoreVersion>
111111
<RefOnlyNugetProjectModelVersion>4.9.4</RefOnlyNugetProjectModelVersion>
112112
<RefOnlyNugetPackagingVersion>4.9.4</RefOnlyNugetPackagingVersion>
113-
<!-- sni -->
114-
<RuntimeWinX64RuntimeNativeSystemDataSqlClientSniVersion>4.4.0</RuntimeWinX64RuntimeNativeSystemDataSqlClientSniVersion>
113+
<!-- System.Data.SqlClient -->
114+
<SystemDataSqlClientVersion>4.8.0</SystemDataSqlClientVersion>
115115
<!-- Testing -->
116116
<MicrosoftNETTestSdkVersion>16.5.0</MicrosoftNETTestSdkVersion>
117117
<XUnitVersion>2.4.1</XUnitVersion>

src/coreclr/tests/scripts/run-corefx-tests.bat

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ echo control, but is easy to implement. This file should be a list of assembly n
2727
echo without filename extension, one per line, e.g.:
2828
echo.
2929
echo System.Console.Tests
30-
echo System.Data.SqlClient.Tests
30+
echo System.Data.Common.Tests
3131
echo System.Diagnostics.Process.Tests
3232
echo.
3333
echo The ^<exclusion rsp file^> is in the form expected by xunit.console.dll as a response file.

src/libraries/Native/pkg/Directory.Build.props

Lines changed: 0 additions & 23 deletions
This file was deleted.

src/libraries/Native/pkg/Directory.Build.targets

Lines changed: 0 additions & 61 deletions
This file was deleted.

src/libraries/Native/pkg/_.pdb

Whitespace-only changes.

src/libraries/Native/pkg/runtime.native.System.Data.SqlClient.sni/runtime.native.System.Data.SqlClient.sni.pkgproj

Lines changed: 0 additions & 19 deletions
This file was deleted.

src/libraries/System.Data.Common/tests/System.Data.Common.Tests.csproj

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@
7676
<Compile Include="System\Data\DeletedRowInaccessibleExceptionTest.cs" />
7777
<Compile Include="System\Data\DuplicateNameExceptionTest.cs" />
7878
<Compile Include="System\Data\EvaluateExceptionTest.cs" />
79+
<Compile Include="System\Data\FacadeTest.cs" />
7980
<Compile Include="System\Data\ForeignKeyConstraintTest.cs" />
8081
<Compile Include="System\Data\ForeignKeyConstraintTest2.cs" />
8182
<Compile Include="System\Data\InRowChangingEventExceptionTest.cs" />
@@ -119,4 +120,7 @@
119120
<Link>Common\System\Runtime\Serialization\Formatters\BinaryFormatterHelpers.cs</Link>
120121
</Compile>
121122
</ItemGroup>
123+
<ItemGroup>
124+
<PackageReference Include="System.Data.SqlClient" Version="$(SystemDataSqlClientVersion)" />
125+
</ItemGroup>
122126
</Project>
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
// Licensed to the .NET Foundation under one or more agreements.
2+
// See the LICENSE file in the project root for more information.
3+
4+
using Xunit;
5+
6+
namespace System.Data.Tests
7+
{
8+
public class FacadeTest
9+
{
10+
[Theory]
11+
[InlineData("Microsoft.SqlServer.Server.SqlMetaData")] // Type from System.Data.SqlClient
12+
[InlineData("System.Data.SqlTypes.SqlBytes")] // Type from System.Data.Common
13+
public void TestSystemData(string typeName)
14+
{
15+
// Verify that the type can be loaded via .NET Framework compat facade
16+
Type.GetType(typeName + ", System.Data", throwOnError: true);
17+
}
18+
}
19+
}

src/libraries/System.Data.OleDb/src/DbConnectionStringCommon.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
using System.ComponentModel;
77
using System.Diagnostics;
88
using System.Globalization;
9-
using System.Data.SqlClient;
109

1110
namespace System.Data.Common
1211
{

src/libraries/System.Data.OleDb/src/System.Data.OleDb.csproj

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,6 @@
102102
<ItemGroup Condition="'$(TargetsNetFx)' != 'true'">
103103
<Reference Include="Microsoft.Win32.Registry" />
104104
<Reference Include="System.Memory" />
105-
<Reference Include="System.Data.SqlClient" />
106105
<Reference Include="System.Configuration.ConfigurationManager" />
107106
<Reference Include="System.Diagnostics.PerformanceCounter" />
108107
<Reference Include="System.Security.Principal.Windows" />

src/libraries/System.Data.SqlClient/Directory.Build.props

Lines changed: 0 additions & 6 deletions
This file was deleted.

0 commit comments

Comments
 (0)