LottieSharp
LottieSharp copied to clipboard
LottieSharp.WPF.LottieAnimationView threw an exception in Version 2.0.1
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 =====================
I had the same problem
Looks like your project is using .NET Framework. Try redoing it in net6.0.
This problem is still present in.NET 6
nuget distributes packages that do not support x86
See release 2.2.0