繁体   English   中英

Jenkins无法通过缺少对程序集Netstandard的引用来构建Xamarin iOS项目

[英]Jenkins cannot build Xamarin iOS project over a missing reference to assembly netstandard

我正在尝试使用Jenkins为Xamarin iOS项目构建CI管道,但是我遇到了MSBuild的错误,找不到对.NET Standard库的引用:

IDebugSettingService.cs(8,22): error CS0012: The type 'IDisposable' is defined in an assembly that is not referenced. You must add a reference to assembly 'netstandard, Version=2.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'.
ViewModels/IPresentationTabViewModel.cs(17,15): error CS0012: The type 'MulticastDelegate' is defined in an assembly that is not referenced. You must add a reference to assembly 'netstandard, Version=2.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'.
ViewModels/ICredentials.cs(17,10): error CS0012: The type 'Attribute' is defined in an assembly that is not referenced. You must add a reference to assembly 'netstandard, Version=2.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'.

我可以在Mac构建计算机上的帐户上成功构建项目,但是Jenkins服务帐户始终在此处失败。 我已经尝试清除并还原所有NuGet软件包,尽管与Jenkins一起运行时,MSBuild加载的程序集似乎比我自己运行时要少得多,但MSBuild日志并没有太大帮助。

这是我的项目如何设置的问题,还是Jenkins的问题?

事实证明,Jenkins帐户上的PATH环境变量缺少/usr/local/share/dotnet路径,因此无法访问NuGetFallbackFolder(位于NETStandard.Library引用所在的位置)。

/usr/local/share/dotnetPATH修复构建。

像我添加的那样添加$ Path

Path=/Library/Frameworks/Mono.framework/Versions/Current/Commands:$Path:/usr/local/share/dotnet

在此处输入图片说明

暂无
暂无

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

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