cnd
cnd

Reputation: 33784

Can't get nuget working from command line on travis

I'm back to trying to get some F# project to be build-able with Travis-ci

yml:

language: objective-c

env:
 global:
  - EnableNuGetPackageRestore=true 
 matrix:
  - MONO_VERSION="3.2.6"

before_install:
 - wget "http://download.xamarin.com/MonoFrameworkMDK/Macx86/MonoFramework-MDK-${MONO_VERSION}.macos10.xamarin.x86.pkg"
 - sudo installer -pkg "MonoFramework-MDK-${MONO_VERSION}.macos10.xamarin.x86.pkg" -target /
 - mozroots --import --sync

script:
 - mono "packages\\NuGet\\NuGet.exe" install Failess -OutputDirectory packages -ExcludeVersion -Prerelease
 - mono "packages\\Failess\\tools\\Failess.exe" "build.fsx"

But even nuget fails here:

 ApplicationName='/Users/travis/.local/share/NuGet/NuGet.exe', CommandLine='install Failess -OutputDirectory packages -ExcludeVersion
-Prerelease'
, CurrentDirectory='/Users/travis/build/Heather/Failess'
, Native error= Cannot find the specified file The command "mono "packages\NuGet\NuGet.exe" install Failess -OutputDirectory packages
-ExcludeVersion -Prerelease" exited with 1.

what's wrong with it?

Upvotes: 2

Views: 1083

Answers (1)

jbtule
jbtule

Reputation: 31809

So slashes don't matter, running inside a shell script doesn't matter, I think what you have should work.

The problem is that version of NuGet.exe checked into your repository is some old version of nuget that isn't mono compatible. Download the newest version from https://nuget.org/nuget.exe or you can use NuGet.exe update --self if the version of nuget you have supports it.

Upvotes: 2

Related Questions