unoplatform / uno

Open-source platform for building cross-platform native Mobile, Web, Desktop and Embedded apps quickly. Create rich, C#/XAML, single-codebase apps from any IDE. Hot Reload included! 90m+ NuGet Downloads!!
https://platform.uno
Apache License 2.0
8.9k stars 720 forks source link

[Android] Assets resolution fails #12728

Closed jeromelaban closed 1 year ago

jeromelaban commented 1 year ago

When building the Android version of my Uno app, my build is failing during the RetargetAssets task (excerpt of the diagnostic build logs for this task are in the collapsable section at the bottom).

Looking at the logs and the corresponding source code, it's not clear to me what file is causing the issue. The last file that is retargeting:

 Retargeting generic '/Users/ben/.nuget/packages/p42.uno.controls/4.9.17/contentFiles/any/net7.0-android33.0/Assets/Sounds/Warning.mp3' to 'Android/Assets/eContainment4_Views/Assets/Sounds/Warning.mp3'. 

is also retargeted earlier in the process multiple time without incident (as are other files). Any suggestions on where I should be looking next?

Thanks for your consideration!

Excerpt from diagnostic build log ``` Using "RetargetAssets_v27c7e130a6a558a746639041a32b468fe26d469b" task from assembly "/Users/ben/.nuget/packages/uno.winui/4.9.17/buildTransitive/Uno.UI.Tasks/Uno.UI.Tasks.v27c7e130a6a558a746639041a32b468fe26d469b.dll". Task "RetargetAssets_v27c7e130a6a558a746639041a32b468fe26d469b" (TaskId:105) Task Parameter:TargetPlatform=android (TaskId:105) Task Parameter:DefaultLanguage=en (TaskId:105) Task Parameter:IntermediateOutputPath=obj/Debug/net7.0-android/ (TaskId:105) Task Parameter:AndroidAssetsPrefix=Android/Assets (TaskId:105) Task Parameter:UseHighDPIResources=True (TaskId:105) Task Parameter: ContentItems= obj/Debug/net7.0-android/resizetizer/r/splash_screen.png ExcludeFromContentCheck=true Link=splash_screen.png TargetPath=splash_screen.png obj/Debug/net7.0-android/resizetizer/r/splash_screen.scale-100.png ExcludeFromContentCheck=true Link=splash_screen.scale-100.png TargetPath=splash_screen.scale-100.png obj/Debug/net7.0-android/resizetizer/r/splash_screen.scale-125.png ExcludeFromContentCheck=true Link=splash_screen.scale-125.png TargetPath=splash_screen.scale-125.png obj/Debug/net7.0-android/resizetizer/r/splash_screen.scale-150.png ExcludeFromContentCheck=true Link=splash_screen.scale-150.png TargetPath=splash_screen.scale-150.png obj/Debug/net7.0-android/resizetizer/r/splash_screen.scale-200.png ExcludeFromContentCheck=true Link=splash_screen.scale-200.png TargetPath=splash_screen.scale-200.png obj/Debug/net7.0-android/resizetizer/r/splash_screen.scale-300.png ExcludeFromContentCheck=true Link=splash_screen.scale-300.png TargetPath=splash_screen.scale-300.png obj/Debug/net7.0-android/resizetizer/r/splash_screen.scale-400.png ExcludeFromContentCheck=true Link=splash_screen.scale-400.png TargetPath=splash_screen.scale-400.png /Users/ben/.nuget/packages/p42.uno.controls/4.9.17/lib/net7.0-android33.0/P42.Uno.Controls/Assets/Sounds/Select.mp3 CopyToOutputDirectory=PreserveNewest TargetPath=P42.Uno.Controls/Assets/Sounds/Select.mp3 /Users/ben/.nuget/packages/p42.uno.controls/4.9.17/lib/net7.0-android33.0/P42.Uno.Controls/Assets/Sounds/Error.mp3 CopyToOutputDirectory=PreserveNewest TargetPath=P42.Uno.Controls/Assets/Sounds/Error.mp3 /Users/ben/.nuget/packages/p42.uno.controls/4.9.17/lib/net7.0-android33.0/P42.Uno.Controls/Assets/Sounds/Alarm.mp3 CopyToOutputDirectory=PreserveNewest TargetPath=P42.Uno.Controls/Assets/Sounds/Alarm.mp3 /Users/ben/.nuget/packages/p42.uno.controls/4.9.17/lib/net7.0-android33.0/P42.Uno.Controls/Assets/Sounds/Delete.mp3 CopyToOutputDirectory=PreserveNewest TargetPath=P42.Uno.Controls/Assets/Sounds/Delete.mp3 /Users/ben/.nuget/packages/p42.uno.controls/4.9.17/lib/net7.0-android33.0/P42.Uno.Controls/Assets/Sounds/Inquiry.mp3 CopyToOutputDirectory=PreserveNewest TargetPath=P42.Uno.Controls/Assets/Sounds/Inquiry.mp3 /Users/ben/.nuget/packages/p42.uno.controls/4.9.17/lib/net7.0-android33.0/P42.Uno.Controls/Assets/Sounds/Modify.mp3 CopyToOutputDirectory=PreserveNewest TargetPath=P42.Uno.Controls/Assets/Sounds/Modify.mp3 /Users/ben/.nuget/packages/p42.uno.controls/4.9.17/lib/net7.0-android33.0/P42.Uno.Controls/Assets/Sounds/Progress.mp3 CopyToOutputDirectory=PreserveNewest TargetPath=P42.Uno.Controls/Assets/Sounds/Progress.mp3 /Users/ben/.nuget/packages/p42.uno.controls/4.9.17/lib/net7.0-android33.0/P42.Uno.Controls/Assets/Sounds/Info.mp3 CopyToOutputDirectory=PreserveNewest TargetPath=P42.Uno.Controls/Assets/Sounds/Info.mp3 /Users/ben/.nuget/packages/p42.uno.controls/4.9.17/lib/net7.0-android33.0/P42.Uno.Controls/Assets/Sounds/Warning.mp3 CopyToOutputDirectory=PreserveNewest TargetPath=P42.Uno.Controls/Assets/Sounds/Warning.mp3 /Users/ben/.nuget/packages/p42.uno.controls/4.9.17/lib/net7.0-android33.0/P42.Uno.Controls/Assets/Fonts/SegoeMDL2.ttf CopyToOutputDirectory=PreserveNewest TargetPath=P42.Uno.Controls/Assets/Fonts/SegoeMDL2.ttf /Users/ben/.nuget/packages/uno.fonts.fluent/2.2.2/lib/netstandard1.0/Uno.Fonts.Fluent/Fonts/uno-fluentui-assets.ttf CopyToOutputDirectory=PreserveNewest TargetPath=Uno.Fonts.Fluent/Fonts/uno-fluentui-assets.ttf /Users/ben/Development/Toyota/ECS_Client.Uno.WinUI/ECS_Client/bin/Debug/net7.0-android/ECS_Client.uprimarker CopyToOutputDirectory=PreserveNewest TargetPath=ECS_Client.uprimarker /Users/ben/.nuget/packages/p42.uno.controls/4.9.17/contentFiles/any/net7.0-android33.0/Assets/Fonts/SegoeMDL2.ttf CopyToOutputDirectory=PreserveNewest TargetPath=ECS_Client/Assets/Fonts/SegoeMDL2.ttf /Users/ben/.nuget/packages/p42.uno.controls/4.9.17/contentFiles/any/net7.0-android33.0/Assets/Sounds/Alarm.mp3 CopyToOutputDirectory=PreserveNewest TargetPath=ECS_Client/Assets/Sounds/Alarm.mp3 /Users/ben/.nuget/packages/p42.uno.controls/4.9.17/contentFiles/any/net7.0-android33.0/Assets/Sounds/Delete.mp3 CopyToOutputDirectory=PreserveNewest TargetPath=ECS_Client/Assets/Sounds/Delete.mp3 /Users/ben/.nuget/packages/p42.uno.controls/4.9.17/contentFiles/any/net7.0-android33.0/Assets/Sounds/Error.mp3 CopyToOutputDirectory=PreserveNewest TargetPath=ECS_Client/Assets/Sounds/Error.mp3 /Users/ben/.nuget/packages/p42.uno.controls/4.9.17/contentFiles/any/net7.0-android33.0/Assets/Sounds/Info.mp3 CopyToOutputDirectory=PreserveNewest TargetPath=ECS_Client/Assets/Sounds/Info.mp3 /Users/ben/.nuget/packages/p42.uno.controls/4.9.17/contentFiles/any/net7.0-android33.0/Assets/Sounds/Inquiry.mp3 CopyToOutputDirectory=PreserveNewest TargetPath=ECS_Client/Assets/Sounds/Inquiry.mp3 /Users/ben/.nuget/packages/p42.uno.controls/4.9.17/contentFiles/any/net7.0-android33.0/Assets/Sounds/Modify.mp3 CopyToOutputDirectory=PreserveNewest TargetPath=ECS_Client/Assets/Sounds/Modify.mp3 /Users/ben/.nuget/packages/p42.uno.controls/4.9.17/contentFiles/any/net7.0-android33.0/Assets/Sounds/Progress.mp3 CopyToOutputDirectory=PreserveNewest TargetPath=ECS_Client/Assets/Sounds/Progress.mp3 /Users/ben/.nuget/packages/p42.uno.controls/4.9.17/contentFiles/any/net7.0-android33.0/Assets/Sounds/Select.mp3 CopyToOutputDirectory=PreserveNewest TargetPath=ECS_Client/Assets/Sounds/Select.mp3 /Users/ben/.nuget/packages/p42.uno.controls/4.9.17/contentFiles/any/net7.0-android33.0/Assets/Sounds/Warning.mp3 CopyToOutputDirectory=PreserveNewest TargetPath=ECS_Client/Assets/Sounds/Warning.mp3 /Users/ben/Development/Toyota/ECS_Client.Uno.WinUI/ECS_Client/Assets/Icons/back.svg CopyToOutputDirectory=PreserveNewest TargetPath=ECS_Client/Assets/Icons/back.svg /Users/ben/Development/Toyota/ECS_Client.Uno.WinUI/ECS_Client/Assets/SharedAssets.md CopyToOutputDirectory=PreserveNewest TargetPath=ECS_Client/Assets/SharedAssets.md /Users/ben/Development/Toyota/ECS_Client.Uno.WinUI/ECS_Client/obj/Debug/net7.0-android/resizetizer/r/Assets/Icons/back.png CopyToOutputDirectory=PreserveNewest TargetPath=ECS_Client/Assets/Icons/back.png /Users/ben/Development/Toyota/ECS_Client.Uno.WinUI/ECS_Client/obj/Debug/net7.0-android/resizetizer/r/Assets/Icons/back.scale-100.png CopyToOutputDirectory=PreserveNewest TargetPath=ECS_Client/Assets/Icons/back.scale-100.png /Users/ben/Development/Toyota/ECS_Client.Uno.WinUI/ECS_Client/obj/Debug/net7.0-android/resizetizer/r/Assets/Icons/back.scale-125.png CopyToOutputDirectory=PreserveNewest TargetPath=ECS_Client/Assets/Icons/back.scale-125.png /Users/ben/Development/Toyota/ECS_Client.Uno.WinUI/ECS_Client/obj/Debug/net7.0-android/resizetizer/r/Assets/Icons/back.scale-150.png CopyToOutputDirectory=PreserveNewest TargetPath=ECS_Client/Assets/Icons/back.scale-150.png /Users/ben/Development/Toyota/ECS_Client.Uno.WinUI/ECS_Client/obj/Debug/net7.0-android/resizetizer/r/Assets/Icons/back.scale-200.png CopyToOutputDirectory=PreserveNewest TargetPath=ECS_Client/Assets/Icons/back.scale-200.png /Users/ben/Development/Toyota/ECS_Client.Uno.WinUI/ECS_Client/obj/Debug/net7.0-android/resizetizer/r/Assets/Icons/back.scale-300.png CopyToOutputDirectory=PreserveNewest TargetPath=ECS_Client/Assets/Icons/back.scale-300.png /Users/ben/Development/Toyota/ECS_Client.Uno.WinUI/ECS_Client/obj/Debug/net7.0-android/resizetizer/r/Assets/Icons/back.scale-400.png CopyToOutputDirectory=PreserveNewest TargetPath=ECS_Client/Assets/Icons/back.scale-400.png /Users/ben/Development/Toyota/ECS_Client.Uno.WinUI/ECS Projects/eContainment4.Views/bin/Debug/net7.0-android/eContainment4.Views.uprimarker CopyToOutputDirectory=PreserveNewest TargetPath=eContainment4.Views.uprimarker /Users/ben/.nuget/packages/p42.uno.controls/4.9.17/contentFiles/any/net7.0-android33.0/Assets/Fonts/SegoeMDL2.ttf CopyToOutputDirectory=PreserveNewest TargetPath=eContainment4.Views/Assets/Fonts/SegoeMDL2.ttf /Users/ben/.nuget/packages/p42.uno.controls/4.9.17/contentFiles/any/net7.0-android33.0/Assets/Sounds/Alarm.mp3 CopyToOutputDirectory=PreserveNewest TargetPath=eContainment4.Views/Assets/Sounds/Alarm.mp3 /Users/ben/.nuget/packages/p42.uno.controls/4.9.17/contentFiles/any/net7.0-android33.0/Assets/Sounds/Delete.mp3 CopyToOutputDirectory=PreserveNewest TargetPath=eContainment4.Views/Assets/Sounds/Delete.mp3 /Users/ben/.nuget/packages/p42.uno.controls/4.9.17/contentFiles/any/net7.0-android33.0/Assets/Sounds/Error.mp3 CopyToOutputDirectory=PreserveNewest TargetPath=eContainment4.Views/Assets/Sounds/Error.mp3 /Users/ben/.nuget/packages/p42.uno.controls/4.9.17/contentFiles/any/net7.0-android33.0/Assets/Sounds/Info.mp3 CopyToOutputDirectory=PreserveNewest TargetPath=eContainment4.Views/Assets/Sounds/Info.mp3 /Users/ben/.nuget/packages/p42.uno.controls/4.9.17/contentFiles/any/net7.0-android33.0/Assets/Sounds/Inquiry.mp3 CopyToOutputDirectory=PreserveNewest TargetPath=eContainment4.Views/Assets/Sounds/Inquiry.mp3 /Users/ben/.nuget/packages/p42.uno.controls/4.9.17/contentFiles/any/net7.0-android33.0/Assets/Sounds/Modify.mp3 CopyToOutputDirectory=PreserveNewest TargetPath=eContainment4.Views/Assets/Sounds/Modify.mp3 /Users/ben/.nuget/packages/p42.uno.controls/4.9.17/contentFiles/any/net7.0-android33.0/Assets/Sounds/Progress.mp3 CopyToOutputDirectory=PreserveNewest TargetPath=eContainment4.Views/Assets/Sounds/Progress.mp3 /Users/ben/.nuget/packages/p42.uno.controls/4.9.17/contentFiles/any/net7.0-android33.0/Assets/Sounds/Select.mp3 CopyToOutputDirectory=PreserveNewest TargetPath=eContainment4.Views/Assets/Sounds/Select.mp3 /Users/ben/.nuget/packages/p42.uno.controls/4.9.17/contentFiles/any/net7.0-android33.0/Assets/Sounds/Warning.mp3 CopyToOutputDirectory=PreserveNewest TargetPath=eContainment4.Views/Assets/Sounds/Warning.mp3 /Users/ben/Development/Toyota/ECS_Client.Uno.WinUI/ECS Projects/eContainment4.Views/Assets/.DS_Store CopyToOutputDirectory=PreserveNewest TargetPath=eContainment4.Views/Assets/.DS_Store /Users/ben/Development/Toyota/ECS_Client.Uno.WinUI/ECS Projects/eContainment4.Views/Assets/Fonts/Avenir-Black-03.ttf CopyToOutputDirectory=PreserveNewest TargetPath=eContainment4.Views/Assets/Fonts/Avenir-Black-03.ttf /Users/ben/Development/Toyota/ECS_Client.Uno.WinUI/ECS Projects/eContainment4.Views/Assets/Fonts/KohinoorDevanagari-Light-05.otf CopyToOutputDirectory=PreserveNewest TargetPath=eContainment4.Views/Assets/Fonts/KohinoorDevanagari-Light-05.otf /Users/ben/Development/Toyota/ECS_Client.Uno.WinUI/ECS Projects/eContainment4.Views/Assets/Fonts/MaterialIcons-Regular.ttf CopyToOutputDirectory=PreserveNewest TargetPath=eContainment4.Views/Assets/Fonts/MaterialIcons-Regular.ttf /Users/ben/Development/Toyota/ECS_Client.Uno.WinUI/ECS Projects/eContainment4.Views/Assets/Images/CameraScanIcon.32.png CopyToOutputDirectory=PreserveNewest TargetPath=eContainment4.Views/Assets/Images/CameraScanIcon.32.png /Users/ben/Development/Toyota/ECS_Client.Uno.WinUI/ECS Projects/eContainment4.Views/Assets/Images/CameraScanIcon.svg CopyToOutputDirectory=PreserveNewest TargetPath=eContainment4.Views/Assets/Images/CameraScanIcon.svg /Users/ben/Development/Toyota/ECS_Client.Uno.WinUI/AbstractScanner/AbstractScanner/bin/Debug/net7.0-android/AbstractScanner.uprimarker CopyToOutputDirectory=PreserveNewest TargetPath=AbstractScanner.uprimarker /Users/ben/.nuget/packages/p42.uno.controls/4.9.17/contentFiles/any/net7.0-android33.0/Assets/Fonts/SegoeMDL2.ttf CopyToOutputDirectory=PreserveNewest TargetPath=AbstractScanner/Assets/Fonts/SegoeMDL2.ttf /Users/ben/.nuget/packages/p42.uno.controls/4.9.17/contentFiles/any/net7.0-android33.0/Assets/Sounds/Alarm.mp3 CopyToOutputDirectory=PreserveNewest TargetPath=AbstractScanner/Assets/Sounds/Alarm.mp3 /Users/ben/.nuget/packages/p42.uno.controls/4.9.17/contentFiles/any/net7.0-android33.0/Assets/Sounds/Delete.mp3 CopyToOutputDirectory=PreserveNewest TargetPath=AbstractScanner/Assets/Sounds/Delete.mp3 /Users/ben/.nuget/packages/p42.uno.controls/4.9.17/contentFiles/any/net7.0-android33.0/Assets/Sounds/Error.mp3 CopyToOutputDirectory=PreserveNewest TargetPath=AbstractScanner/Assets/Sounds/Error.mp3 /Users/ben/.nuget/packages/p42.uno.controls/4.9.17/contentFiles/any/net7.0-android33.0/Assets/Sounds/Info.mp3 CopyToOutputDirectory=PreserveNewest TargetPath=AbstractScanner/Assets/Sounds/Info.mp3 /Users/ben/.nuget/packages/p42.uno.controls/4.9.17/contentFiles/any/net7.0-android33.0/Assets/Sounds/Inquiry.mp3 CopyToOutputDirectory=PreserveNewest TargetPath=AbstractScanner/Assets/Sounds/Inquiry.mp3 /Users/ben/.nuget/packages/p42.uno.controls/4.9.17/contentFiles/any/net7.0-android33.0/Assets/Sounds/Modify.mp3 CopyToOutputDirectory=PreserveNewest TargetPath=AbstractScanner/Assets/Sounds/Modify.mp3 /Users/ben/.nuget/packages/p42.uno.controls/4.9.17/contentFiles/any/net7.0-android33.0/Assets/Sounds/Progress.mp3 CopyToOutputDirectory=PreserveNewest TargetPath=AbstractScanner/Assets/Sounds/Progress.mp3 /Users/ben/.nuget/packages/p42.uno.controls/4.9.17/contentFiles/any/net7.0-android33.0/Assets/Sounds/Select.mp3 CopyToOutputDirectory=PreserveNewest TargetPath=AbstractScanner/Assets/Sounds/Select.mp3 /Users/ben/.nuget/packages/p42.uno.controls/4.9.17/contentFiles/any/net7.0-android33.0/Assets/Sounds/Warning.mp3 CopyToOutputDirectory=PreserveNewest TargetPath=AbstractScanner/Assets/Sounds/Warning.mp3 (TaskId:105) Retargeting assets to android. (TaskId:105) Retargeting image 'obj/Debug/net7.0-android/resizetizer/r/splash_screen.png' to 'drawable-nodpi/splash_screen.png'. (TaskId:105) Retargeting image 'obj/Debug/net7.0-android/resizetizer/r/splash_screen.scale-100.png' to 'drawable-mdpi/splash_screen.png'. (TaskId:105) Skipping 'obj/Debug/net7.0-android/resizetizer/r/splash_screen.scale-125.png' as it's not supported on android. (TaskId:105) Retargeting image 'obj/Debug/net7.0-android/resizetizer/r/splash_screen.scale-150.png' to 'drawable-hdpi/splash_screen.png'. (TaskId:105) Retargeting image 'obj/Debug/net7.0-android/resizetizer/r/splash_screen.scale-200.png' to 'drawable-xhdpi/splash_screen.png'. (TaskId:105) Retargeting image 'obj/Debug/net7.0-android/resizetizer/r/splash_screen.scale-300.png' to 'drawable-xxhdpi/splash_screen.png'. (TaskId:105) Retargeting image 'obj/Debug/net7.0-android/resizetizer/r/splash_screen.scale-400.png' to 'drawable-xxxhdpi/splash_screen.png'. (TaskId:105) Retargeting generic '/Users/ben/.nuget/packages/p42.uno.controls/4.9.17/lib/net7.0-android33.0/P42.Uno.Controls/Assets/Sounds/Select.mp3' to 'Android/Assets/P42_Uno_Controls/Assets/Sounds/Select.mp3'. (TaskId:105) Retargeting generic '/Users/ben/.nuget/packages/p42.uno.controls/4.9.17/lib/net7.0-android33.0/P42.Uno.Controls/Assets/Sounds/Error.mp3' to 'Android/Assets/P42_Uno_Controls/Assets/Sounds/Error.mp3'. (TaskId:105) Retargeting generic '/Users/ben/.nuget/packages/p42.uno.controls/4.9.17/lib/net7.0-android33.0/P42.Uno.Controls/Assets/Sounds/Alarm.mp3' to 'Android/Assets/P42_Uno_Controls/Assets/Sounds/Alarm.mp3'. (TaskId:105) Retargeting generic '/Users/ben/.nuget/packages/p42.uno.controls/4.9.17/lib/net7.0-android33.0/P42.Uno.Controls/Assets/Sounds/Delete.mp3' to 'Android/Assets/P42_Uno_Controls/Assets/Sounds/Delete.mp3'. (TaskId:105) Retargeting generic '/Users/ben/.nuget/packages/p42.uno.controls/4.9.17/lib/net7.0-android33.0/P42.Uno.Controls/Assets/Sounds/Inquiry.mp3' to 'Android/Assets/P42_Uno_Controls/Assets/Sounds/Inquiry.mp3'. (TaskId:105) Retargeting generic '/Users/ben/.nuget/packages/p42.uno.controls/4.9.17/lib/net7.0-android33.0/P42.Uno.Controls/Assets/Sounds/Modify.mp3' to 'Android/Assets/P42_Uno_Controls/Assets/Sounds/Modify.mp3'. (TaskId:105) Retargeting generic '/Users/ben/.nuget/packages/p42.uno.controls/4.9.17/lib/net7.0-android33.0/P42.Uno.Controls/Assets/Sounds/Progress.mp3' to 'Android/Assets/P42_Uno_Controls/Assets/Sounds/Progress.mp3'. (TaskId:105) Retargeting generic '/Users/ben/.nuget/packages/p42.uno.controls/4.9.17/lib/net7.0-android33.0/P42.Uno.Controls/Assets/Sounds/Info.mp3' to 'Android/Assets/P42_Uno_Controls/Assets/Sounds/Info.mp3'. (TaskId:105) Retargeting generic '/Users/ben/.nuget/packages/p42.uno.controls/4.9.17/lib/net7.0-android33.0/P42.Uno.Controls/Assets/Sounds/Warning.mp3' to 'Android/Assets/P42_Uno_Controls/Assets/Sounds/Warning.mp3'. (TaskId:105) Retargeting font '/Users/ben/.nuget/packages/p42.uno.controls/4.9.17/lib/net7.0-android33.0/P42.Uno.Controls/Assets/Fonts/SegoeMDL2.ttf' to 'Android/Assets/P42_Uno_Controls/Assets/Fonts/SegoeMDL2.ttf'. (TaskId:105) Retargeting font '/Users/ben/.nuget/packages/uno.fonts.fluent/2.2.2/lib/netstandard1.0/Uno.Fonts.Fluent/Fonts/uno-fluentui-assets.ttf' to 'Android/Assets/Uno_Fonts_Fluent/Fonts/uno_fluentui_assets.ttf'. (TaskId:105) Retargeting generic '/Users/ben/Development/Toyota/ECS_Client.Uno.WinUI/ECS_Client/bin/Debug/net7.0-android/ECS_Client.uprimarker' to 'Android/Assets/ECS_Client.uprimarker'. (TaskId:105) Retargeting font '/Users/ben/.nuget/packages/p42.uno.controls/4.9.17/contentFiles/any/net7.0-android33.0/Assets/Fonts/SegoeMDL2.ttf' to 'Android/Assets/ECS_Client/Assets/Fonts/SegoeMDL2.ttf'. (TaskId:105) Retargeting generic '/Users/ben/.nuget/packages/p42.uno.controls/4.9.17/contentFiles/any/net7.0-android33.0/Assets/Sounds/Alarm.mp3' to 'Android/Assets/ECS_Client/Assets/Sounds/Alarm.mp3'. (TaskId:105) Retargeting generic '/Users/ben/.nuget/packages/p42.uno.controls/4.9.17/contentFiles/any/net7.0-android33.0/Assets/Sounds/Delete.mp3' to 'Android/Assets/ECS_Client/Assets/Sounds/Delete.mp3'. (TaskId:105) Retargeting generic '/Users/ben/.nuget/packages/p42.uno.controls/4.9.17/contentFiles/any/net7.0-android33.0/Assets/Sounds/Error.mp3' to 'Android/Assets/ECS_Client/Assets/Sounds/Error.mp3'. (TaskId:105) Retargeting generic '/Users/ben/.nuget/packages/p42.uno.controls/4.9.17/contentFiles/any/net7.0-android33.0/Assets/Sounds/Info.mp3' to 'Android/Assets/ECS_Client/Assets/Sounds/Info.mp3'. (TaskId:105) Retargeting generic '/Users/ben/.nuget/packages/p42.uno.controls/4.9.17/contentFiles/any/net7.0-android33.0/Assets/Sounds/Inquiry.mp3' to 'Android/Assets/ECS_Client/Assets/Sounds/Inquiry.mp3'. (TaskId:105) Retargeting generic '/Users/ben/.nuget/packages/p42.uno.controls/4.9.17/contentFiles/any/net7.0-android33.0/Assets/Sounds/Modify.mp3' to 'Android/Assets/ECS_Client/Assets/Sounds/Modify.mp3'. (TaskId:105) Retargeting generic '/Users/ben/.nuget/packages/p42.uno.controls/4.9.17/contentFiles/any/net7.0-android33.0/Assets/Sounds/Progress.mp3' to 'Android/Assets/ECS_Client/Assets/Sounds/Progress.mp3'. (TaskId:105) Retargeting generic '/Users/ben/.nuget/packages/p42.uno.controls/4.9.17/contentFiles/any/net7.0-android33.0/Assets/Sounds/Select.mp3' to 'Android/Assets/ECS_Client/Assets/Sounds/Select.mp3'. (TaskId:105) Retargeting generic '/Users/ben/.nuget/packages/p42.uno.controls/4.9.17/contentFiles/any/net7.0-android33.0/Assets/Sounds/Warning.mp3' to 'Android/Assets/ECS_Client/Assets/Sounds/Warning.mp3'. (TaskId:105) Retargeting generic '/Users/ben/Development/Toyota/ECS_Client.Uno.WinUI/ECS_Client/Assets/Icons/back.svg' to 'Android/Assets/ECS_Client/Assets/Icons/back.svg'. (TaskId:105) Retargeting generic '/Users/ben/Development/Toyota/ECS_Client.Uno.WinUI/ECS_Client/Assets/SharedAssets.md' to 'Android/Assets/ECS_Client/Assets/SharedAssets.md'. (TaskId:105) Retargeting image '/Users/ben/Development/Toyota/ECS_Client.Uno.WinUI/ECS_Client/obj/Debug/net7.0-android/resizetizer/r/Assets/Icons/back.png' to 'drawable-nodpi/ECS_Client_Assets_Icons_back.png'. (TaskId:105) Retargeting image '/Users/ben/Development/Toyota/ECS_Client.Uno.WinUI/ECS_Client/obj/Debug/net7.0-android/resizetizer/r/Assets/Icons/back.scale-100.png' to 'drawable-mdpi/ECS_Client_Assets_Icons_back.png'. (TaskId:105) Skipping '/Users/ben/Development/Toyota/ECS_Client.Uno.WinUI/ECS_Client/obj/Debug/net7.0-android/resizetizer/r/Assets/Icons/back.scale-125.png' as it's not supported on android. (TaskId:105) Retargeting image '/Users/ben/Development/Toyota/ECS_Client.Uno.WinUI/ECS_Client/obj/Debug/net7.0-android/resizetizer/r/Assets/Icons/back.scale-150.png' to 'drawable-hdpi/ECS_Client_Assets_Icons_back.png'. (TaskId:105) Retargeting image '/Users/ben/Development/Toyota/ECS_Client.Uno.WinUI/ECS_Client/obj/Debug/net7.0-android/resizetizer/r/Assets/Icons/back.scale-200.png' to 'drawable-xhdpi/ECS_Client_Assets_Icons_back.png'. (TaskId:105) Retargeting image '/Users/ben/Development/Toyota/ECS_Client.Uno.WinUI/ECS_Client/obj/Debug/net7.0-android/resizetizer/r/Assets/Icons/back.scale-300.png' to 'drawable-xxhdpi/ECS_Client_Assets_Icons_back.png'. (TaskId:105) Retargeting image '/Users/ben/Development/Toyota/ECS_Client.Uno.WinUI/ECS_Client/obj/Debug/net7.0-android/resizetizer/r/Assets/Icons/back.scale-400.png' to 'drawable-xxxhdpi/ECS_Client_Assets_Icons_back.png'. (TaskId:105) Retargeting generic '/Users/ben/Development/Toyota/ECS_Client.Uno.WinUI/ECS Projects/eContainment4.Views/bin/Debug/net7.0-android/eContainment4.Views.uprimarker' to 'Android/Assets/eContainment4_Views.uprimarker'. (TaskId:105) Retargeting font '/Users/ben/.nuget/packages/p42.uno.controls/4.9.17/contentFiles/any/net7.0-android33.0/Assets/Fonts/SegoeMDL2.ttf' to 'Android/Assets/eContainment4_Views/Assets/Fonts/SegoeMDL2.ttf'. (TaskId:105) Retargeting generic '/Users/ben/.nuget/packages/p42.uno.controls/4.9.17/contentFiles/any/net7.0-android33.0/Assets/Sounds/Alarm.mp3' to 'Android/Assets/eContainment4_Views/Assets/Sounds/Alarm.mp3'. (TaskId:105) Retargeting generic '/Users/ben/.nuget/packages/p42.uno.controls/4.9.17/contentFiles/any/net7.0-android33.0/Assets/Sounds/Delete.mp3' to 'Android/Assets/eContainment4_Views/Assets/Sounds/Delete.mp3'. (TaskId:105) Retargeting generic '/Users/ben/.nuget/packages/p42.uno.controls/4.9.17/contentFiles/any/net7.0-android33.0/Assets/Sounds/Error.mp3' to 'Android/Assets/eContainment4_Views/Assets/Sounds/Error.mp3'. (TaskId:105) Retargeting generic '/Users/ben/.nuget/packages/p42.uno.controls/4.9.17/contentFiles/any/net7.0-android33.0/Assets/Sounds/Info.mp3' to 'Android/Assets/eContainment4_Views/Assets/Sounds/Info.mp3'. (TaskId:105) Retargeting generic '/Users/ben/.nuget/packages/p42.uno.controls/4.9.17/contentFiles/any/net7.0-android33.0/Assets/Sounds/Inquiry.mp3' to 'Android/Assets/eContainment4_Views/Assets/Sounds/Inquiry.mp3'. (TaskId:105) Retargeting generic '/Users/ben/.nuget/packages/p42.uno.controls/4.9.17/contentFiles/any/net7.0-android33.0/Assets/Sounds/Modify.mp3' to 'Android/Assets/eContainment4_Views/Assets/Sounds/Modify.mp3'. (TaskId:105) Retargeting generic '/Users/ben/.nuget/packages/p42.uno.controls/4.9.17/contentFiles/any/net7.0-android33.0/Assets/Sounds/Progress.mp3' to 'Android/Assets/eContainment4_Views/Assets/Sounds/Progress.mp3'. (TaskId:105) Retargeting generic '/Users/ben/.nuget/packages/p42.uno.controls/4.9.17/contentFiles/any/net7.0-android33.0/Assets/Sounds/Select.mp3' to 'Android/Assets/eContainment4_Views/Assets/Sounds/Select.mp3'. (TaskId:105) Retargeting generic '/Users/ben/.nuget/packages/p42.uno.controls/4.9.17/contentFiles/any/net7.0-android33.0/Assets/Sounds/Warning.mp3' to 'Android/Assets/eContainment4_Views/Assets/Sounds/Warning.mp3'. (TaskId:105) Assembly loaded during TaskRun (Uno.UI.Tasks.Assets.RetargetAssets_v27c7e130a6a558a746639041a32b468fe26d469b): System.Diagnostics.StackTrace, Version=7.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a (location: /usr/local/share/dotnet/shared/Microsoft.NETCore.App/7.0.7/System.Diagnostics.StackTrace.dll, MVID: 4f98eb13-5485-4cf2-bf31-d4ffbfb16c90, AppDomain: [Default]) (TaskId:105) 07:47:07.172 1>/Users/ben/.nuget/packages/uno.winui/4.9.17/buildTransitive/Uno.UI.Tasks.targets(137,3): error MSB4018: The "RetargetAssets_v27c7e130a6a558a746639041a32b468fe26d469b" task failed unexpectedly. [/Users/ben/Development/Toyota/ECS_Client.Uno.WinUI/ECS_Client.Mobile/ECS_Client.Mobile.csproj::TargetFramework=net7.0-android] /Users/ben/.nuget/packages/uno.winui/4.9.17/buildTransitive/Uno.UI.Tasks.targets(137,3): error MSB4018: System.ArgumentOutOfRangeException: Index and length must refer to a location within the string. (Parameter 'length') [/Users/ben/Development/Toyota/ECS_Client.Uno.WinUI/ECS_Client.Mobile/ECS_Client.Mobile.csproj::TargetFramework=net7.0-android] /Users/ben/.nuget/packages/uno.winui/4.9.17/buildTransitive/Uno.UI.Tasks.targets(137,3): error MSB4018: at System.String.ThrowSubstringArgumentOutOfRange(Int32 startIndex, Int32 length) [/Users/ben/Development/Toyota/ECS_Client.Uno.WinUI/ECS_Client.Mobile/ECS_Client.Mobile.csproj::TargetFramework=net7.0-android] /Users/ben/.nuget/packages/uno.winui/4.9.17/buildTransitive/Uno.UI.Tasks.targets(137,3): error MSB4018: at System.String.Substring(Int32 startIndex, Int32 length) [/Users/ben/Development/Toyota/ECS_Client.Uno.WinUI/ECS_Client.Mobile/ECS_Client.Mobile.csproj::TargetFramework=net7.0-android] /Users/ben/.nuget/packages/uno.winui/4.9.17/buildTransitive/Uno.UI.Tasks.targets(137,3): error MSB4018: at Uno.AndroidResourceNameEncoder.Encode(String key) in C:\a\1\s\src\Uno.UWP\Helpers\AndroidResourceNameEncoder.cs:line 34 [/Users/ben/Development/Toyota/ECS_Client.Uno.WinUI/ECS_Client.Mobile/ECS_Client.Mobile.csproj::TargetFramework=net7.0-android] /Users/ben/.nuget/packages/uno.winui/4.9.17/buildTransitive/Uno.UI.Tasks.targets(137,3): error MSB4018: at Uno.AndroidResourceNameEncoder.EncodePath(String path, Char separator) in C:\a\1\s\src\Uno.UWP\Helpers\AndroidResourceNameEncoder.cs:line 78 [/Users/ben/Development/Toyota/ECS_Client.Uno.WinUI/ECS_Client.Mobile/ECS_Client.Mobile.csproj::TargetFramework=net7.0-android] /Users/ben/.nuget/packages/uno.winui/4.9.17/buildTransitive/Uno.UI.Tasks.targets(137,3): error MSB4018: at Uno.AndroidResourceNameEncoder.EncodeFileSystemPath(String path, String prefix) in C:\a\1\s\src\Uno.UWP\Helpers\AndroidResourceNameEncoder.cs:line 54 [/Users/ben/Development/Toyota/ECS_Client.Uno.WinUI/ECS_Client.Mobile/ECS_Client.Mobile.csproj::TargetFramework=net7.0-android] /Users/ben/.nuget/packages/uno.winui/4.9.17/buildTransitive/Uno.UI.Tasks.targets(137,3): error MSB4018: at Uno.UI.Tasks.Assets.RetargetAssets_v27c7e130a6a558a746639041a32b468fe26d469b.b__41_3(String s) in C:\a\1\s\src\SourceGenerators\Uno.UI.Tasks\Assets\RetargetAssets.cs:line 66 [/Users/ben/Development/Toyota/ECS_Client.Uno.WinUI/ECS_Client.Mobile/ECS_Client.Mobile.csproj::TargetFramework=net7.0-android] /Users/ben/.nuget/packages/uno.winui/4.9.17/buildTransitive/Uno.UI.Tasks.targets(137,3): error MSB4018: at Uno.UI.Tasks.Assets.RetargetAssets_v27c7e130a6a558a746639041a32b468fe26d469b.ProcessContentItems(ITaskItem[] assets, Func`2 resourceToTargetPath, Func`2 pathEncoder) in C:\a\1\s\src\SourceGenerators\Uno.UI.Tasks\Assets\RetargetAssets.cs:line 158 [/Users/ben/Development/Toyota/ECS_Client.Uno.WinUI/ECS_Client.Mobile/ECS_Client.Mobile.csproj::TargetFramework=net7.0-android] /Users/ben/.nuget/packages/uno.winui/4.9.17/buildTransitive/Uno.UI.Tasks.targets(137,3): error MSB4018: at Uno.UI.Tasks.Assets.RetargetAssets_v27c7e130a6a558a746639041a32b468fe26d469b.Execute() in C:\a\1\s\src\SourceGenerators\Uno.UI.Tasks\Assets\RetargetAssets.cs:line 75 [/Users/ben/Development/Toyota/ECS_Client.Uno.WinUI/ECS_Client.Mobile/ECS_Client.Mobile.csproj::TargetFramework=net7.0-android] /Users/ben/.nuget/packages/uno.winui/4.9.17/buildTransitive/Uno.UI.Tasks.targets(137,3): error MSB4018: at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute() [/Users/ben/Development/Toyota/ECS_Client.Uno.WinUI/ECS_Client.Mobile/ECS_Client.Mobile.csproj::TargetFramework=net7.0-android] /Users/ben/.nuget/packages/uno.winui/4.9.17/buildTransitive/Uno.UI.Tasks.targets(137,3): error MSB4018: at Microsoft.Build.BackEnd.TaskBuilder.ExecuteInstantiatedTask(ITaskExecutionHost taskExecutionHost, TaskLoggingContext taskLoggingContext, TaskHost taskHost, ItemBucket bucket, TaskExecutionMode howToExecuteTask) [/Users/ben/Development/Toyota/ECS_Client.Uno.WinUI/ECS_Client.Mobile/ECS_Client.Mobile.csproj::TargetFramework=net7.0-android] Done executing task "RetargetAssets_v27c7e130a6a558a746639041a32b468fe26d469b" -- FAILED. (TaskId:105) 07:47:07.172 1>Done building target "UnoAssetsGeneration" in project "ECS_Client.Mobile.csproj" -- FAILED.: (TargetId:91) 07:47:07.172 1>Done Building Project "/Users/ben/Development/Toyota/ECS_Client.Uno.WinUI/ECS_Client.Mobile/ECS_Client.Mobile.csproj" (default targets) -- FAILED. ```

Originally posted by @baskren in https://github.com/unoplatform/uno/discussions/12722

jeromelaban commented 1 year ago

Thanks for the report. It looks like this line:

https://github.com/unoplatform/uno/blob/c6418aeffc2cba27ae3482647f0c5ebe7e66d7be/src/Uno.UWP/Helpers/AndroidResourceNameEncoder.cs#L34

is getting an empty string, for some reason. Looking at the list of assets it's not clear what could cause that though. It may be caused by a double separator, which could cause:

https://github.com/unoplatform/uno/blob/c6418aeffc2cba27ae3482647f0c5ebe7e66d7be/src/Uno.UWP/Helpers/AndroidResourceNameEncoder.cs#L74

to receive an empty string.

kazo0 commented 1 year ago

This might be caused by the underline as part of the project name (ECS_Client), might be messing with the encoding of the folder paths

baskren commented 1 year ago

Let me give that a try.

baskren commented 1 year ago

Bummer. That wasn't it. Great suggestion. Just out of curiosity, would any filenames with a - character be a problem?

jeromelaban commented 1 year ago

It's unlikely, but could you provide a binlog of your build? You can send it to info@platform.uno if you don't want to share it publicly.

baskren commented 1 year ago

binlog sent via email.

jeromelaban commented 1 year ago

@baskren Thanks. There are spaces in the path, I wonder if it could be the cause. We'll make some changes to avoid that situation anyways.

It could also be caused by the .DS_Store files. Could you try to exclude those?

kazo0 commented 1 year ago

@baskren I ran some tests with some sample projects and I was able to reproduce your error by including assets that don't have a filename, such as the .DS_Store files that I see are included as Content in your library project.

Removing those from your library should avoid the issue and, in the meantime, I will make changes in Uno so that this scenario is handled properly.

Thanks for catching this :)

baskren commented 1 year ago

@kazo0 : Thanks a million! Very helpful!

baskren commented 1 year ago

Just wanted to say Thank You, again. Because of your inquiries, I just spent 20 minutes learning MSBuild Structured Log Viewer. Wished I had learned this sooner.