Installing .NET Core 1.1.1 SDK on Travis CI
Christoph Wurst Mar 9 '17
Yesterday I wanted to enable Travis CI for an university project where we're using .NET Core. Although Travis currently supports .NET Core builds, it does not yet include the new .NET Core tools 1.0. A new version of the Core tools is necessary if you try to build projects using the
.csproj Project files instead of the
It turned out to be fairly simple to install the sdk from Microsoft's Ubuntu repository, as documented here. All we had to do was adding the repository to Travis and installing the apt package:
addons: apt: sources: - sourceline: 'deb [arch=amd64] https://apt-mo.trafficmanager.net/repos/dotnet-release/ trusty main' key_url: 'https://apt-mo.trafficmanager.net/keys/microsoft.asc' packages: - dotnet-dev-1.0.1
That's it. The Travis image was then able to install packages of all projects of the solution and build everything. I'm sure Travis will soon update their images and documentation to make this installation easier. You can find the full .travis config file on GitHub.