簡體   English   中英

使用MSBuild從Jenkins構建.NET標准庫

[英]Building .NET Standard Library from Jenkins using MSBuild

使用某些.NETStandand庫構建MazeCreator解決方案時,從jenkins進行構建會引發成千上萬個錯誤,並抱怨BCL類型:

error CS0518: Predefined type 'System.Enum' is not defined or imported
error CS0518: Predefined type 'System.Int32' is not defined or imported
error CS0518: Predefined type 'System.Object' is not defined or imported 

VsDevCmd.bat設置的所有環境變量VsDevCmd.bat在Jenkins上正確設置。

構建正在調用:

nuget restore
msbuild MazeCreator.sln /p:Configuration=Release

Developer Command Prompt for VS可以正常工作

從命令行構建可以正常工作,在AppVeyorLinux和Mac上,構建也是綠色的。

看來問題與Jekins服務權限有關。

更改后, Jenkin Service登錄方式( MSBuild-Jenkins-Nuget集成

nuget可以正確還原.NETStandard依賴關系,並且該構建現在為綠色。

我們已經將NuGet.exe簽入到3.4.4-rtm-1321版本的SVN源代碼樹中。

然后,使用以下命令將其更新為NuGet.exe 4.7.1 ,然后我們的構建再次開始在Jenkins上運行:

NuGet.exe update -self

順便說一句,我們沒有將Jenkins作為服務運行,而是將其作為用戶進程運行,因此我們可以進行一些DirectX單元測試,而這在Session 0中是無法完成的。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM