Skip to content

Commit 080ef44

Browse files
committed
Remove netcoreapp2.1 support. Fixes #1067
1 parent 515378a commit 080ef44

File tree

9 files changed

+13
-40
lines changed

9 files changed

+13
-40
lines changed

.ci/build-steps.yml

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -46,18 +46,6 @@ steps:
4646
artifactName: 'Conformance.Tests-6.0-$(Agent.OS)'
4747
targetPath: 'tests/Conformance.Tests/bin/Release/net6.0/publish'
4848

49-
- task: DotNetCoreCLI@2
50-
displayName: 'Publish SideBySide (2.1)'
51-
inputs:
52-
command: 'publish'
53-
arguments: '-c Release -f netcoreapp2.1 --no-build tests/SideBySide/SideBySide.csproj'
54-
publishWebProjects: false
55-
zipAfterPublish: false
56-
- task: PublishPipelineArtifact@0
57-
inputs:
58-
artifactName: 'SideBySide-netcoreapp2.1-$(Agent.OS)'
59-
targetPath: 'tests/SideBySide/bin/Release/netcoreapp2.1/publish'
60-
6149
- task: DotNetCoreCLI@2
6250
displayName: 'Publish SideBySide (3.1)'
6351
inputs:

.ci/integration-tests-steps.yml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,6 @@ parameters:
66
steps:
77
- bash: ${{ format('.ci/docker-run.sh {0} 3300 {1}', parameters.image, parameters.unsupportedFeatures) }}
88
displayName: 'Start Docker container'
9-
- template: 'sidebyside-test-steps.yml'
10-
parameters:
11-
image: ${{ parameters.image }}
12-
unsupportedFeatures: ${{ parameters.unsupportedFeatures }}
13-
connectionString: 'server=localhost;port=3300;user id=mysqltest;password=test;database=mysqltest;ssl mode=none;DefaultCommandTimeout=3600'
14-
platform: 'netcoreapp2.1'
15-
description: 'No SSL'
169
- task: UseDotNet@2
1710
displayName: 'Install .NET Core 3.1'
1811
inputs:

.ci/test.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ if ($LASTEXITCODE -ne 0){
3939

4040
echo "Executing tests with Compression, No SSL"
4141
Copy-Item -Force ..\..\.ci\config\config.compression.json config.json
42-
dotnet test -c Release -f netcoreapp2.1
42+
dotnet test -c Release -f netcoreapp3.1
4343
if ($LASTEXITCODE -ne 0){
4444
exit $LASTEXITCODE;
4545
}

azure-pipelines.yml

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -90,11 +90,6 @@ jobs:
9090
vmimage: 'windows-latest'
9191
steps:
9292
- template: '.ci/install-mysql-windows.yml'
93-
- task: UseDotNet@2
94-
displayName: 'Install .NET Core 2.1'
95-
inputs:
96-
version: '2.1.x'
97-
packageType: runtime
9893
- task: UseDotNet@2
9994
displayName: 'Install .NET Core 3.1'
10095
inputs:
@@ -163,9 +158,9 @@ jobs:
163158
steps:
164159
- template: '.ci/install-mysql-windows.yml'
165160
- task: UseDotNet@2
166-
displayName: 'Install .NET Core 2.1'
161+
displayName: 'Install .NET Core 3.1'
167162
inputs:
168-
version: '2.1.x'
163+
version: 3.1.x
169164
packageType: runtime
170165
- task: UseDotNet@2
171166
displayName: 'Install .NET Core'
@@ -177,18 +172,18 @@ jobs:
177172
displayName: 'Remove target frameworks'
178173
inputs:
179174
targetType: 'inline'
180-
script: '((Get-Content .\tests\SideBySide\SideBySide.csproj -Raw) -replace(''<TargetFrameworks>.*</TargetFrameworks>'', ''<TargetFrameworks>netcoreapp2.1;netcoreapp3.1</TargetFrameworks>'')) | Set-Content .\tests\SideBySide\SideBySide.csproj'
175+
script: '((Get-Content .\tests\SideBySide\SideBySide.csproj -Raw) -replace(''<TargetFrameworks>.*</TargetFrameworks>'', ''<TargetFrameworks>netcoreapp3.1;net6.0</TargetFrameworks>'')) | Set-Content .\tests\SideBySide\SideBySide.csproj'
181176
- task: DotNetCoreCLI@2
182177
displayName: 'Restore packages'
183178
inputs:
184179
command: 'restore'
185180
- task: DotNetCoreCLI@2
186-
displayName: 'Side by Side tests (netcoreapp2.1/netcoreapp3.1)'
181+
displayName: 'Side by Side tests (netcoreapp3.1/net6.0)'
187182
inputs:
188183
command: 'test'
189184
projects: 'tests/SideBySide/SideBySide.csproj'
190-
arguments: '-c Release -f netcoreapp2.1 --no-restore'
191-
testRunTitle: ${{ format('{0}, $(Agent.OS), {1}, {2}', 'mysql:8.0', 'netcoreapp2.1/netcoreapp3.1', 'No SSL') }}
185+
arguments: '-c Release --no-restore'
186+
testRunTitle: ${{ format('{0}, $(Agent.OS), {1}, {2}', 'mysql:8.0', 'netcoreapp3.1/net6.0', 'No SSL') }}
192187
env:
193188
DATA__UNSUPPORTEDFEATURES: 'Ed25519,Tls11,UnixDomainSocket'
194189
DATA__CONNECTIONSTRING: 'server=localhost;port=3306;user id=mysqltest;password=test;database=mysqltest;ssl mode=none;DefaultCommandTimeout=3600;AllowPublicKeyRetrieval=True'

src/MySqlConnector/MySqlConnector.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFrameworks>net45;net461;net471;netstandard2.0;netstandard2.1;netcoreapp2.1;netcoreapp3.1;net5.0;net6.0</TargetFrameworks>
4+
<TargetFrameworks>net45;net461;net471;netstandard2.0;netstandard2.1;netcoreapp3.1;net5.0;net6.0</TargetFrameworks>
55
<Description>A truly async MySQL ADO.NET provider, supporting MySQL Server, MariaDB, Percona Server, Amazon Aurora, Azure Database for MySQL and more.</Description>
66
<Copyright>Copyright 2016–2021 Bradley Grainger</Copyright>
77
<Authors>Bradley Grainger</Authors>
@@ -26,7 +26,7 @@
2626
<PackageReference Include="System.Threading.Tasks.Extensions" Version="4.3.0" />
2727
</ItemGroup>
2828

29-
<ItemGroup Condition=" '$(TargetFramework)' == 'net45' OR '$(TargetFramework)' == 'net461' OR '$(TargetFramework)' == 'net471' OR '$(TargetFramework)' == 'netstandard2.0' OR '$(TargetFramework)' == 'netstandard2.1' OR '$(TargetFramework)' == 'netcoreapp2.1' OR '$(TargetFramework)' == 'netcoreapp3.1' ">
29+
<ItemGroup Condition=" '$(TargetFramework)' == 'net45' OR '$(TargetFramework)' == 'net461' OR '$(TargetFramework)' == 'net471' OR '$(TargetFramework)' == 'netstandard2.0' OR '$(TargetFramework)' == 'netstandard2.1' OR '$(TargetFramework)' == 'netcoreapp3.1' ">
3030
<PackageReference Include="System.Diagnostics.DiagnosticSource" Version="5.0.1" />
3131
</ItemGroup>
3232

tests/SideBySide/AppConfig.cs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,6 @@ private static IConfiguration BuildConfiguration()
1919
{
2020
var builder = new ConfigurationBuilder()
2121
.AddInMemoryCollection(DefaultConfig)
22-
#if NETCOREAPP2_1
23-
.SetBasePath(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location))
24-
#endif
2522
.AddJsonFile("config.json")
2623
.AddEnvironmentVariables();
2724
return builder.Build();

tests/SideBySide/SideBySide.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

33
<PropertyGroup Condition=" '$(Configuration)' != 'Baseline' ">
4-
<TargetFrameworks>net452;net461;net472;netcoreapp2.1;netcoreapp3.1;net5.0;net6.0</TargetFrameworks>
4+
<TargetFrameworks>net452;net461;net472;netcoreapp3.1;net5.0;net6.0</TargetFrameworks>
55
<CheckEolTargetFramework>false</CheckEolTargetFramework>
66
</PropertyGroup>
77

tests/SideBySide/SslTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ public async Task ConnectSslTlsVersion()
224224
var expectedProtocolString = expectedProtocol == SslProtocols.Tls12 ? "TLSv1.2" :
225225
expectedProtocol == SslProtocols.Tls11 ? "TLSv1.1" : "TLSv1";
226226

227-
#if !NET452 && !NET461 && !NET472 && !NETCOREAPP2_1
227+
#if !NET452 && !NET461 && !NET472
228228
// https://docs.microsoft.com/en-us/dotnet/core/whats-new/dotnet-core-3-0#tls-13--openssl-111-on-linux
229229
if (expectedProtocol == SslProtocols.Tls12 && AppConfig.SupportedFeatures.HasFlag(ServerFeatures.Tls13) && RuntimeInformation.IsOSPlatform(OSPlatform.Linux))
230230
{

tests/SideBySide/Transaction.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ public async Task ReadWriteTransactionAsync()
169169
Assert.Equal(new[] { 1, 2 }, results);
170170
}
171171

172-
#if !NET452 && !NET461 && !NET472 && !NETCOREAPP2_1
172+
#if !NET452 && !NET461 && !NET472
173173
[Fact]
174174
public async Task DbConnectionCommitAsync()
175175
{
@@ -241,7 +241,7 @@ public async Task RollbackDisposeAsync()
241241
Assert.Equal(new int[0], results);
242242
}
243243

244-
#if !NET452 && !NET461 && !NET472 && !NETCOREAPP2_1
244+
#if !NET452 && !NET461 && !NET472
245245
[Fact]
246246
public async Task DbConnectionRollbackAsync()
247247
{

0 commit comments

Comments
 (0)