Reputation: 21
See the travis log here: https://pastebin.com/KQYkYxvC
errors seem to relate to:
[39;49m[31m/home/travis/build/frostebite/UKSFWebsite.Backend/UKSFWebsite.api/UKSFWebsite.api.csproj : error NU1102: Unable to find package Microsoft.NETCore.App with version (>= 2.1.0) [/home/travis/build/frostebite/UKSFWebsite.Backend/UKSFWebsite.Backend.sln]
This does build and work with the preview netcore sdk and visual studio locally.
Upvotes: 2
Views: 335
Reputation: 2569
Because .NET Core 2.1 is in preview, I think you have to point the Travis config to the specific preview SDK version. For example, if you are targeting trusty
, below is a sample of part of a travis.yml
that should work.
dist: trusty
language: csharp
before_install:
- curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > microsoft.gpg
- sudo mv microsoft.gpg /etc/apt/trusted.gpg.d/microsoft.gpg
- sudo sh -c 'echo "deb [arch=amd64] https://packages.microsoft.com/repos/microsoft-ubuntu-trusty-prod
trusty main" > /etc/apt/sources.list.d/dotnetdev.list'
- sudo apt-get update
- sudo apt-get install dotnet-sdk-2.1.300-preview1-008174
You can modify above for whatever your target platform is by using the instructions on the .NET Core 2.1 preview download page.
I just tested this in one of my projects with success.
Upvotes: 1