Skip to content
This repository was archived by the owner on May 6, 2024. It is now read-only.
This repository was archived by the owner on May 6, 2024. It is now read-only.

[ios] Components podcastImage and epiosdeTitle don't exist in the current context #239

@kotlarmilos

Description

@kotlarmilos

Description

When attempting to publish the app for iOS using .NET version 8.0.100-rtm.23479.1, the publish fails with:

performance/src/scenarios/mauiiospodcast/dotnet-podcasts/src/Mobile/Controls/Player.xaml.cs(54,9): error CS0103: The name 'podcastImage' does not exist in the current context
performance/src/scenarios/mauiiospodcast/dotnet-podcasts/src/Mobile/Controls/Player.xaml.cs(55,9): error CS0103: The name 'duration' does not exist in the current context

The same issue occured on the CI (https://dev.azure.com/dnceng/internal/_build/results?buildId=2276822&view=logs&j=c04974e3-584c-5152-8f00-7b886e6c86dc&t=1bd054e9-6573-5c14-ef83-f6e1ac550017) with 8.0.100-rc.2 version. These components seems to be defined only when for macOS:

<On Platform="UWP, macOS">
<Grid ColumnDefinitions="auto, *, auto">
<Grid ColumnDefinitions="auto, auto"
RowDefinitions="auto,auto"
Margin="16"
HorizontalOptions="Start"
ColumnSpacing="12">
<Image x:Name="podcastImage"
WidthRequest="56"
HeightRequest="56"
HorizontalOptions="Center"
Grid.RowSpan="2" />
<Label Grid.Column="1"
Text="{Binding Text, Source={x:Reference epiosdeTitle}}"
FontSize="Medium"
TextColor="White"
MaxLines="1" />
<Label Text="{Binding Text, Source={x:Reference authorText}}"
Grid.Row="1"
Grid.Column="1"
FontSize="Small"
TextColor="White" />
</Grid>

However, they are referenced here:

private void UpdatePlayPause()
{
this.IsVisible = true;
this.playButton.Source = this.playerService.IsPlaying ? "player_pause.png" : "player_play.png";
epiosdeTitle.Text = this.playerService.CurrentEpisode.Title;
authorText.Text = $"{this.playerService.CurrentShow?.Author} - {this.playerService.CurrentEpisode?.Published.ToString("MMM, d yyy")}";
podcastImage.Source = this.playerService.CurrentShow?.Image;
duration.Text = this.playerService.CurrentEpisode?.Duration.ToString();
}

Repro steps

  1. Clone the repository and checkout to net8.0 branch
  2. Run the publish command: dotnet publish ./dotnet-podcasts/src/Mobile/Microsoft.NetConf2021.Maui.csproj --runtime ios-arm64 --framework net8.0-ios

/cc: @LoopedBard3 @ivanpovazan

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions