maui: Dotnet-podcasts app fails to build for iOS
Description
Trying to publish the dotnet-podcasts app (https://github.com/microsoft/dotnet-podcasts branch maui/perf) for iOS fails. The main errors seem to follow ListenTogether/Emojis/EmojiPanel.razor : warning XA0101: @(Content) build action is not supported and Shared/Emojis/CryingFaceEmoji.razor : error : The path '../../../../../dotnet-podcasts/src/Web/Components/Shared/Emojis/CryingFaceEmoji.razor' would result in a file outside of the app bundle and cannot be used. In the docs, running dotnet build is mentioned but we need to generate the ipa files so we need to publish, although this seems to occur with both. This issue was found and seems like it may be related https://github.com/dotnet/maui/issues/791.
Steps to Reproduce
General steps:
- Ensure a provisioning profile and signing stuff is available for publishing (if publishing) (not shown in mini script below)
- Install the latest dotnet sdk
- Install the latest Maui
- clone the dotnet-podcasts repository
- Integrate workaround for https://github.com/dotnet/sdk/issues/21877
- build the components per docs (https://github.com/microsoft/dotnet-podcasts/tree/main/src/Mobile)
- build/publish the main csproj for iOS arm-64
Script that should work on MAC:
curl -o NuGet.config 'https://raw.githubusercontent.com/dotnet/maui/main/NuGet.config'
curl -o dotnet-install.sh 'https://dotnet.microsoft.com/download/dotnet/scripts/v1/dotnet-install.sh'
chmod -R a+rx .
./dotnet-install.sh --channel 6.0.3xx --quality daily --install-dir .
./dotnet --info
./dotnet workload install maui --from-rollback-file https://aka.ms/dotnet/maui/main.json --configfile NuGet.config
git clone https://github.com/microsoft/dotnet-podcasts.git
cd dotnet-podcasts/src/Mobile
cp Microsoft.NetConf2021.Maui.csproj Microsoft.NetConf2021.Maui.csproj.bak
sed -i'' -e 's/net6.0-ios;net6.0-maccatalyst/net6.0-ios/g' Microsoft.NetConf2021.Maui.csproj
../../../dotnet build ../Web/Components/Podcast.Components.Maui.csproj
../../../dotnet build Microsoft.NetConf2021.Maui.csproj -bl:MauiPodcastiOS.binlog -f net6.0-ios --self-contained -r ios-arm64 -c Release /p:_RequireCodeSigning=false
cp Microsoft.NetConf2021.Maui.csproj.bak Microsoft.NetConf2021.Maui.csproj
Version with bug
Preview 14 (current)
Last version that worked well
Unknown/Other
Affected platforms
iOS
Affected platform versions
iOS
Did you find any workaround?
No response
Relevant log output
No response
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 15 (15 by maintainers)
@mkArtakMSFT this is likely a problem with how the BlazorWebView MAUI package combines the Razor SDK and iOS SDK, so it’s most likely something @javiercn could help with.
Thanks @eerhardt. That task is indeed defined in the MacDev.Tasks namespace, so they will have to look into this.
Here is a .binlog of trying to build the app on IOS:
MauiPodcastiOS.zip
There are 50 errors all coming from the
CollectBundleResourcestask.Given this, I think this might be an iOS tooling issue. @rolfbjarne @spouliot @dalexsoto - can someone on your team have a look?
Click to see binlog