无法在travis上从命令行工作

时间:2014-02-25 05:58:34

标签: .net f# nuget travis-ci

我回来试图让一些F#项目可以用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"

但即使是nuget也失败了:

 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.

它出了什么问题?

1 个答案:

答案 0 :(得分:2)

所以斜杠无所谓,在shell脚本中运行并不重要,我认为你应该有效。

问题是,检查到您的存储库的NuGet.exe版本是一些不兼容单一的旧版nuget。从https://nuget.org/nuget.exe下载最新版本,或者如果您拥有的nuget版本支持,则可以使用NuGet.exe update --self