简体   繁体   English

在Travis CI上使用Mono还原NuGet软件包失败

[英]NuGet package restore with Mono on Travis CI failing

My project compiles & runs fine on OSX and Windows. 我的项目可以在OSX和Windows上编译并正常运行。 However, trying to get it hooked up to Travis CI, I get this error from NuGet (using version 2.8): 但是,尝试将其连接到Travis CI,我从NuGet收到此错误(使用2.8版):

Could not load type 'NuGet.MSBuildProjectUtility' from assembly 'NuGet, Version=2.8.50126.400, Culture=neutral, PublicKeyToken=null'. 无法从程序集“ NuGet,版本= 2.8.50126.400,文化=中性,PublicKeyToken =空”中加载类型“ NuGet.MSBuildProjectUtility”。

Not really sure what to think about this one... MSBuildProjectUtility is obviously present in the assembly. 不太确定如何考虑这一问题……程序集中显然存在MSBuildProjectUtility。

Your Mono version is very old, the project built fine for me on Mono 3.2.1. 您的Mono版本很旧,该项目在Mono 3.2.1上对我来说很好。

To get a more recent version you can use this PPA: https://launchpad.net/~directhex/+archive/monoxide . 要获取更新版本,可以使用以下PPA: https : //launchpad.net/~directhex/+archive/monoxide

\n

Add it to your system with sudo add-apt-repository ppa:directhex/monoxide && sudo apt-get update . 使用 sudo add-apt-repository ppa:directhex/monoxide && sudo apt-get update将其添加到系统中。 Then you can install Mono with sudo apt-get install mono-devel . 然后可以使用 sudo apt-get install mono-devel安装Mono。

Xamarin now ships official Mono packages for Linux, so the PPA isn't necessary anymore. Xamarin现在为Linux发行了官方的Mono软件包,因此不再需要PPA。 See http://www.mono-project.com/docs/getting-started/install/linux/ for the installation guide. 有关安装指南,请参见http://www.mono-project.com/docs/getting-started/install/linux/

Note: in order for Mono to verify SSL connections, you also need to import certificates with mozroots --import --sync , otherwise downloading packages from nuget.org will fail. 注意:为了使Mono能够验证SSL连接,您还需要使用mozroots --import --sync导入证书,否则从nuget.org下载软件包将失败。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM