Multi target both .net core 2.1 and 3.1?

Hi I’m trying to build a library for both 2.1 and 3.1.
I have the following .travis.yml

language: csharp
mono: none
dotnet:
  - 3.1
  - 2.1

install:
  - dotnet restore
script:
  - dotnet build
  - dotnet test

And i get the following output:

travis_fold:start:worker_info
e[0Ke[33;1mWorker informatione[0m
hostname: d950606c-6724-4874-9f0b-395aefc6c86d@1.worker-org-689d9fcfd5-wsq5k.gce-production-1
version: v6.2.8 https://github.com/travis-ci/worker/tree/6d3048d96b26562be21fa1a8b8144f4c4cecd083
instance: travis-job-8df19772-853f-4ac6-8363-51877a8aa428 travis-ci-opal-xenial-1553530491-f909ac5 (via amqp)
startup: 6.032445141s
travis_fold:end:worker_info
e[0Ktravis_time:start:0242f566
e[0Ktravis_time:end:0242f566:start=1587468209113696752,finish=1587468209260353081,duration=146656329,event=no_world_writable_dirs
e[0Ktravis_time:start:0a084194
e[0Ktravis_time:end:0a084194:start=1587468209263530639,finish=1587468209270750971,duration=7220332,event=agent
e[0Ktravis_time:start:0fd9329e
e[0Ktravis_time:end:0fd9329e:start=1587468209273300131,finish=1587468209275233192,duration=1933061,event=check_unsupported
e[0Ktravis_time:start:0914b948
e[0Ktravis_fold:start:system_info
e[0Ke[33;1mBuild system informatione[0m
Build language: csharp
Build dist: xenial
Build id: 677650661
Job id: 677650662
Runtime kernel version: 4.15.0-1028-gcp
travis-build version: 6303b206
e[34me[1mBuild image provisioning date and timee[0m
Mon Mar 25 16:52:50 UTC 2019
e[34me[1mOperating System Detailse[0m
Distributor ID:	Ubuntu
Description:	Ubuntu 16.04.6 LTS
Release:	16.04
Codename:	xenial
e[34me[1mSystemd Versione[0m
systemd 229
e[34me[1mCookbooks Versione[0m
42e42e4 https://github.com/travis-ci/travis-cookbooks/tree/42e42e4
e[34me[1mgit versione[0m
git version 2.21.0
e[34me[1mbash versione[0m
GNU bash, version 4.3.48(1)-release (x86_64-pc-linux-gnu)
e[34me[1mgcc versione[0m
gcc (Ubuntu 5.4.0-6ubuntu1~16.04.11) 5.4.0 20160609
e[34me[1mdocker versione[0m
Client:
 Version:           18.06.0-ce
 API version:       1.38
 Go version:        go1.10.3
 Git commit:        0ffa825
 Built:             Wed Jul 18 19:11:02 2018
 OS/Arch:           linux/amd64
 Experimental:      false

Server:
 Engine:
  Version:          18.06.0-ce
  API version:      1.38 (minimum version 1.12)
  Go version:       go1.10.3
  Git commit:       0ffa825
  Built:            Wed Jul 18 19:09:05 2018
  OS/Arch:          linux/amd64
  Experimental:     false
e[34me[1mclang versione[0m
clang version 7.0.0 (tags/RELEASE_700/final)
e[34me[1mjq versione[0m
jq-1.5
e[34me[1mbats versione[0m
Bats 0.4.0
e[34me[1mshellcheck versione[0m
0.6.0
e[34me[1mshfmt versione[0m
v2.6.3
e[34me[1mccache versione[0m
3.2.4
e[34me[1mcmake versione[0m
cmake version 3.12.4
e[34me[1mheroku versione[0m
heroku/7.22.7 linux-x64 node-v11.10.1
e[34me[1mimagemagick versione[0m
Version: ImageMagick 6.8.9-9 Q16 x86_64 2018-09-28 http://www.imagemagick.org
e[34me[1mmd5deep versione[0m
4.4
e[34me[1mmercurial versione[0m
version 4.8
e[34me[1mmysql versione[0m
mysql  Ver 14.14 Distrib 5.7.25, for Linux (x86_64) using  EditLine wrapper
e[34me[1mopenssl versione[0m
OpenSSL 1.0.2g  1 Mar 2016
e[34me[1mpacker versione[0m
1.3.3
e[34me[1mpostgresql client versione[0m
psql (PostgreSQL) 10.7 (Ubuntu 10.7-1.pgdg16.04+1)
e[34me[1mragel versione[0m
Ragel State Machine Compiler version 6.8 Feb 2013
e[34me[1msudo versione[0m
1.8.16
e[34me[1mgzip versione[0m
gzip 1.6
e[34me[1mzip versione[0m
Zip 3.0
e[34me[1mvim versione[0m
VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Nov 24 2016 16:44:48)
e[34me[1miptables versione[0m
iptables v1.6.0
e[34me[1mcurl versione[0m
curl 7.47.0 (x86_64-pc-linux-gnu) libcurl/7.47.0 GnuTLS/3.4.10 zlib/1.2.8 libidn/1.32 librtmp/2.3
e[34me[1mwget versione[0m
GNU Wget 1.17.1 built on linux-gnu.
e[34me[1mrsync versione[0m
rsync  version 3.1.1  protocol version 31
e[34me[1mgimme versione[0m
v1.5.3
e[34me[1mnvm versione[0m
0.34.0
e[34me[1mperlbrew versione[0m
/home/travis/perl5/perlbrew/bin/perlbrew  - App::perlbrew/0.82
e[34me[1mphpenv versione[0m
rbenv 1.1.2
e[34me[1mrvm versione[0m
rvm 1.29.7 (latest) by Michal Papis, Piotr Kuczynski, Wayne E. Seguin [https://rvm.io]
e[34me[1mdefault ruby versione[0m
ruby 2.5.3p105 (2018-10-18 revision 65156) [x86_64-linux]
e[34me[1mCouchDB versione[0m
couchdb 1.6.1
e[34me[1mElasticSearch versione[0m
5.5.0
e[34me[1mInstalled Firefox versione[0m
firefox 63.0.1
e[34me[1mMongoDB versione[0m
MongoDB 4.0.7
e[34me[1mPhantomJS versione[0m
2.1.1
e[34me[1mPre-installed PostgreSQL versionse[0m
9.4.21
9.5.16
9.6.12
e[34me[1mRedis versione[0m
redis-server 5.0.4
e[34me[1mkerl list installationse[0m
21.1
e[34me[1melixirse[0m
=* elixir-1.7.4
e[34me[1mrebar --versione[0m
rebar 2.6.4 17 20160831_145136 git 2.6.4-dirty
e[34me[1mperlbrew liste[0m
   5.26                  (5.26.3)            (installed on Mon Mar 25 16:41:45 2019)
   5.26.3                                    (installed on Mon Mar 25 16:41:45 2019)
   5.26-extras           (5.26.2)            (installed on Mon Mar 25 16:45:42 2019)
   5.26-shrplib          (5.26.2)            (installed on Mon Mar 25 16:45:42 2019)
   5.26.2                                    (installed on Mon Mar 25 16:41:51 2019)
   5.24                  (5.24.3)            (installed on Mon Mar 25 16:46:12 2019)
   5.24.3                                    (installed on Mon Mar 25 16:46:12 2019)
   5.24-extras           (5.24.0)            (installed on Mon Mar 25 16:50:00 2019)
   5.24-shrplib          (5.24.0)            (installed on Mon Mar 25 16:50:00 2019)
travis_fold:end:system_info
e[0K
travis_time:end:0914b948:start=1587468209277790571,finish=1587468209283550437,duration=5759866,event=show_system_info
e[0Ktravis_time:start:06ac0a0c
e[0Ktravis_time:end:06ac0a0c:start=1587468209286198076,finish=1587468209299270952,duration=13072876,event=rm_riak_source
e[0Ktravis_time:start:027894be
e[0Ktravis_time:end:027894be:start=1587468209301935118,finish=1587468209306762066,duration=4826948,event=fix_rwky_redis
e[0Ktravis_time:start:000c094a
e[0Ktravis_time:end:000c094a:start=1587468209309326483,finish=1587468210093119603,duration=783793120,event=wait_for_network
e[0Ktravis_time:start:3a8d6fdc
e[0Ktravis_time:end:3a8d6fdc:start=1587468210096179750,finish=1587468210288661802,duration=192482052,event=update_apt_keys
e[0Ktravis_time:start:04673bbc
e[0Ktravis_time:end:04673bbc:start=1587468210291416028,finish=1587468210337982569,duration=46566541,event=fix_hhvm_source
e[0Ktravis_time:start:014a7824
e[0Ktravis_time:end:014a7824:start=1587468210340507924,finish=1587468210342701116,duration=2193192,event=update_mongo_arch
e[0Ktravis_time:start:0118d88a
e[0Ktravis_time:end:0118d88a:start=1587468210345476358,finish=1587468210383259494,duration=37783136,event=fix_sudo_enabled_trusty
e[0Ktravis_time:start:181c0800
e[0Ktravis_time:end:181c0800:start=1587468210386004912,finish=1587468210387980668,duration=1975756,event=update_glibc
e[0Ktravis_time:start:05c732fa
e[0Ktravis_time:end:05c732fa:start=1587468210390779394,finish=1587468210398048191,duration=7268797,event=clean_up_path
e[0Ktravis_time:start:09ac9503
e[0Ktravis_time:end:09ac9503:start=1587468210400715961,finish=1587468210408055296,duration=7339335,event=fix_resolv_conf
e[0Ktravis_time:start:0ede6bdc
e[0Ktravis_time:end:0ede6bdc:start=1587468210410700303,finish=1587468210418755298,duration=8054995,event=fix_etc_hosts
e[0Ktravis_time:start:32811d5d
e[0Ktravis_time:end:32811d5d:start=1587468210421402855,finish=1587468210430550231,duration=9147376,event=fix_mvn_settings_xml
e[0Ktravis_time:start:0463025c
e[0Ktravis_time:end:0463025c:start=1587468210433240212,finish=1587468210441577204,duration=8336992,event=no_ipv6_localhost
e[0Ktravis_time:start:1a2c5a2c
e[0Ktravis_time:end:1a2c5a2c:start=1587468210444304332,finish=1587468210446455640,duration=2151308,event=fix_etc_mavenrc
e[0Ktravis_time:start:34c2c4b2
e[0Ktravis_time:end:34c2c4b2:start=1587468210449184973,finish=1587468210452009684,duration=2824711,event=fix_wwdr_certificate
e[0Ktravis_time:start:022f78f6
e[0Ktravis_time:end:022f78f6:start=1587468210454807088,finish=1587468210476804917,duration=21997829,event=put_localhost_first
e[0Ktravis_time:start:0a2d56f9
e[0Ktravis_time:end:0a2d56f9:start=1587468210479581359,finish=1587468210482217490,duration=2636131,event=home_paths
e[0Ktravis_time:start:14624d60
e[0Ktravis_time:end:14624d60:start=1587468210484852893,finish=1587468210495420117,duration=10567224,event=disable_initramfs
e[0Ktravis_time:start:08170b9c
e[0Ktravis_time:end:08170b9c:start=1587468210498116861,finish=1587468210727660059,duration=229543198,event=disable_ssh_roaming
e[0Ktravis_time:start:08ca6ffe
e[0Ktravis_time:end:08ca6ffe:start=1587468210730925783,finish=1587468210733197386,duration=2271603,event=debug_tools
e[0Ktravis_time:start:098f418a
e[0Ktravis_time:end:098f418a:start=1587468210736090888,finish=1587468210738961832,duration=2870944,event=uninstall_oclint
e[0Ktravis_time:start:307941b4
e[0Ktravis_time:end:307941b4:start=1587468210741842988,finish=1587468210744559514,duration=2716526,event=rvm_use
e[0Ktravis_time:start:0aff54ec
e[0Ktravis_time:end:0aff54ec:start=1587468210747298198,finish=1587468210754345136,duration=7046938,event=rm_etc_boto_cfg
e[0Ktravis_time:start:1e1ad2a2
e[0Ktravis_time:end:1e1ad2a2:start=1587468210757015515,finish=1587468210761092343,duration=4076828,event=rm_oraclejdk8_symlink
e[0Ktravis_time:start:06e88cc0
e[0Ktravis_time:end:06e88cc0:start=1587468210763846720,finish=1587468210853197349,duration=89350629,event=enable_i386
e[0Ktravis_time:start:0d366ed5
e[0Ktravis_time:end:0d366ed5:start=1587468210856127624,finish=1587468210859495930,duration=3368306,event=update_rubygems
e[0Ktravis_time:start:12b7e5d4
e[0Ktravis_time:end:12b7e5d4:start=1587468210862208097,finish=1587468211595442782,duration=733234685,event=ensure_path_components
e[0Ktravis_time:start:00389b42
e[0Ktravis_time:end:00389b42:start=1587468211598605957,finish=1587468211600706578,duration=2100621,event=redefine_curl
e[0Ktravis_time:start:11d4f5fb
e[0Ktravis_time:end:11d4f5fb:start=1587468211603347920,finish=1587468211605302661,duration=1954741,event=nonblock_pipe
e[0Ktravis_time:start:12dbd3ce
e[0Ktravis_time:end:12dbd3ce:start=1587468211607923821,finish=1587468217639021856,duration=6031098035,event=apt_get_update
e[0Ktravis_time:start:0f42078c
e[0Ktravis_time:end:0f42078c:start=1587468217642259061,finish=1587468217644336360,duration=2077299,event=deprecate_xcode_64
e[0Ktravis_time:start:08d7cc42
e[0Ktravis_time:end:08d7cc42:start=1587468217647054077,finish=1587468220050064962,duration=2403010885,event=update_heroku
e[0Ktravis_time:start:0aa3b9e3
e[0Ktravis_time:end:0aa3b9e3:start=1587468220053117137,finish=1587468220055107991,duration=1990854,event=shell_session_update
e[0Ktravis_time:start:01751f4c
e[0Ktravis_fold:start:docker_mtu
e[0Ktravis_fold:end:docker_mtu
e[0Ktravis_time:end:01751f4c:start=1587468220057697328,finish=1587468222380059656,duration=2322362328,event=set_docker_mtu
e[0Ktravis_time:start:1365db16
e[0Ktravis_fold:start:resolvconf
e[0Ktravis_fold:end:resolvconf
e[0Ktravis_time:end:1365db16:start=1587468222383012857,finish=1587468222434821617,duration=51808760,event=resolvconf
e[0Ktravis_time:start:2812e393
e[0Ktravis_time:end:2812e393:start=1587468222438071739,finish=1587468222572518351,duration=134446612,event=maven_central_mirror
e[0Ktravis_time:start:0c2f27c8
e[0Ktravis_time:end:0c2f27c8:start=1587468222575500680,finish=1587468222663088694,duration=87588014,event=maven_https
e[0K
e[31;1mC# support for Travis-CI is community maintained.e[0m
e[31;1mPlease open any issues at https://travis-ci.community/c/languages/37-category and cc @joshua-anderson @akoeplinger @nterrye[0m
travis_fold:start:dotnet-install
e[0Ke[33;1mInstalling .NET Coree[0m
$ export DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1
$ export DOTNET_CLI_TELEMETRY_OPTOUT=1
travis_time:start:20470dab
e[0Ktravis_time:end:20470dab:start=1587468222753359908,finish=1587468232628807076,duration=9875447168,event=configure
e[0Ktravis_time:start:026d6780
e[0KSelecting previously unselected package dotnet-host.
(Reading database ... 
(Reading database ... 5%
(Reading database ... 10%
(Reading database ... 15%
(Reading database ... 20%
(Reading database ... 25%
(Reading database ... 30%
(Reading database ... 35%
(Reading database ... 40%
(Reading database ... 45%
(Reading database ... 50%
(Reading database ... 55%
(Reading database ... 60%
(Reading database ... 65%
(Reading database ... 70%
(Reading database ... 75%
(Reading database ... 80%
(Reading database ... 85%
(Reading database ... 90%
(Reading database ... 95%
(Reading database ... 100%
(Reading database ... 127711 files and directories currently installed.)
Preparing to unpack .../dotnet-host_3.1.3-1_amd64.deb ...
Unpacking dotnet-host (3.1.3-1) ...
Selecting previously unselected package dotnet-hostfxr-3.1.
Preparing to unpack .../dotnet-hostfxr-3.1_3.1.3-1_amd64.deb ...
Unpacking dotnet-hostfxr-3.1 (3.1.3-1) ...
Selecting previously unselected package dotnet-runtime-deps-3.1.
Preparing to unpack .../dotnet-runtime-deps-3.1_3.1.3-1_amd64.deb ...
Unpacking dotnet-runtime-deps-3.1 (3.1.3-1) ...
Selecting previously unselected package dotnet-runtime-3.1.
Preparing to unpack .../dotnet-runtime-3.1_3.1.3-1_amd64.deb ...
Unpacking dotnet-runtime-3.1 (3.1.3-1) ...
Selecting previously unselected package aspnetcore-runtime-3.1.
Preparing to unpack .../aspnetcore-runtime-3.1_3.1.3-1_amd64.deb ...
Unpacking aspnetcore-runtime-3.1 (3.1.3-1) ...
Selecting previously unselected package dotnet-targeting-pack-3.1.
Preparing to unpack .../dotnet-targeting-pack-3.1_3.1.0-1_amd64.deb ...
Unpacking dotnet-targeting-pack-3.1 (3.1.0-1) ...
Selecting previously unselected package aspnetcore-targeting-pack-3.1.
Preparing to unpack .../aspnetcore-targeting-pack-3.1_3.1.3-1_amd64.deb ...
Unpacking aspnetcore-targeting-pack-3.1 (3.1.3-1) ...
Selecting previously unselected package dotnet-apphost-pack-3.1.
Preparing to unpack .../dotnet-apphost-pack-3.1_3.1.3-1_amd64.deb ...
Unpacking dotnet-apphost-pack-3.1 (3.1.3-1) ...
Selecting previously unselected package netstandard-targeting-pack-2.1.
Preparing to unpack .../netstandard-targeting-pack-2.1_2.1.0-1_amd64.deb ...
Unpacking netstandard-targeting-pack-2.1 (2.1.0-1) ...
Selecting previously unselected package dotnet-sdk-3.1.
Preparing to unpack .../dotnet-sdk-3.1_3.1.201-1_amd64.deb ...
Unpacking dotnet-sdk-3.1 (3.1.201-1) ...
Processing triggers for man-db (2.7.5-1) ...
Setting up dotnet-host (3.1.3-1) ...
Setting up dotnet-hostfxr-3.1 (3.1.3-1) ...
Setting up dotnet-runtime-deps-3.1 (3.1.3-1) ...
Setting up dotnet-runtime-3.1 (3.1.3-1) ...
Setting up aspnetcore-runtime-3.1 (3.1.3-1) ...
Setting up dotnet-targeting-pack-3.1 (3.1.0-1) ...
Setting up aspnetcore-targeting-pack-3.1 (3.1.3-1) ...
Setting up dotnet-apphost-pack-3.1 (3.1.3-1) ...
Setting up netstandard-targeting-pack-2.1 (2.1.0-1) ...
Setting up dotnet-sdk-3.1 (3.1.201-1) ...
This software may collect information about you and your use of the software, and send that to Microsoft.
Please visit http://aka.ms/dotnet-cli-eula for more information.
Welcome to .NET Core!
---------------------
Learn more about .NET Core: https://aka.ms/dotnet-docs
Use 'dotnet --help' to see available commands or visit: https://aka.ms/dotnet-cli-docs

Telemetry
---------
The .NET Core tools collect usage data in order to help us improve your experience. The data is anonymous and doesn't include command-line arguments. The data is collected by Microsoft and shared with the community. You can opt-out of telemetry by setting the DOTNET_CLI_TELEMETRY_OPTOUT environment variable to '1' or 'true' using your favorite shell.

Read more about .NET Core CLI Tools telemetry: https://aka.ms/dotnet-cli-telemetry

Configuring...
--------------
A command is running to populate your local package cache to improve restore speed and enable offline access. This command takes up to one minute to complete and only runs once.
travis_time:end:026d6780:start=1587468232632743668,finish=1587468270390436247,duration=37757692579,event=configure
e[0Ktravis_fold:end:dotnet-install
e[0Ktravis_time:start:0e9ded8a
e[0Ktravis_time:end:0e9ded8a:start=1587468270394451915,finish=1587468270396767393,duration=2315478,event=fix_ps4
e[0Ktravis_time:start:2737f63c
e[0K
travis_fold:start:git.checkout
e[0Ktravis_time:start:20a45aae
e[0K$ git clone --depth=50 --branch=master https://github.com/AnderssonPeter/CompressedStaticFiles.git AnderssonPeter/CompressedStaticFiles
Cloning into 'AnderssonPeter/CompressedStaticFiles'...
remote: Enumerating objects: 37, done.e[K
remote: Counting objects:   2% (1/37)e[K
remote: Counting objects:   5% (2/37)e[K
remote: Counting objects:   8% (3/37)e[K
remote: Counting objects:  10% (4/37)e[K
remote: Counting objects:  13% (5/37)e[K
remote: Counting objects:  16% (6/37)e[K
remote: Counting objects:  18% (7/37)e[K
remote: Counting objects:  21% (8/37)e[K
remote: Counting objects:  24% (9/37)e[K
remote: Counting objects:  27% (10/37)e[K
remote: Counting objects:  29% (11/37)e[K
remote: Counting objects:  32% (12/37)e[K
remote: Counting objects:  35% (13/37)e[K
remote: Counting objects:  37% (14/37)e[K
remote: Counting objects:  40% (15/37)e[K
remote: Counting objects:  43% (16/37)e[K
remote: Counting objects:  45% (17/37)e[K
remote: Counting objects:  48% (18/37)e[K
remote: Counting objects:  51% (19/37)e[K
remote: Counting objects:  54% (20/37)e[K
remote: Counting objects:  56% (21/37)e[K
remote: Counting objects:  59% (22/37)e[K
remote: Counting objects:  62% (23/37)e[K
remote: Counting objects:  64% (24/37)e[K
remote: Counting objects:  67% (25/37)e[K
remote: Counting objects:  70% (26/37)e[K
remote: Counting objects:  72% (27/37)e[K
remote: Counting objects:  75% (28/37)e[K
remote: Counting objects:  78% (29/37)e[K
remote: Counting objects:  81% (30/37)e[K
remote: Counting objects:  83% (31/37)e[K
remote: Counting objects:  86% (32/37)e[K
remote: Counting objects:  89% (33/37)e[K
remote: Counting objects:  91% (34/37)e[K
remote: Counting objects:  94% (35/37)e[K
remote: Counting objects:  97% (36/37)e[K
remote: Counting objects: 100% (37/37)e[K
remote: Counting objects: 100% (37/37), done.e[K
remote: Compressing objects:   3% (1/30)e[K
remote: Compressing objects:   6% (2/30)e[K
remote: Compressing objects:  10% (3/30)e[K
remote: Compressing objects:  13% (4/30)e[K
remote: Compressing objects:  16% (5/30)e[K
remote: Compressing objects:  20% (6/30)e[K
remote: Compressing objects:  23% (7/30)e[K
remote: Compressing objects:  26% (8/30)e[K
remote: Compressing objects:  30% (9/30)e[K
remote: Compressing objects:  33% (10/30)e[K
remote: Compressing objects:  36% (11/30)e[K
remote: Compressing objects:  40% (12/30)e[K
remote: Compressing objects:  43% (13/30)e[K
remote: Compressing objects:  46% (14/30)e[K
remote: Compressing objects:  50% (15/30)e[K
remote: Compressing objects:  53% (16/30)e[K
remote: Compressing objects:  56% (17/30)e[K
remote: Compressing objects:  60% (18/30)e[K
remote: Compressing objects:  63% (19/30)e[K
remote: Compressing objects:  66% (20/30)e[K
remote: Compressing objects:  70% (21/30)e[K
remote: Compressing objects:  73% (22/30)e[K
remote: Compressing objects:  76% (23/30)e[K
remote: Compressing objects:  80% (24/30)e[K
remote: Compressing objects:  83% (25/30)e[K
remote: Compressing objects:  86% (26/30)e[K
remote: Compressing objects:  90% (27/30)e[K
remote: Compressing objects:  93% (28/30)e[K
remote: Compressing objects:  96% (29/30)e[K
remote: Compressing objects: 100% (30/30)e[K
remote: Compressing objects: 100% (30/30), done.e[K
Receiving objects:   0% (1/496)   
Receiving objects:   1% (5/496)   
Receiving objects:   2% (10/496)   
Receiving objects:   3% (15/496)   
Receiving objects:   4% (20/496)   
Receiving objects:   5% (25/496)   
Receiving objects:   6% (30/496)   
Receiving objects:   7% (35/496)   
Receiving objects:   8% (40/496)   
Receiving objects:   9% (45/496)   
Receiving objects:  10% (50/496)   
Receiving objects:  11% (55/496)   
Receiving objects:  12% (60/496)   
Receiving objects:  13% (65/496)   
Receiving objects:  14% (70/496)   
Receiving objects:  15% (75/496)   
Receiving objects:  16% (80/496)   
Receiving objects:  17% (85/496)   
Receiving objects:  18% (90/496)   
Receiving objects:  19% (95/496)   
Receiving objects:  20% (100/496)   
Receiving objects:  21% (105/496)   
Receiving objects:  22% (110/496)   
Receiving objects:  23% (115/496)   
Receiving objects:  24% (120/496)   
Receiving objects:  25% (124/496)   
Receiving objects:  26% (129/496)   
Receiving objects:  27% (134/496)   
Receiving objects:  28% (139/496)   
Receiving objects:  29% (144/496)   
Receiving objects:  30% (149/496)   
Receiving objects:  31% (154/496)   
Receiving objects:  32% (159/496)   
Receiving objects:  33% (164/496)   
Receiving objects:  34% (169/496)   
Receiving objects:  35% (174/496)   
Receiving objects:  36% (179/496)   
Receiving objects:  37% (184/496)   
Receiving objects:  38% (189/496)   
Receiving objects:  39% (194/496)   
Receiving objects:  40% (199/496)   
Receiving objects:  41% (204/496)   
Receiving objects:  42% (209/496)   
Receiving objects:  43% (214/496)   
Receiving objects:  44% (219/496)   
Receiving objects:  45% (224/496)   
Receiving objects:  46% (229/496)   
Receiving objects:  47% (234/496)   
Receiving objects:  48% (239/496)   
Receiving objects:  49% (244/496)   
Receiving objects:  50% (248/496)   
Receiving objects:  51% (253/496)   
Receiving objects:  52% (258/496)   
Receiving objects:  53% (263/496)   
Receiving objects:  54% (268/496)   
Receiving objects:  55% (273/496)   
Receiving objects:  56% (278/496)   
Receiving objects:  57% (283/496)   
Receiving objects:  58% (288/496)   
Receiving objects:  59% (293/496)   
Receiving objects:  60% (298/496)   
Receiving objects:  61% (303/496)   
Receiving objects:  62% (308/496)   
Receiving objects:  63% (313/496)   
Receiving objects:  64% (318/496)   
Receiving objects:  65% (323/496)   
Receiving objects:  66% (328/496)   
Receiving objects:  67% (333/496)   
Receiving objects:  68% (338/496)   
Receiving objects:  69% (343/496)   
Receiving objects:  70% (348/496)   
Receiving objects:  71% (353/496)   
Receiving objects:  72% (358/496)   
remote: Total 496 (delta 13), reused 21 (delta 7), pack-reused 459e[K
Receiving objects:  73% (363/496)   
Receiving objects:  74% (368/496)   
Receiving objects:  75% (372/496)   
Receiving objects:  76% (377/496)   
Receiving objects:  77% (382/496)   
Receiving objects:  78% (387/496)   
Receiving objects:  79% (392/496)   
Receiving objects:  80% (397/496)   
Receiving objects:  81% (402/496)   
Receiving objects:  82% (407/496)   
Receiving objects:  83% (412/496)   
Receiving objects:  84% (417/496)   
Receiving objects:  85% (422/496)   
Receiving objects:  86% (427/496)   
Receiving objects:  87% (432/496)   
Receiving objects:  88% (437/496)   
Receiving objects:  89% (442/496)   
Receiving objects:  90% (447/496)   
Receiving objects:  91% (452/496)   
Receiving objects:  92% (457/496)   
Receiving objects:  93% (462/496)   
Receiving objects:  94% (467/496)   
Receiving objects:  95% (472/496)   
Receiving objects:  96% (477/496)   
Receiving objects:  97% (482/496)   
Receiving objects:  98% (487/496)   
Receiving objects:  99% (492/496)   
Receiving objects: 100% (496/496)   
Receiving objects: 100% (496/496), 1.19 MiB | 8.33 MiB/s, done.
Resolving deltas:   0% (0/180)   
Resolving deltas:   1% (2/180)   
Resolving deltas:   2% (5/180)   
Resolving deltas:   3% (7/180)   
Resolving deltas:   4% (8/180)   
Resolving deltas:   8% (15/180)   
Resolving deltas:   9% (17/180)   
Resolving deltas:  11% (21/180)   
Resolving deltas:  12% (22/180)   
Resolving deltas:  14% (26/180)   
Resolving deltas:  16% (30/180)   
Resolving deltas:  17% (31/180)   
Resolving deltas:  18% (34/180)   
Resolving deltas:  20% (36/180)   
Resolving deltas:  24% (44/180)   
Resolving deltas:  30% (55/180)   
Resolving deltas:  62% (112/180)   
Resolving deltas:  67% (121/180)   
Resolving deltas:  68% (124/180)   
Resolving deltas:  69% (125/180)   
Resolving deltas:  71% (128/180)   
Resolving deltas:  78% (141/180)   
Resolving deltas:  83% (150/180)   
Resolving deltas:  84% (152/180)   
Resolving deltas:  85% (153/180)   
Resolving deltas:  86% (155/180)   
Resolving deltas:  88% (160/180)   
Resolving deltas:  89% (161/180)   
Resolving deltas:  91% (164/180)   
Resolving deltas:  92% (166/180)   
Resolving deltas:  94% (170/180)   
Resolving deltas:  95% (171/180)   
Resolving deltas:  96% (173/180)   
Resolving deltas:  97% (175/180)   
Resolving deltas: 100% (180/180)   
Resolving deltas: 100% (180/180), done.
travis_time:end:20a45aae:start=1587468270402864898,finish=1587468271277279186,duration=874414288,event=checkout
e[0K$ cd AnderssonPeter/CompressedStaticFiles
$ git checkout -qf f24f943600e52d4a5f9b6f4ffac3d9e6506fcba4
travis_fold:end:git.checkout
e[0K
travis_time:end:20a45aae:start=1587468270402864898,finish=1587468271286021667,duration=883156769,event=checkout
e[0Ktravis_time:start:0ff840a8
e[0Ktravis_time:end:0ff840a8:start=1587468271288691766,finish=1587468271293905204,duration=5213438,event=env
e[0K
travis_time:start:1f2e49a0
e[0K$ dotnet --info
.NET Core SDK (reflecting any global.json):
 Version:   3.1.201
 Commit:    b1768b4ae7

Runtime Environment:
 OS Name:     ubuntu
 OS Version:  16.04
 OS Platform: Linux
 RID:         ubuntu.16.04-x64
 Base Path:   /usr/share/dotnet/sdk/3.1.201/

Host (useful for support):
  Version: 3.1.3
  Commit:  4a9f85e9f8

.NET Core SDKs installed:
  3.1.201 [/usr/share/dotnet/sdk]

.NET Core runtimes installed:
  Microsoft.AspNetCore.App 3.1.3 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 3.1.3 [/usr/share/dotnet/shared/Microsoft.NETCore.App]

To install additional .NET Core runtimes or SDKs:
  https://aka.ms/dotnet-download
travis_time:end:1f2e49a0:start=1587468271296817307,finish=1587468271402653960,duration=105836653,event=announce
e[0K
travis_fold:start:install
e[0Ktravis_time:start:14e83125
e[0K$ dotnet restore

Welcome to .NET Core 3.1!

---------------------

SDK Version: 3.1.201

----------------

Explore documentation: https://aka.ms/dotnet-docs

Report issues and find source on GitHub: https://github.com/dotnet/core

Find out what's new: https://aka.ms/dotnet-whats-new

Learn about the installed HTTPS developer cert: https://aka.ms/aspnet-core-https

Use 'dotnet --help' to see available commands or visit: https://aka.ms/dotnet-cli-docs

Write your first app: https://aka.ms/first-net-core-app

--------------------------------------------------------------------------------------
e[?1he=e[?1he=e[?1he=e[?1he=  Restore completed in 2.03 sec for /home/travis/build/AnderssonPeter/CompressedStaticFiles/Example/Example.csproj.
  Restore completed in 674.74 ms for /home/travis/build/AnderssonPeter/CompressedStaticFiles/CompressedStaticFiles/CompressedStaticFiles.csproj.
  Restore completed in 4.35 sec for /home/travis/build/AnderssonPeter/CompressedStaticFiles/CompressedStaticFiles.Tests/CompressedStaticFiles.Tests.csproj.
e[?1he=travis_time:end:14e83125:start=1587468271405915558,finish=1587468277428481805,duration=6022566247,event=install
e[0Ktravis_fold:end:install
e[0Ktravis_time:start:01426709
e[0K$ dotnet build
e[?1he=e[?1he=Microsoft (R) Build Engine version 16.5.0+d4cbfca49 for .NET Core

Copyright (C) Microsoft Corporation. All rights reserved.


e[?1he=e[?1he=  Restore completed in 41.71 ms for /home/travis/build/AnderssonPeter/CompressedStaticFiles/Example/Example.csproj.
  Restore completed in 36.63 ms for /home/travis/build/AnderssonPeter/CompressedStaticFiles/CompressedStaticFiles/CompressedStaticFiles.csproj.
  Restore completed in 1.09 ms for /home/travis/build/AnderssonPeter/CompressedStaticFiles/CompressedStaticFiles.Tests/CompressedStaticFiles.Tests.csproj.
  CompressedStaticFiles -> /home/travis/build/AnderssonPeter/CompressedStaticFiles/CompressedStaticFiles/bin/Debug/netcoreapp3.1/CompressedStaticFiles.dll
  CompressedStaticFiles -> /home/travis/build/AnderssonPeter/CompressedStaticFiles/CompressedStaticFiles/bin/Debug/netstandard2.0/CompressedStaticFiles.dll
  CompressedStaticFiles.Tests -> /home/travis/build/AnderssonPeter/CompressedStaticFiles/CompressedStaticFiles.Tests/bin/Debug/netcoreapp3.1/CompressedStaticFiles.Tests.dll
e[39;49me[33mStartup.cs(36,56): warning CS0618: 'IHostingEnvironment' is obsolete: 'This type is obsolete and will be removed in a future version. The recommended alternative is Microsoft.AspNetCore.Hosting.IWebHostEnvironment.' [/home/travis/build/AnderssonPeter/CompressedStaticFiles/Example/Example.csproj]
e[39;49m  CompressedStaticFiles.Tests -> /home/travis/build/AnderssonPeter/CompressedStaticFiles/CompressedStaticFiles.Tests/bin/Debug/netcoreapp2.1/CompressedStaticFiles.Tests.dll
  Example -> /home/travis/build/AnderssonPeter/CompressedStaticFiles/Example/bin/Debug/netcoreapp3.1/Example.dll
e[39;49me[32m
Build succeeded.
e[39;49m
e[39;49me[33mStartup.cs(36,56): warning CS0618: 'IHostingEnvironment' is obsolete: 'This type is obsolete and will be removed in a future version. The recommended alternative is Microsoft.AspNetCore.Hosting.IWebHostEnvironment.' [/home/travis/build/AnderssonPeter/CompressedStaticFiles/Example/Example.csproj]
e[39;49me[39;49me[33m    1 Warning(s)
e[39;49m    0 Error(s)
e[39;49m
Time Elapsed 00:00:04.25
e[?1he=travis_time:end:01426709:start=1587468277433128472,finish=1587468281974347176,duration=4541218704,event=script
e[0Ke[32;1mThe command "dotnet build" exited with 0.e[0m
travis_time:start:00f1bebe
e[0K$ dotnet test
e[?1he=e[?1he=e[?1he=e[?1he=e[?1he=e[?1he=e[?1he=Test run for /home/travis/build/AnderssonPeter/CompressedStaticFiles/CompressedStaticFiles.Tests/bin/Debug/netcoreapp2.1/CompressedStaticFiles.Tests.dll(.NETCoreApp,Version=v2.1)
Microsoft (R) Test Execution Command Line Tool Version 16.5.0
Copyright (c) Microsoft Corporation.  All rights reserved.

Starting test execution, please wait...

A total of 1 test files matched the specified pattern.
e[39;49me[31mTesthost process exited with error: It was not possible to find any compatible framework version
The framework 'Microsoft.NETCore.App', version '2.1.0' was not found.
  - The following frameworks were found:
      3.1.3 at [/usr/share/dotnet/shared/Microsoft.NETCore.App]
You can resolve the problem by installing the specified framework and/or SDK.
The specified framework can be found at:
  - https://aka.ms/dotnet-core-applaunch?framework=Microsoft.NETCore.App&framework_version=2.1.0&arch=x64&rid=ubuntu.16.04-x64
. Please check the diagnostic logs for more information.
e[39;49m
e[39;49me[31mTest Run Aborted.
e[39;49me[?1he=Test run for /home/travis/build/AnderssonPeter/CompressedStaticFiles/CompressedStaticFiles.Tests/bin/Debug/netcoreapp3.1/CompressedStaticFiles.Tests.dll(.NETCoreApp,Version=v3.1)
Microsoft (R) Test Execution Command Line Tool Version 16.5.0
Copyright (c) Microsoft Corporation.  All rights reserved.

Starting test execution, please wait...

A total of 1 test files matched the specified pattern.

e[39;49me[32mTest Run Successful.
e[39;49me[39;49mTotal tests: 6
e[39;49me[39;49me[32m     Passed: 6
e[39;49me[39;49m Total time: 1.7200 Seconds
e[39;49me[?1he=e[?1he=travis_time:end:00f1bebe:start=1587468281980781561,finish=1587468287658000331,duration=5677218770,event=script
e[0Ke[31;1mThe command "dotnet test" exited with 1.e[0m


Done. Your build exited with 1.

It only seems to install the SDK for 3.1, i have tried to switch so that they are defined in the other order but that did not help.

2.1 is installed in the other job.

As per https://docs.microsoft.com/en-us/dotnet/core/versions/selection you need to specify muliple versions in TargetFrameworkVersion.

As for version-specific dependencies, https://weblog.west-wind.com/posts/2017/jun/22/multitargeting-and-porting-a-net-library-to-net-core-20 says that the only way as of its writing is to edit .csproj manually and specify them under a conditional clause.

Hi,

you can install the missing sdk like this - https://github.com/fsprojects/FSharpx.Extras/blob/master/.travis.yml#L7