Skip to content

Commit cd4805b

Browse files
authored
Remove support for .NET Standard 2.0 and 2.1 (#2386)
1 parent 792479e commit cd4805b

File tree

72 files changed

+53
-1111
lines changed

Some content is hidden

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

72 files changed

+53
-1111
lines changed

BUILDGUIDE.md

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -231,17 +231,15 @@ Tests can be built and run with custom "Reference Type" property that enables di
231231

232232
- "Project" => Build and run tests with Microsoft.Data.SqlClient as Project Reference
233233
- "Package" => Build and run tests with Microsoft.Data.SqlClient as Package Reference with configured "TestMicrosoftDataSqlClientVersion" in "Versions.props" file.
234-
- "NetStandard" => Build and run tests with Microsoft.Data.SqlClient as Project Reference via .NET Standard Library
235-
- "NetStandardPackage" => Build and run tests with Microsoft.Data.SqlClient as Package Reference via .NET Standard Library
236234

237-
> ************** IMPORTANT NOTE BEFORE PROCEEDING WITH "PACKAGE" AND "NETSTANDARDPACKAGE" REFERENCE TYPES ***************
235+
> ************** IMPORTANT NOTE BEFORE PROCEEDING WITH "PACKAGE" REFERENCE TYPE ***************
238236
> CREATE A NUGET PACKAGE WITH BELOW COMMAND AND ADD TO LOCAL FOLDER + UPDATE NUGET CONFIG FILE TO READ FROM THAT LOCATION
239237
>
240238
> ```bash
241239
> msbuild -p:configuration=Release
242240
> ```
243241
244-
A non-AnyCPU platform reference can only be used with package and NetStandardPackage reference types. Otherwise, the specified platform will be replaced with AnyCPU in the build process.
242+
A non-AnyCPU platform reference can only be used with package reference type. Otherwise, the specified platform will be replaced with AnyCPU in the build process.
245243
246244
### Building Tests with Reference Type
247245
@@ -252,10 +250,6 @@ msbuild -t:BuildTestsNetCore -p:ReferenceType=Project
252250
# Default setting uses Project Reference.
253251
254252
msbuild -t:BuildTestsNetCore -p:ReferenceType=Package
255-
256-
msbuild -t:BuildTestsNetCore -p:ReferenceType=NetStandard
257-
258-
msbuild -t:BuildTestsNetCore -p:ReferenceType=NetStandardPackage
259253
```
260254
261255
For .NET Framework, below reference types are supported:

RunPackageReferenceTests.cmd

Lines changed: 2 additions & 70 deletions
Large diffs are not rendered by default.

build.proj

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@
5353
<NetCoreDriver Include="**/netcore/**/Microsoft.Data.SqlClient*.csproj" />
5454
<AKVProvider Include="**/add-ons/**/AzureKeyVaultProvider/*.csproj" />
5555

56-
<FunctionalTests Condition="$(ReferenceType.Contains('NetStandard'))" Include="**/NSLibrary/Microsoft.Data.SqlClient.NSLibrary.csproj" />
5756
<FunctionalTests Include="**/tools/TDS/TDS/TDS.csproj" />
5857
<FunctionalTests Include="**/tools/TDS/TDS.EndPoint/TDS.EndPoint.csproj" />
5958
<FunctionalTests Include="**/tools/TDS/TDS.Servers/TDS.Servers.csproj" />
@@ -62,7 +61,6 @@
6261
<FunctionalTests Include="**/FunctionalTests/Microsoft.Data.SqlClient.Tests.csproj" />
6362
<FunctionalTestsProj Include="**/FunctionalTests/Microsoft.Data.SqlClient.Tests.csproj" />
6463

65-
<ManualTests Condition="$(ReferenceType.Contains('NetStandard'))" Include="**/NSLibrary/Microsoft.Data.SqlClient.NSLibrary.csproj" />
6664
<ManualTests Include="**/ManualTests/SQL/UdtTest/UDTs/Address/Address.csproj" />
6765
<ManualTests Include="**/ManualTests/SQL/UdtTest/UDTs/Circle/Circle.csproj" />
6866
<ManualTests Include="**/ManualTests/SQL/UdtTest/UDTs/Shapes/Shapes.csproj" />
@@ -219,23 +217,11 @@
219217
<MSBuild Projects="@(AKVProvider)" Properties="$(CI);TestTargetOS=$(TestOS)netcoreapp;$(ProjectProperties);Platform=$(Platform);" Condition="$(ReferenceType.Contains('Package'))"/>
220218
</Target>
221219

222-
<Target Name="BuildAKVNetSt">
223-
<MSBuild Projects="@(AKVProvider)" Targets="restore" Properties="TestTargetOS=$(TestOS)netstandard" />
224-
<MSBuild Projects="@(AKVProvider)" Properties="$(CI);TestTargetOS=$(TestOS)netstandard;$(ProjectProperties);Platform=AnyCPU;" Condition="!$(ReferenceType.Contains('Package'))"/>
225-
<MSBuild Projects="@(AKVProvider)" Properties="$(CI);TestTargetOS=$(TestOS)netstandard;$(ProjectProperties);Platform=$(Platform);" Condition="$(ReferenceType.Contains('Package'))"/>
226-
</Target>
227-
228220
<Target Name="BuildAKVNetCoreAllOS">
229221
<MSBuild Projects="@(AKVProvider)" Targets="restore" Properties="TestTargetOS=$(TestOS)netcoreapp" />
230222
<MSBuild Projects="@(AKVProvider)" Properties="$(CI);TestTargetOS=$(TestOS)netcoreapp;$(ProjectProperties);Platform=AnyCPU;OSGroup=Unix;" RemoveProperties="TargetsWindows;TargetsUnix;" />
231223
<MSBuild Projects="@(AKVProvider)" Properties="$(CI);TestTargetOS=$(TestOS)netcoreapp;$(ProjectProperties);Platform=AnyCPU;OSGroup=Windows_NT;" RemoveProperties="TargetsWindows;TargetsUnix;" Condition="'$(IsEnabledWindows)' == 'true'" />
232224
<MSBuild Projects="@(AKVProvider)" Properties="$(CI);TestTargetOS=$(TestOS)netcoreapp;$(ProjectProperties);Platform=AnyCPU;OSGroup=AnyOS;" RemoveProperties="TargetsWindows;TargetsUnix;" />
233225
</Target>
234226

235-
<Target Name="BuildAKVNetStAllOS" >
236-
<MSBuild Projects="@(AKVProvider)" Targets="restore" Properties="TestTargetOS=$(TestOS)netstandard" />
237-
<MSBuild Projects="@(AKVProvider)" Properties="$(CI);TestTargetOS=$(TestOS)netstandard;$(ProjectProperties);Platform=AnyCPU;OSGroup=Unix;" RemoveProperties="TargetsWindows;TargetsUnix;" />
238-
<MSBuild Projects="@(AKVProvider)" Properties="$(CI);TestTargetOS=$(TestOS)netstandard;$(ProjectProperties);Platform=AnyCPU;OSGroup=Windows_NT;" RemoveProperties="TargetsWindows;TargetsUnix;" Condition="'$(IsEnabledWindows)' == 'true'" />
239-
<MSBuild Projects="@(AKVProvider)" Properties="$(CI);TestTargetOS=$(TestOS)netstandard;$(ProjectProperties);Platform=AnyCPU;OSGroup=AnyOS;" RemoveProperties="TargetsWindows;TargetsUnix;" />
240-
</Target>
241227
</Project>

src/Directory.Build.props

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,8 @@
1515
1616
"Project" => Build and run tests with Microsoft.Data.SqlClient as Project Reference
1717
"Package" => Build and run tests with Microsoft.Data.SqlClient as Package Reference with configured "TestMicrosoftDataSqlClientVersion" in "Versions.props" file.
18-
"NetStandard" => Build and run tests with Microsoft.Data.SqlClient as Project Reference via .NET Standard Library
19-
"NetStandardPackage" => Build and run tests with Microsoft.Data.SqlClient as Package Reference via .NET Standard Library
2018
21-
************** IMPORTANT NOTE BEFORE PROCEEDING WITH "PACKAGE" AND "NETSTANDARDPACKAGE" REFERENCE TYPES ***************
19+
************** IMPORTANT NOTE BEFORE PROCEEDING WITH "PACKAGE" REFERENCE TYPE ***************
2220
CREATE A NUGET PACKAGE WITH BELOW COMMAND AND ADD TO LOCAL FOLDER + UPDATE NUGET CONFIG FILE TO READ FROM THAT LOCATION
2321
> msbuild -p:configuration=Release
2422
-->

src/Microsoft.Data.SqlClient.sln

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -179,12 +179,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Microsoft.Data.SqlTypes", "
179179
EndProject
180180
Project("{E53339B2-1760-4266-BCC7-CA923CBCF16C}") = "docker-compose", "docker-compose.dcproj", "{F5DF2FDC-C860-4CB3-8B24-7C903C6FC076}"
181181
EndProject
182-
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Data.SqlClient.NSLibrary", "Microsoft.Data.SqlClient\tests\NSLibrary\Microsoft.Data.SqlClient.NSLibrary.csproj", "{E7336BFB-8521-423A-A140-3123F9065C5D}"
183-
ProjectSection(ProjectDependencies) = postProject
184-
{37431336-5307-4184-9356-C4B7E47DC714} = {37431336-5307-4184-9356-C4B7E47DC714}
185-
{407890AC-9876-4FEF-A6F1-F36A876BAADE} = {407890AC-9876-4FEF-A6F1-F36A876BAADE}
186-
EndProjectSection
187-
EndProject
188182
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Data.SqlClient.TestUtilities", "Microsoft.Data.SqlClient\tests\tools\Microsoft.Data.SqlClient.TestUtilities\Microsoft.Data.SqlClient.TestUtilities.csproj", "{89D6D382-9B36-43C9-A912-03802FDA8E36}"
189183
EndProject
190184
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Data.SqlClient.ExtUtilities", "Microsoft.Data.SqlClient\tests\tools\Microsoft.Data.SqlClient.ExtUtilities\Microsoft.Data.SqlClient.ExtUtilities.csproj", "{E4C08DCE-DC29-4FEB-B655-1E7287DB5A2B}"
@@ -410,18 +404,6 @@ Global
410404
{F5DF2FDC-C860-4CB3-8B24-7C903C6FC076}.Release|x64.Build.0 = Release|Any CPU
411405
{F5DF2FDC-C860-4CB3-8B24-7C903C6FC076}.Release|x86.ActiveCfg = Release|Any CPU
412406
{F5DF2FDC-C860-4CB3-8B24-7C903C6FC076}.Release|x86.Build.0 = Release|Any CPU
413-
{E7336BFB-8521-423A-A140-3123F9065C5D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
414-
{E7336BFB-8521-423A-A140-3123F9065C5D}.Debug|Any CPU.Build.0 = Debug|Any CPU
415-
{E7336BFB-8521-423A-A140-3123F9065C5D}.Debug|x64.ActiveCfg = Debug|x64
416-
{E7336BFB-8521-423A-A140-3123F9065C5D}.Debug|x64.Build.0 = Debug|x64
417-
{E7336BFB-8521-423A-A140-3123F9065C5D}.Debug|x86.ActiveCfg = Debug|x86
418-
{E7336BFB-8521-423A-A140-3123F9065C5D}.Debug|x86.Build.0 = Debug|x86
419-
{E7336BFB-8521-423A-A140-3123F9065C5D}.Release|Any CPU.ActiveCfg = Release|Any CPU
420-
{E7336BFB-8521-423A-A140-3123F9065C5D}.Release|Any CPU.Build.0 = Release|Any CPU
421-
{E7336BFB-8521-423A-A140-3123F9065C5D}.Release|x64.ActiveCfg = Release|x64
422-
{E7336BFB-8521-423A-A140-3123F9065C5D}.Release|x64.Build.0 = Release|x64
423-
{E7336BFB-8521-423A-A140-3123F9065C5D}.Release|x86.ActiveCfg = Release|x86
424-
{E7336BFB-8521-423A-A140-3123F9065C5D}.Release|x86.Build.0 = Release|x86
425407
{89D6D382-9B36-43C9-A912-03802FDA8E36}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
426408
{89D6D382-9B36-43C9-A912-03802FDA8E36}.Debug|Any CPU.Build.0 = Debug|Any CPU
427409
{89D6D382-9B36-43C9-A912-03802FDA8E36}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -518,7 +500,6 @@ Global
518500
{5D1F0032-7B0D-4FB6-A969-FCFB25C9EA1D} = {71F356DC-DFA3-4163-8BFE-D268722CE189}
519501
{650EB7FA-EB0D-4F8E-AB2C-161C3AD8E363} = {71F356DC-DFA3-4163-8BFE-D268722CE189}
520502
{5A7600BD-AED8-44AB-8F2A-7CB33A8D9C02} = {71F356DC-DFA3-4163-8BFE-D268722CE189}
521-
{E7336BFB-8521-423A-A140-3123F9065C5D} = {0CC4817A-12F3-4357-912C-09315FAAD008}
522503
{89D6D382-9B36-43C9-A912-03802FDA8E36} = {0CC4817A-12F3-4357-912C-09315FAAD008}
523504
{E4C08DCE-DC29-4FEB-B655-1E7287DB5A2B} = {0CC4817A-12F3-4357-912C-09315FAAD008}
524505
{B499E477-C9B1-4087-A5CF-5C762D90E433} = {0CC4817A-12F3-4357-912C-09315FAAD008}

src/Microsoft.Data.SqlClient/add-ons/Directory.Build.props

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
<!--These properties can be modified locally to target .NET version of choice to build and test entire test suite-->
1818
<PropertyGroup>
1919
<TargetNetFxVersion Condition="'$(TargetNetFxVersion)' == ''">net462</TargetNetFxVersion>
20-
<TargetNetStandardVersion Condition="'$(TargetNetStandardVersion)' == ''">netstandard2.0</TargetNetStandardVersion>
2120
<TargetNetCoreVersion Condition="'$(TargetNetCoreVersion)' == ''">net6.0</TargetNetCoreVersion>
2221
</PropertyGroup>
2322

@@ -28,14 +27,13 @@
2827
<!-- Set Default Target Framework when building for Debug and Release configurations. (Visual Studio) -->
2928
<When Condition="'$(TestTargetOS)' == ''">
3029
<PropertyGroup>
31-
<TargetFrameworks Condition="'$(TargetsWindows)' == 'true'">$(TargetNetFxVersion);$(TargetNetCoreVersion);$(TargetNetStandardVersion)</TargetFrameworks>
32-
<TargetFrameworks Condition="'$(TargetsUnix)' == 'true'">$(TargetNetCoreVersion);$(TargetNetStandardVersion)</TargetFrameworks>
30+
<TargetFrameworks Condition="'$(TargetsWindows)' == 'true'">$(TargetNetCoreVersion);$(TargetNetFxVersion)</TargetFrameworks>
31+
<TargetFrameworks Condition="'$(TargetsUnix)' == 'true'">$(TargetNetCoreVersion)</TargetFrameworks>
3332
</PropertyGroup>
3433
</When>
3534
<!-- Set Target Framework when TestTargetOS is not empty. (Command Line) -->
3635
<Otherwise>
3736
<PropertyGroup>
38-
<TargetFrameworks Condition="'$(TestTargetOS)' == 'Windowsnetstandard' OR '$(TestTargetOS)' == 'Unixnetstandard'">netstandard2.0;netstandard2.1</TargetFrameworks>
3937
<TargetFrameworks Condition="'$(TestTargetOS)' == 'Windowsnetcoreapp' OR '$(TestTargetOS)' == 'Unixnetcoreapp'">net6.0;net8.0</TargetFrameworks>
4038
<TargetFrameworks Condition="'$(TestTargetOS)' == 'Windowsnetfx'">net462</TargetFrameworks>
4139
</PropertyGroup>

src/Microsoft.Data.SqlClient/netcore/ref/Microsoft.Data.SqlClient.NetStandard.cs

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

src/Microsoft.Data.SqlClient/netcore/ref/Microsoft.Data.SqlClient.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -478,7 +478,7 @@ public static partial class SqlClientMetaDataCollectionNames
478478
/// <include file='../../../../doc/snippets/Microsoft.Data.SqlClient/SqlClientMetaDataCollectionNames.xml' path='docs/members[@name="SqlClientMetaDataCollectionNames"]/StructuredTypeMembers/*' />
479479
public static readonly string StructuredTypeMembers;
480480
}
481-
#if NETCOREAPP || NETSTANDARD2_1_OR_GREATER
481+
#if NETCOREAPP
482482
/// <include file='../../../../doc/snippets/Microsoft.Data.SqlClient/SqlConnectionAttestationProtocol.xml' path='docs/members[@name="SqlConnectionAttestationProtocol"]/SqlConnectionAttestationProtocol/*' />
483483
public enum SqlConnectionAttestationProtocol
484484
{
@@ -1017,7 +1017,7 @@ public SqlConnectionStringBuilder(string connectionString) { }
10171017
[System.ComponentModel.DisplayNameAttribute("Data Source")]
10181018
[System.ComponentModel.RefreshPropertiesAttribute(System.ComponentModel.RefreshProperties.All)]
10191019
public string DataSource { get { throw null; } set { } }
1020-
#if NETCOREAPP || NETSTANDARD2_1_OR_GREATER
1020+
#if NETCOREAPP
10211021
/// <include file='../../../../doc/snippets/Microsoft.Data.SqlClient/SqlConnectionStringBuilder.xml' path='docs/members[@name="SqlConnectionStringBuilder"]/AttestationProtocol/*' />
10221022
[System.ComponentModel.DisplayNameAttribute("Attestation Protocol")]
10231023
[System.ComponentModel.RefreshPropertiesAttribute(System.ComponentModel.RefreshProperties.All)]
Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,23 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
33
<EnableDefaultCompileItems>false</EnableDefaultCompileItems>
4-
<TargetFrameworks>net8.0;net6.0;netstandard2.0;netstandard2.1</TargetFrameworks>
5-
<TargetFrameworks Condition="$(ReferenceType)=='NetStandard' AND $(TargetNetStandardVersion)=='netstandard2.1'">netstandard2.1</TargetFrameworks>
4+
<TargetFrameworks>net6.0;net8.0</TargetFrameworks>
65
<IntermediateOutputPath>$(ObjFolder)$(Configuration)\$(AssemblyName)\ref\</IntermediateOutputPath>
76
<OutputPath>$(BinFolder)$(Configuration)\$(AssemblyName)\ref\</OutputPath>
87
<DocumentationFile>$(OutputPath)\$(TargetFramework)\Microsoft.Data.SqlClient.xml</DocumentationFile>
98
<Product>Core $(BaseProduct)</Product>
109
<Configurations>Debug;Release;</Configurations>
1110
<TargetGroup Condition="'$([MSBuild]::GetTargetFrameworkIdentifier($(TargetFramework)))'=='.NETCoreApp'">netcoreapp</TargetGroup>
12-
<TargetGroup Condition="'$([MSBuild]::GetTargetFrameworkIdentifier($(TargetFramework)))'=='.NETStandard'">netstandard</TargetGroup>
1311
<Platforms>AnyCPU;x64;x86</Platforms>
1412
</PropertyGroup>
1513
<ItemGroup>
1614
<Compile Include="Microsoft.Data.SqlClient.cs" />
1715
<Compile Include="Microsoft.Data.SqlClient.Manual.cs" />
18-
</ItemGroup>
19-
<ItemGroup Condition="'$([MSBuild]::GetTargetFrameworkIdentifier($(TargetFramework)))'=='.NETCoreApp'">
2016
<Compile Include="..\..\ref\Microsoft.Data.SqlClient.Batch.cs" />
2117
<Compile Include="..\..\ref\Microsoft.Data.SqlClient.Batch.NetCoreApp.cs" />
2218
</ItemGroup>
23-
<ItemGroup Condition="'$(TargetGroup)' == 'netstandard'">
24-
<Compile Include="Microsoft.Data.SqlClient.NetStandard.cs" />
25-
</ItemGroup>
26-
<ItemGroup Condition="'$(TargetGroup)' == 'netcoreapp'">
27-
<PackageReference Include="System.Security.Cryptography.Cng" Version="$(SystemSecurityCryptographyCngVersion)" />
28-
</ItemGroup>
2919
<ItemGroup>
20+
<PackageReference Include="System.Security.Cryptography.Cng" Version="$(SystemSecurityCryptographyCngVersion)" />
3021
<PackageReference Include="Microsoft.Identity.Client" Version="$(MicrosoftIdentityClientVersion)" />
3122
</ItemGroup>
3223
</Project>

0 commit comments

Comments
 (0)