Skip to content

Commit e66e1b9

Browse files
Drop .NET Core 2.1 (Out of support) (#1272)
1 parent 5755d56 commit e66e1b9

13 files changed

+25
-103
lines changed

BUILDGUIDE.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ msbuild -t:BuildNetCoreAllOS
6464

6565
```bash
6666
msbuild -t:BuildTestsNetCore
67-
# Build the tests for the .NET Core driver in 'Debug' Configuration. Default .NET Core version is 2.1.
67+
# Build the tests for the .NET Core driver in 'Debug' Configuration. Default .NET Core version is 3.1.
6868
```
6969

7070
```bash
@@ -220,7 +220,7 @@ msbuild -t:BuildTestsNetFx -p:TargetNetFxVersion=net462
220220
```bash
221221
msbuild -t:BuildTestsNetCore -p:TargetNetCoreVersion=netcoreapp3.1
222222
# Build the tests for custom TargetFramework (.NET Core)
223-
# Applicable values: netcoreapp2.1 | netcoreapp2.2 | netcoreapp3.1 | net5.0
223+
# Applicable values: netcoreapp3.1 | net5.0 | net6.0
224224
```
225225

226226
### Running Tests:
@@ -232,7 +232,7 @@ dotnet test -p:TargetNetFxVersion=net462 ...
232232

233233
dotnet test -p:TargetNetCoreVersion=netcoreapp3.1 ...
234234
# Use above property to run Functional Tests with custom TargetFramework (.NET Core)
235-
# Applicable values: netcoreapp2.1 | netcoreapp2.2 | netcoreapp3.1 | net5.0
235+
# Applicable values: netcoreapp3.1 | net5.0 | net6.0
236236
```
237237

238238
## Using Managed SNI on Windows

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ Microsoft.Data.SqlClient is a data provider for Microsoft SQL Server and Azure S
1313
The Microsoft.Data.SqlClient package supports the below environments:
1414

1515
- .NET Framework 4.6.1+
16-
- .NET Core 2.1+
17-
- .NET Standard 2.0+.
16+
- .NET Core 3.1+
17+
- .NET Standard 2.0+
1818

1919
The source code of this library is now available under the MIT license.
2020

RunTests.cmd

Lines changed: 0 additions & 32 deletions
Large diffs are not rendered by default.

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

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,7 @@
1818
<PropertyGroup>
1919
<TargetNetFxVersion Condition="'$(TargetNetFxVersion)' == ''">net461</TargetNetFxVersion>
2020
<TargetNetStandardVersion Condition="'$(TargetNetStandardVersion)' == ''">netstandard2.0</TargetNetStandardVersion>
21-
<TargetNetCoreVersion Condition="'$(ReferenceType)' == 'NetStandard' AND $(TargetNetStandardVersion)=='netstandard2.1'">netcoreapp3.1</TargetNetCoreVersion>
22-
<TargetNetCoreVersion Condition="'$(TargetNetCoreVersion)' == ''">netcoreapp2.1</TargetNetCoreVersion>
21+
<TargetNetCoreVersion Condition="'$(TargetNetCoreVersion)' == ''">netcoreapp3.1</TargetNetCoreVersion>
2322
</PropertyGroup>
2423

2524
<ItemGroup>
@@ -37,8 +36,7 @@
3736
<Otherwise>
3837
<PropertyGroup>
3938
<TargetFrameworks Condition="'$(TestTargetOS)' == 'Windowsnetstandard' OR '$(TestTargetOS)' == 'Unixnetstandard'">netstandard2.0;netstandard2.1</TargetFrameworks>
40-
<TargetFrameworks Condition="'$(TestTargetOS)' == 'Windowsnetcoreapp' OR '$(TestTargetOS)' == 'Unixnetcoreapp'">netcoreapp2.1</TargetFrameworks>
41-
<TargetFrameworks Condition="('$(TestTargetOS)' == 'Windowsnetcoreapp' OR '$(TestTargetOS)' == 'Unixnetcoreapp') AND ($(ReferenceType)=='NetStandard' AND $(TargetNetStandardVersion)=='netstandard2.1')">netcoreapp3.1</TargetFrameworks>
39+
<TargetFrameworks Condition="'$(TestTargetOS)' == 'Windowsnetcoreapp' OR '$(TestTargetOS)' == 'Unixnetcoreapp'">netcoreapp3.1</TargetFrameworks>
4240
<TargetFrameworks Condition="'$(TestTargetOS)' == 'Windowsnetfx'">net461</TargetFrameworks>
4341
</PropertyGroup>
4442
</Otherwise>

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
33
<EnableDefaultCompileItems>false</EnableDefaultCompileItems>
4-
<TargetFrameworks>netcoreapp2.1;netcoreapp3.1;netstandard2.0;netstandard2.1</TargetFrameworks>
4+
<TargetFrameworks>netcoreapp3.1;netstandard2.0;netstandard2.1</TargetFrameworks>
55
<TargetFrameworks Condition="$(ReferenceType)=='NetStandard' AND $(TargetNetStandardVersion)=='netstandard2.1'">netstandard2.1</TargetFrameworks>
66
<IntermediateOutputPath>$(ObjFolder)$(Configuration)\$(AssemblyName)\ref\</IntermediateOutputPath>
77
<OutputPath>$(BinFolder)$(Configuration)\$(AssemblyName)\ref\</OutputPath>

src/Microsoft.Data.SqlClient/netcore/src/Microsoft.Data.SqlClient.csproj

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
33
<AssemblyName>Microsoft.Data.SqlClient</AssemblyName>
4-
<TargetFrameworks>netcoreapp2.1;netcoreapp3.1;netstandard2.0;netstandard2.1</TargetFrameworks>
4+
<TargetFrameworks>netcoreapp3.1;netstandard2.0;netstandard2.1</TargetFrameworks>
55
<TargetFrameworks Condition="$(ReferenceType)=='NetStandard' AND $(TargetNetStandardVersion)=='netstandard2.1'">netstandard2.1</TargetFrameworks>
66
<GeneratePlatformNotSupportedAssemblyMessage Condition="'$(OSGroup)' == 'AnyOS'">Microsoft.Data.SqlClient is not supported on this platform.</GeneratePlatformNotSupportedAssemblyMessage>
77
<OSGroup Condition="'$(OSGroup)' == ''">$(OS)</OSGroup>
@@ -381,8 +381,8 @@
381381
<Link>Microsoft\Data\SqlClient\VirtualSecureModeEnclaveProviderBase.cs</Link>
382382
</Compile>
383383
</ItemGroup>
384-
<!-- netcoreapp 3.1 & netstandard 2.1 and above -->
385-
<ItemGroup Condition="'$(OSGroup)' != 'AnyOS' AND '$(TargetFramework)' != 'netcoreapp2.1' AND '$(TargetFramework)' != 'netstandard2.0'">
384+
<!-- netstandard 2.1 and above -->
385+
<ItemGroup Condition="'$(OSGroup)' != 'AnyOS' AND '$(TargetFramework)' != 'netstandard2.0'">
386386
<Compile Include="Microsoft\Data\SqlClient\SqlClientEventSource.NetCoreApp.cs" />
387387
</ItemGroup>
388388
<ItemGroup Condition="'$(OSGroup)' != 'AnyOS' AND '$(TargetGroup)' == 'netcoreapp'">
@@ -395,8 +395,7 @@
395395
<Compile Include="Microsoft\Data\SqlClient\SNI\SslOverTdsStream.NetCoreApp.cs" />
396396
<Compile Include="Microsoft\Data\SqlClient\SqlConnectionFactory.AssemblyLoadContext.cs" />
397397
<Compile Include="Microsoft\Data\SqlClient\SqlDependencyUtils.AssemblyLoadContext.cs" />
398-
<Compile Condition="$(TargetFramework.StartsWith('netcoreapp2.'))" Include="Microsoft\Data\SqlClient\SNI\SNIStreams.Task.cs" />
399-
<Compile Condition="!$(TargetFramework.StartsWith('netcoreapp2.'))" Include="Microsoft\Data\SqlClient\SNI\SNIStreams.ValueTask.cs" />
398+
<Compile Include="Microsoft\Data\SqlClient\SNI\SNIStreams.ValueTask.cs" />
400399
</ItemGroup>
401400
<ItemGroup Condition="'$(OSGroup)' != 'AnyOS' AND '$(TargetFramework)' != 'netstandard2.0' AND '$(BuildSimulator)' == 'true'">
402401
<Compile Include="Microsoft\Data\SqlClient\SimulatorEnclaveProvider.NetCoreApp.cs" />

src/Microsoft.Data.SqlClient/tests/Directory.Build.props

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,7 @@
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)' == ''">net461</TargetNetFxVersion>
20-
<TargetNetCoreVersion Condition="'$(ReferenceType)' == 'NetStandard' AND $(TargetNetStandardVersion)=='netstandard2.1'">netcoreapp3.1</TargetNetCoreVersion>
21-
<TargetNetCoreVersion Condition="'$(TargetNetCoreVersion)' == ''">netcoreapp2.1</TargetNetCoreVersion>
20+
<TargetNetCoreVersion Condition="'$(TargetNetCoreVersion)' == ''">netcoreapp3.1</TargetNetCoreVersion>
2221
</PropertyGroup>
2322

2423
<Choose>

src/Microsoft.Data.SqlClient/tests/FunctionalTests/Microsoft.Data.SqlClient.Tests.csproj

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -64,12 +64,9 @@
6464
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="$(MicrosoftNETTestSdkVersion)" />
6565
<PackageReference Include="System.Diagnostics.DiagnosticSource" Version="$(SystemDiagnosticsDiagnosticSourceVersion)" />
6666
<PackageReference Include="Newtonsoft.Json" Version="$(NewtonsoftJsonVersion)" />
67-
<Reference Condition="'$(TargetGroup)'=='netfx' OR '$(TargetFramework)'=='netcoreapp2.1'" Include="System.Transactions" />
67+
<Reference Condition="'$(TargetGroup)'=='netfx'" Include="System.Transactions" />
6868
</ItemGroup>
69-
<ItemGroup Condition="'$(TargetFramework)' == 'netcoreapp2.1'">
70-
<PackageReference Include="System.Data.Odbc" Version="$(SystemDataOdbcVersion21)" />
71-
</ItemGroup>
72-
<ItemGroup Condition="'$(TargetFramework)' != 'netcoreapp2.1' AND '$(TargetGroup)' == 'netcoreapp'">
69+
<ItemGroup Condition="'$(TargetGroup)' == 'netcoreapp'">
7370
<PackageReference Include="System.Data.Odbc" Version="$(SystemDataOdbcVersion)" />
7471
</ItemGroup>
7572
<ItemGroup Condition="$(TargetFramework.StartsWith('netcoreapp'))">

src/Microsoft.Data.SqlClient/tests/ManualTests/Microsoft.Data.SqlClient.ManualTesting.Tests.csproj

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -250,9 +250,6 @@
250250
<ItemGroup Condition="'$(TargetGroup)'=='netcoreapp'">
251251
<Compile Include="TracingTests\DiagnosticTest.cs" />
252252
<Compile Include="TracingTests\FakeDiagnosticListenerObserver.cs" />
253-
</ItemGroup>
254-
<!--.Net core 3.0 & .Net standard 2.1 and above-->
255-
<ItemGroup Condition="'$(TargetGroup)'=='netcoreapp' AND !$(TargetFramework.StartsWith('netcoreapp2'))">
256253
<Compile Include="TracingTests\EventCounterTest.cs" />
257254
</ItemGroup>
258255
<ItemGroup>

tools/GenAPI/Microsoft.DotNet.GenAPI/Microsoft.DotNet.GenAPI.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
<PropertyGroup>
44
<OutputType>Exe</OutputType>
5-
<TargetFrameworks>net472;netcoreapp2.1</TargetFrameworks>
5+
<TargetFrameworks>net472;netcoreapp3.1</TargetFrameworks>
66
<ExcludeFromSourceBuild>true</ExcludeFromSourceBuild>
77
<PackageType>MSBuildSdk</PackageType>
88
<IncludeBuildOutput>false</IncludeBuildOutput>

0 commit comments

Comments
 (0)