Xamarin IOS构建System.io.io.filenotfoundException:找不到文件&quot&obj/iPhone/dev/dev/actool/bundle/my20x20.png;
我有不同的信息。不同环境的文件文件,例如dev.info.plist。
注意:我在开始构建之前将Dev.Info.plist的所有内容复制并粘贴到info.plist中。
当我构建&在当地运行,我没有问题,但是我建立了&对抗iPhonesimulator。我的CI/CD管道对iPhone运行,由于某种原因,它不会拿起我的图像资产。
错误
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/iOS/Xamarin.Shared.targets(1057,3): error : System.IO.FileNotFoundException: Could not find file "/Users/runner/work/1/s/MyApp.iOS/obj/iPhone/Dev/actool/bundle/my20x20.png" [/Users/runner/work/1/s/MyApp.iOS/MyApp.iOS.csproj]
ios csproj
<ImageAsset Include="Assets.xcassets\AppIcons_Dev.appiconset\20.png">
<Visible>false</Visible>
</ImageAsset>
dev.info.plist
<key>XSAppIconAssets</key>
<string>Assets.xcassets/AppIcons_Dev.appiconset</string>
I have different Info.plist files for different environments e.g. Dev.Info.plist.
NOTE: I copy and paste all contents of Dev.Info.plist into Info.plist before I start my build.
When I build & run locally, I have no issues but I build & run against iPhoneSimulator. My CI/CD pipeline runs against iPhone and for some reason, it does not pick up my image assets.
Error
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/iOS/Xamarin.Shared.targets(1057,3): error : System.IO.FileNotFoundException: Could not find file "/Users/runner/work/1/s/MyApp.iOS/obj/iPhone/Dev/actool/bundle/my20x20.png" [/Users/runner/work/1/s/MyApp.iOS/MyApp.iOS.csproj]
iOS CSPROJ
<ImageAsset Include="Assets.xcassets\AppIcons_Dev.appiconset\20.png">
<Visible>false</Visible>
</ImageAsset>
Dev.Info.Plist
<key>XSAppIconAssets</key>
<string>Assets.xcassets/AppIcons_Dev.appiconset</string>
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
问题在于,我在AssetCatalog中的iOS Appicon的深度为24。
这来自将它们保存为PNG ,而没有标记它们为透明的。当将其标记为透明时,它们的深度为32。
此后,构建管道按预期工作。
The problem was that my iOS AppIcons in the AssetCatalog had a bit depth of 24.
This comes from saving them as PNG without marking them as transparent. When marked as transparent they have a bit depth of 32.
After that, the build pipeline worked as intended.