Skip to content

Commit 1fc7c7c

Browse files
authored
CSHARP-4916: Remove .netstandard 2.0 support (#1443)
1 parent aff1fa3 commit 1fc7c7c

File tree

28 files changed

+19
-981
lines changed

28 files changed

+19
-981
lines changed

build.cake

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,6 @@ Task("Test")
140140
.DeferOnError();
141141

142142
Task("TestNet472").IsDependentOn("Test");
143-
Task("TestNetStandard20").IsDependentOn("Test");
144143
Task("TestNetStandard21").IsDependentOn("Test");
145144
Task("TestNet60").IsDependentOn("Test");
146145

@@ -200,7 +199,6 @@ Task("TestGssapi")
200199
RunTests(buildConfig, testProject, filter: "Category=\"GssapiMechanism\""));
201200

202201
Task("TestGssapiNet472").IsDependentOn("TestGssapi");
203-
Task("TestGssapiNetStandard20").IsDependentOn("TestGssapi");
204202
Task("TestGssapiNetStandard21").IsDependentOn("TestGssapi");
205203
Task("TestGssapiNet60").IsDependentOn("TestGssapi");
206204

@@ -219,7 +217,6 @@ Task("TestServerless")
219217
RunTests(buildConfig, testProject, filter: "Category=\"Serverless\""));
220218

221219
Task("TestServerlessNet472").IsDependentOn("TestServerless");
222-
Task("TestServerlessNetStandard20").IsDependentOn("TestServerless");
223220
Task("TestServerlessNetStandard21").IsDependentOn("TestServerless");
224221
Task("TestServerlessNet60").IsDependentOn("TestServerless");
225222

@@ -230,7 +227,6 @@ Task("TestLoadBalanced")
230227
action: (BuildConfig buildConfig, Path testProject) =>
231228
RunTests(buildConfig, testProject, filter: "Category=\"SupportLoadBalancing\""));
232229

233-
Task("TestLoadBalancedNetStandard20").IsDependentOn("TestLoadBalanced");
234230
Task("TestLoadBalancedNetStandard21").IsDependentOn("TestLoadBalanced");
235231
Task("TestLoadBalancedNet60").IsDependentOn("TestLoadBalanced");
236232

@@ -242,7 +238,6 @@ Task("TestCsfleWithMockedKms")
242238
RunTests(buildConfig, testProject, filter: "Category=\"CSFLE\""));
243239

244240
Task("TestCsfleWithMockedKmsNet472").IsDependentOn("TestCsfleWithMockedKms");
245-
Task("TestCsfleWithMockedKmsNetStandard20").IsDependentOn("TestCsfleWithMockedKms");
246241
Task("TestCsfleWithMockedKmsNetStandard21").IsDependentOn("TestCsfleWithMockedKms");
247242
Task("TestCsfleWithMockedKmsNet60").IsDependentOn("TestCsfleWithMockedKms");
248243

@@ -254,7 +249,6 @@ Task("TestCsfleWithMongocryptd")
254249
RunTests(buildConfig, testProject, filter: "Category=\"CSFLE\""));
255250

256251
Task("TestCsfleWithMongocryptdNet472").IsDependentOn("TestCsfleWithMongocryptd");
257-
Task("TestCsfleWithMongocryptdNetStandard20").IsDependentOn("TestCsfleWithMongocryptd");
258252
Task("TestCsfleWithMongocryptdNetStandard21").IsDependentOn("TestCsfleWithMongocryptd");
259253
Task("TestCsfleWithMongocryptdNet60").IsDependentOn("TestCsfleWithMongocryptd");
260254

@@ -602,7 +596,6 @@ Setup<BuildConfig>(
602596
var framework = targetPlatform == "arm64" ? "net6.0" : lowerTarget switch
603597
{
604598
string s when s.EndsWith("net472") => "net472",
605-
string s when s.EndsWith("netstandard20") || s.EndsWith("netcoreapp21") => "netcoreapp2.1",
606599
string s when s.EndsWith("netstandard21") || s.EndsWith("netcoreapp31") => "netcoreapp3.1",
607600
string s when s.EndsWith("net472") => "net472",
608601
string s when s.EndsWith("net50") => "net5.0",

evergreen/evergreen.yml

Lines changed: 2 additions & 77 deletions
Original file line numberDiff line numberDiff line change
@@ -1149,13 +1149,6 @@ tasks:
11491149
vars:
11501150
FRAMEWORK: net472
11511151

1152-
- name: test-netstandard20
1153-
commands:
1154-
- func: bootstrap-mongo-orchestration
1155-
- func: run-tests
1156-
vars:
1157-
FRAMEWORK: netstandard20
1158-
11591152
- name: test-netstandard21
11601153
commands:
11611154
- func: bootstrap-mongo-orchestration
@@ -1170,13 +1163,6 @@ tasks:
11701163
vars:
11711164
FRAMEWORK: net472
11721165

1173-
- name: test-csfle-with-mongocryptd-netstandard20
1174-
commands:
1175-
- func: bootstrap-mongo-orchestration
1176-
- func: run-csfle-with-mongocryptd-tests
1177-
vars:
1178-
FRAMEWORK: netstandard20
1179-
11801166
- name: test-csfle-with-mongocryptd-netstandard21
11811167
commands:
11821168
- func: bootstrap-mongo-orchestration
@@ -1195,17 +1181,6 @@ tasks:
11951181
vars:
11961182
FRAMEWORK: net472
11971183

1198-
- name: test-csfle-with-mocked-kms-tls-netstandard20
1199-
commands:
1200-
- func: start-kms-mock-servers
1201-
- func: start-kms-mock-kmip-server
1202-
- func: start-kms-mock-gcp-server
1203-
- func: start-kms-mock-azure-imds-server
1204-
- func: bootstrap-mongo-orchestration
1205-
- func: run-csfle-with-mocked-kms-tests
1206-
vars:
1207-
FRAMEWORK: netstandard20
1208-
12091184
- name: test-csfle-with-mocked-kms-tls-netstandard21
12101185
commands:
12111186
- func: start-kms-mock-servers
@@ -1217,17 +1192,6 @@ tasks:
12171192
vars:
12181193
FRAMEWORK: netstandard21
12191194

1220-
- name: test-load-balancer-netstandard20
1221-
commands:
1222-
- func: bootstrap-mongo-orchestration
1223-
vars:
1224-
LOAD_BALANCER: 'true'
1225-
- func: run-load-balancer
1226-
- func: run-load-balancer-tests
1227-
vars:
1228-
FRAMEWORK: netstandard20
1229-
- func: stop-load-balancer
1230-
12311195
- name: test-load-balancer-netstandard21
12321196
commands:
12331197
- func: bootstrap-mongo-orchestration
@@ -1254,12 +1218,6 @@ tasks:
12541218
vars:
12551219
FRAMEWORK: net472
12561220

1257-
- name: test-gssapi-netstandard20
1258-
commands:
1259-
- func: run-gssapi-auth-tests
1260-
vars:
1261-
FRAMEWORK: netstandard20
1262-
12631221
- name: test-gssapi-netstandard21
12641222
commands:
12651223
- func: run-gssapi-auth-tests
@@ -1298,16 +1256,6 @@ tasks:
12981256
FRAMEWORK: net472
12991257
REQUIRE_API_VERSION: true
13001258

1301-
- name: stable-api-tests-netstandard20
1302-
commands:
1303-
- func: bootstrap-mongo-orchestration
1304-
vars:
1305-
REQUIRE_API_VERSION: true
1306-
- func: run-tests
1307-
vars:
1308-
FRAMEWORK: netstandard20
1309-
REQUIRE_API_VERSION: true
1310-
13111259
- name: stable-api-tests-netstandard21
13121260
commands:
13131261
- func: bootstrap-mongo-orchestration
@@ -2083,10 +2031,6 @@ axes:
20832031
display_name: net472
20842032
variables:
20852033
FRAMEWORK: net472
2086-
- id: "netstandard20"
2087-
display_name: netstandard20
2088-
variables:
2089-
FRAMEWORK: netstandard20
20902034
- id: "netstandard21"
20912035
display_name: netstandard21
20922036
variables:
@@ -2393,7 +2337,6 @@ buildvariants:
23932337
tags: ["tests-variant"]
23942338
tasks:
23952339
- name: test-net472
2396-
- name: test-netstandard20
23972340
- name: test-netstandard21
23982341

23992342
- matrix_name: "secure-tests-macOS"
@@ -2408,15 +2351,13 @@ buildvariants:
24082351
display_name: "${version} ${topology} ${auth} ${ssl} ${os}"
24092352
tags: ["tests-variant"]
24102353
tasks:
2411-
- name: test-netstandard20
24122354
- name: test-netstandard21
24132355

24142356
- matrix_name: "secure-tests-linux-2004"
24152357
matrix_spec: { version: ["7.0", "8.0", "rapid", "latest"], topology: "*", auth: "auth", ssl: "ssl", os: "ubuntu-2004" }
24162358
display_name: "${version} ${topology} ${auth} ${ssl} ${os}"
24172359
tags: ["tests-variant"]
24182360
tasks:
2419-
- name: test-netstandard20
24202361
- name: test-netstandard21
24212362

24222363
# Unsecure tests
@@ -2426,7 +2367,6 @@ buildvariants:
24262367
tags: ["tests-variant"]
24272368
tasks:
24282369
- name: test-net472
2429-
- name: test-netstandard20
24302370
- name: test-netstandard21
24312371

24322372
- matrix_name: "unsecure-tests-macOS"
@@ -2441,15 +2381,13 @@ buildvariants:
24412381
display_name: "${version} ${topology} ${auth} ${ssl} ${os}"
24422382
tags: ["tests-variant"]
24432383
tasks:
2444-
- name: test-netstandard20
24452384
- name: test-netstandard21
24462385

24472386
- matrix_name: "unsecure-tests-linux-2004"
24482387
matrix_spec: { version: ["7.0", "8.0", "rapid", "latest"], topology: "*", auth: "noauth", ssl: "nossl", os: "ubuntu-2004" }
24492388
display_name: "${version} ${topology} ${auth} ${ssl} ${os}"
24502389
tags: ["tests-variant"]
24512390
tasks:
2452-
- name: test-netstandard20
24532391
- name: test-netstandard21
24542392

24552393
# Compression tests
@@ -2459,7 +2397,6 @@ buildvariants:
24592397
tags: ["tests-variant"]
24602398
tasks:
24612399
- name: test-net472
2462-
- name: test-netstandard20
24632400
- name: test-netstandard21
24642401

24652402
- matrix_name: "tests-compression-macOS"
@@ -2474,15 +2411,13 @@ buildvariants:
24742411
display_name: "${version} ${compressor} ${topology} ${auth} ${ssl} ${os} "
24752412
tags: ["tests-variant"]
24762413
tasks:
2477-
- name: test-netstandard20
24782414
- name: test-netstandard21
24792415

24802416
- matrix_name: "tests-compression-linux-2004"
24812417
matrix_spec: { compressor: "*", auth: "noauth", ssl: "nossl", version: ["7.0", "8.0", "rapid", "latest"], topology: "standalone", os: "ubuntu-2004" }
24822418
display_name: "${version} ${compressor} ${topology} ${auth} ${ssl} ${os} "
24832419
tags: ["tests-variant"]
24842420
tasks:
2485-
- name: test-netstandard20
24862421
- name: test-netstandard21
24872422

24882423
# Auth tests
@@ -2546,42 +2481,38 @@ buildvariants:
25462481
display_name: "GSSAPI (Kerberos) Auth tests - Windows"
25472482
tasks:
25482483
- name: test-gssapi-net472
2549-
- name: test-gssapi-netstandard20
25502484
- name: test-gssapi-netstandard21
25512485

25522486
- name: gssapi-auth-tests-linux
25532487
run_on:
25542488
- ubuntu1804-test
25552489
display_name: "GSSAPI (Kerberos) Auth tests - Linux"
25562490
tasks:
2557-
- name: test-gssapi-netstandard20
25582491
- name: test-gssapi-netstandard21
25592492

25602493
# Load balancer tests
25612494
- matrix_name: load-balancer-tests
25622495
matrix_spec: { version: ["5.0", "6.0", "7.0", "8.0", "rapid", "latest"], auth: "noauth", ssl: "nossl", topology: "sharded-cluster", os: "ubuntu-2004" }
25632496
display_name: "Load Balancer ${version} ${auth} ${ssl} ${os}"
25642497
tasks:
2565-
- name: "test-load-balancer-netstandard20"
25662498
- name: "test-load-balancer-netstandard21"
25672499

25682500
- matrix_name: load-balancer-tests-secure
25692501
matrix_spec: { version: ["5.0", "6.0", "7.0", "8.0", "rapid", "latest"], auth: "auth", ssl: "ssl", topology: "sharded-cluster", os: "ubuntu-2004" }
25702502
display_name: "Load Balancer ${version} ${auth} ${ssl} ${os}"
25712503
tasks:
2572-
- name: "test-load-balancer-netstandard20"
25732504
- name: "test-load-balancer-netstandard21"
25742505

25752506
# Serverless tests
25762507
- matrix_name: serverless-tests-windows
2577-
matrix_spec: { auth: "auth", ssl: "ssl", compressor: "zlib", os: "windows-64", target_framework: ["net472", "netstandard20", "netstandard21"], serverless: "*" }
2508+
matrix_spec: { auth: "auth", ssl: "ssl", compressor: "zlib", os: "windows-64", target_framework: ["net472", "netstandard21"], serverless: "*" }
25782509
display_name: "${serverless} ${compressor} ${auth} ${ssl} ${os} ${target_framework}"
25792510
batchtime: 10080 # 7 days
25802511
tasks:
25812512
- name: serverless-task-group
25822513

25832514
- matrix_name: serverless-tests-ubuntu
2584-
matrix_spec: { auth: "auth", ssl: "ssl", compressor: "zlib", os: "ubuntu-2004", target_framework: ["netstandard20", "netstandard21"], serverless: "*" }
2515+
matrix_spec: { auth: "auth", ssl: "ssl", compressor: "zlib", os: "ubuntu-2004", target_framework: ["netstandard21"], serverless: "*" }
25852516
display_name: "${serverless} ${compressor} ${auth} ${ssl} ${os} ${target_framework}"
25862517
batchtime: 10080 # 7 days
25872518
tasks:
@@ -2638,28 +2569,22 @@ buildvariants:
26382569
display_name: "CSFLE Mocked KMS ${version} ${os}"
26392570
tasks:
26402571
- name: test-csfle-with-mocked-kms-tls-net472
2641-
- name: test-csfle-with-mocked-kms-tls-netstandard20
26422572
- name: test-csfle-with-mocked-kms-tls-netstandard21
26432573
- name: test-csfle-with-mongocryptd-net472
2644-
- name: test-csfle-with-mongocryptd-netstandard20
26452574
- name: test-csfle-with-mongocryptd-netstandard21
26462575

26472576
- matrix_name: "csfle-with-mocked-kms-tests-linux-1804"
26482577
matrix_spec: { os: "ubuntu-1804", ssl: "nossl", version: ["4.2", "4.4", "5.0", "6.0"], topology: ["replicaset"] }
26492578
display_name: "CSFLE Mocked KMS ${version} ${os}"
26502579
tasks:
2651-
- name: test-csfle-with-mocked-kms-tls-netstandard20
26522580
- name: test-csfle-with-mocked-kms-tls-netstandard21
2653-
- name: test-csfle-with-mongocryptd-netstandard20
26542581
- name: test-csfle-with-mongocryptd-netstandard21
26552582

26562583
- matrix_name: "csfle-with-mocked-kms-tests-linux-2004"
26572584
matrix_spec: { os: "ubuntu-2004", ssl: "nossl", version: ["7.0", "8.0", "rapid", "latest"], topology: ["replicaset"] }
26582585
display_name: "CSFLE Mocked KMS ${version} ${os}"
26592586
tasks:
2660-
- name: test-csfle-with-mocked-kms-tls-netstandard20
26612587
- name: test-csfle-with-mocked-kms-tls-netstandard21
2662-
- name: test-csfle-with-mongocryptd-netstandard20
26632588
- name: test-csfle-with-mongocryptd-netstandard21
26642589

26652590
- matrix_name: "csfle-with-mocked-kms-tests-macOS"

evergreen/run-tests.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ set -o errexit # Exit the script with error if any of the commands fail
1414
# OCSP_TLS_SHOULD_SUCCEED Set to test OCSP. Values are true/false/nil
1515
# MONGODB_X509_CLIENT_P12_PATH Absolute path to client certificate in p12 format
1616
# MONGO_X509_CLIENT_CERTIFICATE_PASSWORD password for client certificate
17-
# FRAMEWORK Set to specify .NET framework to test against. Values: "Net472", "NetStandard20", "NetStandard21",
17+
# FRAMEWORK Set to specify .NET framework to test against. Values: "Net472", "NetStandard21",
1818
# TARGET Set to specify a custom test target. Default: "nil"
1919
#
2020
# Environment variables produced as output:

src/Directory.Build.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
</PropertyGroup>
55

66
<PropertyGroup>
7-
<TargetFrameworks>netstandard2.0;netstandard2.1;net472</TargetFrameworks>
7+
<TargetFrameworks>netstandard2.1;net472</TargetFrameworks>
88
<LangVersion>10.0</LangVersion>
99
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
1010
<CodeAnalysisRuleSet>..\..\MongoDB.ruleset</CodeAnalysisRuleSet>

src/MongoDB.Bson/TargetFramework.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,6 @@ internal static class TargetFramework
2020
public static string Moniker =>
2121
#if NET472
2222
"net472";
23-
#elif NETSTANDARD2_0
24-
"netstandard20";
2523
#elif NETSTANDARD2_1
2624
"netstandard21";
2725
#endif

src/MongoDB.Driver/Authentication/ScramSha/ScramSha1Algorithm.cs

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,6 @@
1313
* limitations under the License.
1414
*/
1515

16-
// Use our vendored version of Rfc2898DeriveBytes for .NET Standard 2.0
17-
// because this target does not support a version of Rfc2898DeriveBytes that allows to specify the hash algorithm
18-
#if NETSTANDARD2_0
19-
using Rfc2898DeriveBytes = MongoDB.Driver.Authentication.Vendored.Rfc2898DeriveBytes;
20-
#else
21-
using Rfc2898DeriveBytes = System.Security.Cryptography.Rfc2898DeriveBytes;
22-
#endif
2316
using System.Security.Cryptography;
2417
using System.Text;
2518

src/MongoDB.Driver/Authentication/ScramSha/ScramSha256Algorithm.cs

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,6 @@
1313
* limitations under the License.
1414
*/
1515

16-
// Use our vendored version of Rfc2898DeriveBytes for .NET Standard 2.0
17-
// because this target does not support a version of Rfc2898DeriveBytes that allows to specify the hash algorithm
18-
#if NETSTANDARD2_0
19-
using Rfc2898DeriveBytes = MongoDB.Driver.Authentication.Vendored.Rfc2898DeriveBytes;
20-
#else
21-
using Rfc2898DeriveBytes = System.Security.Cryptography.Rfc2898DeriveBytes;
22-
#endif
2316
using System;
2417
using System.Runtime.InteropServices;
2518
using System.Security.Cryptography;

0 commit comments

Comments
 (0)