Description
Considering the following .csproj configuration:
<ItemGroup>
<!-- Images -->
<MauiImage Include="Resources\Images\*" />
<MauiImage Include="Resources\Images\Challenges\*" LogicalName="challenges/%(Filename)%(Extension)" />
<MauiImage Update="Resources\Images\dotnet_bot.png" Resize="True" BaseSize="300,185" />
<!-- Custom Fonts -->
<MauiFont Include="Resources\Fonts\*" />
<!-- Raw Assets (also remove the "Resources\Raw" prefix) -->
<MauiAsset Include="Resources\Raw\**" LogicalName="%(RecursiveDir)%(Filename)%(Extension)" />
</ItemGroup>
I cannot display an image on Windows using path to that logical file:
<Image Grid.Row="0" Grid.Column="0" Aspect="AspectFit" Source="challenges/hard.png" MaximumHeightRequest="150" />
But it is working on Android.
Steps to Reproduce
- Crate MAUI app using a default tempalte.
- Edit .csproj by adding the next line to any
<ItemGroup> containing image references: <MauiImage Include="Resources\Images\Challenges\*" LogicalName="challenges/%(Filename)%(Extension)" />
- Add test.png image to '\Resources\Images\Challenges' folder.
- Add replace the
Source binding propety's value for Image on main page with 'challenges\test.png'.
- Run app.
Link to public reproduction project repository
No response
Version with bug
9.0.111 SR11.1
Is this a regression from previous behavior?
Not sure, did not test other versions
Last version that worked well
Unknown/Other
Affected platforms
Windows
Affected platform versions
Windows 10.0.17763.0
Did you find any workaround?
No response
Relevant log output
Description
Considering the following .csproj configuration:
I cannot display an image on Windows using path to that logical file:
<Image Grid.Row="0" Grid.Column="0" Aspect="AspectFit" Source="challenges/hard.png" MaximumHeightRequest="150" />But it is working on Android.
Steps to Reproduce
<ItemGroup>containing image references:<MauiImage Include="Resources\Images\Challenges\*" LogicalName="challenges/%(Filename)%(Extension)" />Sourcebinding propety's value forImageon main page with 'challenges\test.png'.Link to public reproduction project repository
No response
Version with bug
9.0.111 SR11.1
Is this a regression from previous behavior?
Not sure, did not test other versions
Last version that worked well
Unknown/Other
Affected platforms
Windows
Affected platform versions
Windows 10.0.17763.0
Did you find any workaround?
No response
Relevant log output