LottieSharp icon indicating copy to clipboard operation
LottieSharp copied to clipboard

LottieSharp.WPF.LottieAnimationView threw an exception in Version 2.0.1

Open alimosavarbot opened this issue 2 years ago • 1 comments

Hello. After installing the LottieSharp(V 2.0.1), and adding the namespace in the xaml file and the corresponding tag, it gives the following message ===================== MY Code ===================== NameSpace: xmlns:lottie="clr-namespace:LottieSharp.WPF;assembly=LottieSharp"

  <lottie:LottieAnimationView
                                Width="200"
                                Height="300"
                                HorizontalAlignment="Center"
                                VerticalAlignment="Center"
                                AutoPlay="True"
                                FileName="C:\Res\Images\Public\data_not_found.json" 
                                RepeatCount="-1" />

Exeption Error:

System.Windows.Markup.XamlParseException: 'The type initializer for 'LottieSharp.WPF.LottieAnimationView' threw an exception.'

     ------  ↓ and ↓ -------

FileNotFoundException: Could not load file or assembly 'WindowsBase, Version=6.0.2.0, Culture=neutral, 
     PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified.

*** One thing I have to say is that the json file is available in the specified path.

Has anyone had this problem? ===================== MY Code ===================== 1

alimosavarbot avatar Sep 08 '22 06:09 alimosavarbot

I had the same problem

buaishi avatar Oct 12 '22 09:10 buaishi

Looks like your project is using .NET Framework. Try redoing it in net6.0.

TimKadyrov avatar Nov 24 '22 07:11 TimKadyrov

This problem is still present in.NET 6

dongzhaosheng73 avatar Nov 28 '22 10:11 dongzhaosheng73

nuget distributes packages that do not support x86

dongzhaosheng73 avatar Nov 28 '22 10:11 dongzhaosheng73

See release 2.2.0

quicoli avatar Apr 11 '23 21:04 quicoli