Svg Images not rendered after upgrading to Avalonia.Svg, Version=11.0.0.10
hdocsek opened this issue · comments
hdocsek commented
Hi!
After upgrading Avalonia.Svg from Version="11.0.0.9" to Version="11.0.0.10" SVG images are not rendered anymore.
Steps to reproduce:
- Add a package reference to "Avalonia.Svg" Version="11.0.0.10"
- Add an svg image to the main view e.g.
- Run the app,
=> SVG image is not shown
This works when using Avalonia.Svg, Version="11.0.0.9".
Relevant Files:
- Project File:
<Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> <OutputType>WinExe</OutputType> <TargetFramework>net8.0</TargetFramework> <Nullable>enable</Nullable> <BuiltInComInteropSupport>true</BuiltInComInteropSupport> <ApplicationManifest>app.manifest</ApplicationManifest> <AvaloniaUseCompiledBindingsByDefault>true</AvaloniaUseCompiledBindingsByDefault> </PropertyGroup> <ItemGroup> <Folder Include="Models\"/> <AvaloniaResource Include="Assets\**"/> </ItemGroup> <ItemGroup> <PackageReference Include="Avalonia" Version="11.0.6"/> <PackageReference Include="Avalonia.Desktop" Version="11.0.6"/> <PackageReference Include="Avalonia.Themes.Fluent" Version="11.0.6"/> <PackageReference Include="Avalonia.Fonts.Inter" Version="11.0.6"/> <!-- Version=11.0.0.10 does NOT render SVG images, Version=11.0.0.9 does --> <PackageReference Include="Avalonia.Svg" Version="11.0.0.10" /> <!--Condition below is needed to remove Avalonia.Diagnostics package from build output in Release configuration.--> <PackageReference Condition="'$(Configuration)' == 'Debug'" Include="Avalonia.Diagnostics" Version="11.0.6"/> <PackageReference Include="Avalonia.ReactiveUI" Version="11.0.2"/> </ItemGroup> </Project>
- View
<Window xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:vm="using:SvgRenderingIssue01.ViewModels" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450" x:Class="SvgRenderingIssue01.Views.MainWindow" x:DataType="vm:MainWindowViewModel"> <Svg Path="/Assets/tiger.svg"></Svg> </Window>
James commented
Same issue here.
Wiesław Šoltés commented
Fixed