Uploaded image for project: 'C# Driver'
  1. C# Driver
  2. CSHARP-3875

Run netstandard21 targets on .NET Core 3.1

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Unknown Unknown
    • 2.14.0
    • Affects Version/s: None
    • Component/s: Build
    • None

      Right now we have a lot of warnings in our builds about netcoreapp3.0 being out of support:

      [2021/09/22 22:36:58.750] C:\data\mci\9456f863c4c1c35df15dfbf172938846\mongo-csharp-driver\.dotnet\sdk\5.0.401\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.EolTargetFrameworks.targets(28,5): warning NETSDK1138: The target framework 'netcoreapp3.0' is out of support and will not receive security updates in the future. Please refer to https://aka.ms/dotnet-core-support for more information about the support policy. [C:\data\mci\9456f863c4c1c35df15dfbf172938846\mongo-csharp-driver\tests\MongoDB.Bson.Tests\MongoDB.Bson.Tests.csproj]
      

      Since our build scripts only install .NET Core 2.1 and 3.1, our netstandard21 targets are being run on .NET Core 3.1 anyways. The build tooling tries to run it on .NET Core 3.0 (aka netcoreapp3.0), can't find it, and silently upgrades to run on the next available version which is netcoreapp3.1.

      The netstandard20 TFM is already targeting .NET Core 2.1 (aka netcoreapp2.1) for testing.

      We should modify build.cake to use .NET Core 3.1 (aka netcoreapp3.1) for running our netstandard21 targets. This should remove the out of support build warnings while our actual testing behaviour remains unchanged because the .NET SDK has been silently upgrading those tests to run on .NET Core 3.1 anyways.

            Assignee:
            james.kovacs@mongodb.com James Kovacs
            Reporter:
            james.kovacs@mongodb.com James Kovacs
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: