簡體   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