簡體   English   中英

在 jenkins 上使用 msbuild 構建 Xamarin iOS 應用程序時 IPA 中缺少資產

[英]Missing assets in IPA when building Xamarin iOS app using msbuild on jenkins

從相同的准備好的 zip 存檔構建相同的應用程序(在 Mac VS2019 上)時,在構建之前刪除 bin 和 obj 文件夾以及清理的解決方案,我得到不同的 IPA“存檔”。

jenkins 的一個缺少 Assets.car 和應用程序圖標,因此應用程序在加載過程中不會顯示主屏幕圖標和飛濺。 在 _CopyResourcesToBundle 目標期間,它應該復制它提供的所有必需資產:

Building target "_CopyResourcesToBundle" partially, because some output files are out of date with respect to their input files.

因為它運行到部分狀態它可能不會復制所有必需的文件。

在使用相同的 VS2019 (8.4.2) for Mac 和相同的 Xcode (11.0)在本地機器上構建時,無論是使用 IDE 還是終端,它都會提供正確的 IPA 文件。

Building target "_CopyResourcesToBundle" completely.
...
Output file "bin/iPhone/Release/RssReader.app/AppIcon60x60@2x.png" does not exist.
Output file "bin/iPhone/Release/RssReader.app/AppIcon76x76@2x~ipad.png" does not exist.
Output file "bin/iPhone/Release/RssReader.app/Assets.car" does not exist.
...
          bin/iPhone/Release/RssReader.app/AppIcon60x60@2x.png
                  LogicalName=AppIcon60x60@2x.png
                  Optimize=false
                  OriginalItemSpec=obj/iPhone/Release/actool/bundle/AppIcon60x60@2x.png
                  OutputPath=bin/iPhone/Release/RssReader.app/AppIcon60x60@2x.png
          bin/iPhone/Release/RssReader.app/AppIcon76x76@2x~ipad.png
                  LogicalName=AppIcon76x76@2x~ipad.png
                  Optimize=false
                  OriginalItemSpec=obj/iPhone/Release/actool/bundle/AppIcon76x76@2x~ipad.png
                  OutputPath=bin/iPhone/Release/RssReader.app/AppIcon76x76@2x~ipad.png
          bin/iPhone/Release/RssReader.app/Assets.car
                  LogicalName=Assets.car
                  Optimize=false
                  OriginalItemSpec=obj/iPhone/Release/actool/bundle/Assets.car
                  OutputPath=bin/iPhone/Release/RssReader.app/Assets.car

在 jenkins 上構建時,上述部分顯然不存在。

這看起來像其他幾個線程,當其他線程正在為丟失的資產而苦苦掙扎時,他們正在清除一些模糊的 Xamarin 緩存文件夾,通過重建、清理和刪除 bin/obj 文件夾向項目添加和刪除資產。

這與應用程序始終構建在 tmp 位置中已清除的工作區上並刪除 bin 和 obj 文件夾並在構建之前清除的情況不同。 添加/刪除和移動資源的位置也無濟於事。

在此處輸入圖片說明

由於 msbuild 內部問題,無法在符號鏈接位置上構建應用程序。

請參閱: https : //github.com/xamarin/xamarin-macios/issues/7759

暫無
暫無

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

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