Skip to content

Commit aa61ebe

Browse files
authored
CSHARP-5272: Cleanup leftovers of .netstandard 2.0 removal (#1444)
1 parent 1fc7c7c commit aa61ebe

File tree

5 files changed

+3
-61
lines changed

5 files changed

+3
-61
lines changed

build.cake

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -377,7 +377,6 @@ Task("SmokeTests")
377377
});
378378

379379
Task("SmokeTestsNet472").IsDependentOn("SmokeTests");
380-
Task("SmokeTestsNetCoreApp21").IsDependentOn("SmokeTests");
381380
Task("SmokeTestsNetCoreApp31").IsDependentOn("SmokeTests");
382381
Task("SmokeTestsNet50").IsDependentOn("SmokeTests");
383382
Task("SmokeTestsNet60").IsDependentOn("SmokeTests");
@@ -389,7 +388,7 @@ Task("TestsPackaging")
389388
.DoesForEach(
390389
() =>
391390
{
392-
var monikers = new[] { "net472", "netcoreapp21", "netcoreapp30", "net50", "net60" };
391+
var monikers = new[] { "net472", "netcoreapp30", "net50", "net60" };
393392
var csprojTypes = new[] { "SDK" };
394393
var processorArchitectures = new[] { "x64", "arm64" };
395394
var projectTypes = new[] { "xunit", "console" };
@@ -595,7 +594,6 @@ Setup<BuildConfig>(
595594
// in a different directory with a x64 dotnet host process. This would further complicate our testing for little additional gain.
596595
var framework = targetPlatform == "arm64" ? "net6.0" : lowerTarget switch
597596
{
598-
string s when s.EndsWith("net472") => "net472",
599597
string s when s.EndsWith("netstandard21") || s.EndsWith("netcoreapp31") => "netcoreapp3.1",
600598
string s when s.EndsWith("net472") => "net472",
601599
string s when s.EndsWith("net50") => "net5.0",

evergreen/evergreen.yml

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1494,13 +1494,6 @@ tasks:
14941494
vars:
14951495
FRAMEWORK: net472
14961496

1497-
- name: test-smoke-tests-netcoreapp21
1498-
commands:
1499-
- func: bootstrap-mongo-orchestration
1500-
- func: run-smoke-tests
1501-
vars:
1502-
FRAMEWORK: netcoreapp21
1503-
15041497
- name: test-smoke-tests-netcoreapp31
15051498
commands:
15061499
- func: bootstrap-mongo-orchestration
@@ -2327,7 +2320,6 @@ buildvariants:
23272320
- windows-64-vs2017-test
23282321
tasks:
23292322
- name: stable-api-tests-net472
2330-
- name: stable-api-tests-netstandard20
23312323
- name: stable-api-tests-netstandard21
23322324

23332325
# Secure tests
@@ -2617,7 +2609,6 @@ buildvariants:
26172609
batchtime: 1440 # 1 day
26182610
tasks:
26192611
- name: test-smoke-tests-net472
2620-
- name: test-smoke-tests-netcoreapp21
26212612
- name: test-smoke-tests-netcoreapp31
26222613
- name: test-smoke-tests-net50
26232614
- name: test-smoke-tests-net60
@@ -2628,7 +2619,6 @@ buildvariants:
26282619
display_name: "smoke-tests ${version} ${os}"
26292620
batchtime: 1440 # 1 day
26302621
tasks:
2631-
- name: test-smoke-tests-netcoreapp21
26322622
- name: test-smoke-tests-netcoreapp31
26332623
- name: test-smoke-tests-net50
26342624
- name: test-smoke-tests-net60
@@ -2639,7 +2629,6 @@ buildvariants:
26392629
display_name: "smoke-tests ${version} ${os}"
26402630
batchtime: 1440 # 1 day
26412631
tasks:
2642-
- name: test-smoke-tests-netcoreapp21
26432632
- name: test-smoke-tests-netcoreapp31
26442633
- name: test-smoke-tests-net50
26452634
- name: test-smoke-tests-net60

tests/BuildProps/Tests.Build.props

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
</PropertyGroup>
77

88
<PropertyGroup>
9-
<TargetFrameworks>netcoreapp3.1;net6.0;net472</TargetFrameworks>
9+
<TargetFrameworks>netcoreapp3.1;net6.0</TargetFrameworks>
10+
<TargetFrameworks Condition="'$(IsWindows)'=='true'">$(TargetFrameworks);net472</TargetFrameworks>
1011
<IsPackable>false</IsPackable>
1112
<SignAssembly>true</SignAssembly>
1213
<AssemblyOriginatorKeyFile>..\..\MongoDB.Driver.snk</AssemblyOriginatorKeyFile>
@@ -47,10 +48,4 @@
4748
<PackageReference Include="JunitXml.TestLogger" Version="2.1.81" />
4849
</ItemGroup>
4950

50-
<ItemGroup>
51-
<PackageReference Update="Microsoft.NETCore.App">
52-
<NoWarn>NU1903,NU1902</NoWarn> <!--Temporary disable vulnerability warning to allow netcoreapp2.1 TF-->
53-
</PackageReference>
54-
</ItemGroup>
55-
5651
</Project>

tests/MongoDB.Driver.Tests/Linq/Linq3Implementation/Jira/CSharp4100ExpressionTests.cs

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -302,11 +302,7 @@ public void Contains_with_string_field_and_string_constant_and_comparisonType_sh
302302
#if !NETFRAMEWORK
303303
[Theory]
304304
[InlineData(StringComparison.CurrentCulture, "{ $project : { _v : { $literal : { R : false } }, _id : 0 } }")]
305-
#if !NETCOREAPP2_1
306-
// there are bugs related to case insensitive string comparisons in .NET Core 2.1
307-
// https://github.com/dotnet/runtime/issues/27376
308305
[InlineData(StringComparison.CurrentCultureIgnoreCase, "{ $project : { _v : { $literal : { R : true } }, _id : 0 } }")]
309-
#endif
310306
public void Contains_with_string_constant_and_string_constant_and_comparisonType_should_work(StringComparison comparisonType, string expectedStage)
311307
{
312308
var collection = GetCollection<Test>();
@@ -538,11 +534,7 @@ public void EndsWith_with_string_field_and_string_constant_and_ignoreCase_and_cu
538534

539535
[Theory]
540536
[InlineData(false, "{ $project : { _v : { $literal : { R : false } }, _id : 0 } }")]
541-
#if !NETCOREAPP2_1
542-
// there are bugs related to case insensitive string comparisons in .NET Core 2.1
543-
// https://github.com/dotnet/runtime/issues/27376
544537
[InlineData(true, "{ $project : { _v : { $literal : { R : true } }, _id : 0 } }")]
545-
#endif
546538
public void EndsWith_with_string_constant_and_string_constant_and_ignoreCase_and_culture_should_work(bool ignoreCase, string expectedStage)
547539
{
548540
var collection = GetCollection<Test>();
@@ -628,11 +620,7 @@ public void EndsWith_with_string_field_and_string_constant_and_comparisonType_sh
628620

629621
[Theory]
630622
[InlineData(StringComparison.CurrentCulture, "{ $project : { _v : { $literal : { R : false } }, _id : 0 } }")]
631-
#if !NETCOREAPP2_1
632-
// there are bugs related to case insensitive string comparisons in .NET Core 2.1
633-
// https://github.com/dotnet/runtime/issues/27376
634623
[InlineData(StringComparison.CurrentCultureIgnoreCase, "{ $project : { _v : { $literal : { R : true } }, _id : 0 } }")]
635-
#endif
636624
public void EndsWith_with_string_constant_and_string_constant_and_comparisonType_should_work(StringComparison comparisonType, string expectedStage)
637625
{
638626
var collection = GetCollection<Test>();
@@ -856,11 +844,7 @@ public void StartsWith_with_string_field_and_string_constant_and_ignoreCase_and_
856844

857845
[Theory]
858846
[InlineData(false, "{ $project : { _v : { $literal : { R : false } }, _id : 0 } }")]
859-
#if !NETCOREAPP2_1
860-
// there are bugs related to case insensitive string comparisons in .NET Core 2.1
861-
// https://github.com/dotnet/runtime/issues/27376
862847
[InlineData(true, "{ $project : { _v : { $literal : { R : true } }, _id : 0 } }")]
863-
#endif
864848
public void StartsWith_with_string_constant_and_string_constant_and_ignoreCase_and_culture_should_work(bool ignoreCase, string expectedStage)
865849
{
866850
var collection = GetCollection<Test>();
@@ -946,11 +930,7 @@ public void StartsWith_with_string_field_and_string_constant_and_comparisonType_
946930

947931
[Theory]
948932
[InlineData(StringComparison.CurrentCulture, "{ $project : { _v : { $literal : { R : false } }, _id : 0 } }")]
949-
#if !NETCOREAPP2_1
950-
// there are bugs related to case insensitive string comparisons in .NET Core 2.1
951-
// https://github.com/dotnet/runtime/issues/27376
952933
[InlineData(StringComparison.CurrentCultureIgnoreCase, "{ $project : { _v : { $literal : { R : true } }, _id : 0 } }")]
953-
#endif
954934
public void StartsWith_with_string_constant_and_string_constant_and_comparisonType_should_work(StringComparison comparisonType, string expectedStage)
955935
{
956936
var collection = GetCollection<Test>();

tests/MongoDB.Driver.Tests/Linq/Linq3Implementation/Jira/CSharp4100FilterTests.cs

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -301,11 +301,7 @@ public void Contains_with_string_field_and_string_constant_and_comparisonType_sh
301301
#if !NETFRAMEWORK
302302
[Theory]
303303
[InlineData(StringComparison.CurrentCulture, "{ $match : { _id : { $type : -1 } } }")]
304-
#if !NETCOREAPP2_1
305-
// there are bugs related to case insensitive string comparisons in .NET Core 2.1
306-
// https://github.com/dotnet/runtime/issues/27376
307304
[InlineData(StringComparison.CurrentCultureIgnoreCase, "{ $match : { } }")]
308-
#endif
309305
public void Contains_with_string_constant_and_string_constant_and_comparisonType_should_work(StringComparison comparisonType, string expectedStage)
310306
{
311307
var collection = GetCollection<Test>();
@@ -537,11 +533,7 @@ public void EndsWith_with_string_field_and_string_constant_and_ignoreCase_and_cu
537533

538534
[Theory]
539535
[InlineData(false, "{ $match : { _id : { $type : -1 } } }")]
540-
#if !NETCOREAPP2_1
541-
// there are bugs related to case insensitive string comparisons in .NET Core 2.1
542-
// https://github.com/dotnet/runtime/issues/27376
543536
[InlineData(true, "{ $match : { } }")]
544-
#endif
545537
public void EndsWith_with_string_constant_and_string_constant_and_ignoreCase_and_culture_should_work(bool ignoreCase, string expectedStage)
546538
{
547539
var collection = GetCollection<Test>();
@@ -627,11 +619,7 @@ public void EndsWith_with_string_field_and_string_constant_and_comparisonType_sh
627619

628620
[Theory]
629621
[InlineData(StringComparison.CurrentCulture, "{ $match : { _id : { $type : -1 } } }")]
630-
#if !NETCOREAPP2_1
631-
// there are bugs related to case insensitive string comparisons in .NET Core 2.1
632-
// https://github.com/dotnet/runtime/issues/27376
633622
[InlineData(StringComparison.CurrentCultureIgnoreCase, "{ $match : { } }")]
634-
#endif
635623
public void EndsWith_with_string_constant_and_string_constant_and_comparisonType_should_work(StringComparison comparisonType, string expectedStage)
636624
{
637625
var collection = GetCollection<Test>();
@@ -855,11 +843,7 @@ public void StartsWith_with_string_field_and_string_constant_and_ignoreCase_and_
855843

856844
[Theory]
857845
[InlineData(false, "{ $match : { _id : { $type : -1 } } }")]
858-
#if !NETCOREAPP2_1
859-
// there are bugs related to case insensitive string comparisons in .NET Core 2.1
860-
// https://github.com/dotnet/runtime/issues/27376
861846
[InlineData(true, "{ $match : { } }")]
862-
#endif
863847
public void StartsWith_with_string_constant_and_string_constant_and_ignoreCase_and_culture_should_work(bool ignoreCase, string expectedStage)
864848
{
865849
var collection = GetCollection<Test>();
@@ -945,11 +929,7 @@ public void StartsWith_with_string_field_and_string_constant_and_comparisonType_
945929

946930
[Theory]
947931
[InlineData(StringComparison.CurrentCulture, "{ $match : { _id : { $type : -1 } } }")]
948-
#if !NETCOREAPP2_1
949-
// there are bugs related to case insensitive string comparisons in .NET Core 2.1
950-
// https://github.com/dotnet/runtime/issues/27376
951932
[InlineData(StringComparison.CurrentCultureIgnoreCase, "{ $match : { } }")]
952-
#endif
953933
public void StartsWith_with_string_constant_and_string_constant_and_comparisonType_should_work(StringComparison comparisonType, string expectedStage)
954934
{
955935
var collection = GetCollection<Test>();

0 commit comments

Comments
 (0)