Target .NET Core 3.1.200 on OS X, Linux and Windows

I’m trying to build the app on all three OSes targetting .NET Core 3.1.200
This is my .travis.yml:

language: csharp
  - linux
  - osx
  - windows
mono: none
dist: xenial
dotnet: 3.1.200
  - if [ "$TRAVIS_OS_NAME" = "windows" ]; then choco install dotnetcore-sdk; fi
  - dotnet restore
  - dotnet build
  - dotnet test Linalg.Test/Linalg.Test.csproj

The build goes well for OS X and Linux, but fails for Windows. As I found in some topics, I need the before_install in order to install .NET Core 3.1 on Windows. But it fails since the line dotnet: 3.1.200. How to fix it?

My build link: