how to use lottie animation in my xamarin forms app? - xamarin.forms

i have use lottie animation from nuget package but when app is open its show nothing, my code is below
xmlns:forms="clr-namespace:Lottie.Forms;assembly=Lottie.Forms"
<forms:AnimationView
x:Name="animationView"
Animation="data.json"
Loop="True"
AutoPlay="True"
HeightRequest="300" WidthRequest="300"
VerticalOptions="FillAndExpand"
HorizontalOptions="FillAndExpand" />
i installed Com.Airbnb.Xamarin.Forms.Lottie 3.1.3 from nuget package but its not showing, kindly suggest....

Related

FileNotFoundException: Could not load file or assembly Syncfusion.sfpopuplayout.XForms

I'm not sure how to resolve this. During runtime, I'm getting an initialization error
System.IO.FileNotFoundException: Could not load file or assembly 'Syncfusion.SfPopupLayout.XForms, Version=18.4451.0.33, Culture=neutral, PublicKeyToken=null'. The system cannot find the file specified.
The file (if this is the correct one) exists here:
C:\Users....nuget\packages\syncfusion.xamarin.sfpopuplayout\18.4.0.33\lib\netstandard2.0\Syncfusion.SfPopupLayout.XForms.dll
This is happening in the constructor of my ContentPage.
The Dependencies/Packages folder shows Syncfusion.Xamarin.SfPopupLayout(18.4.0.33). I see the error is reporting 18.4451.0.33. Is that a significant difference ? What do I do ?
Thanks.
EDIT: I have installed the latest version of this package, using nuget.
Install the Syncfusion.Xamarin.SfPopupLayout from NuGet.
After that, you could use this control.
Xaml:
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:d="http://xamarin.com/schemas/2014/forms/design"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:sfPopup="clr-namespace:Syncfusion.XForms.PopupLayout;assembly=Syncfusion.SfPopupLayout.XForms"
mc:Ignorable="d"
x:Class="Test.MainPage">
<sfPopup:SfPopupLayout x:Name="popupLayout">
<sfPopup:SfPopupLayout.Content>
<StackLayout x:Name="mainLayout">
<Button x:Name="clickToShowPopup" Text="ClickToShowPopup"
VerticalOptions="Start" HorizontalOptions="FillAndExpand"
Clicked="ClickToShowPopup_Clicked"/>
</StackLayout>
</sfPopup:SfPopupLayout.Content>
</sfPopup:SfPopupLayout>
</ContentPage>
I have prepared sample and checked the SfPopupLayout in the mentioned NuGet version of 18.4.0.33 and it is working fine. Attached tested sample in the in the following link
sample [link]: https://www.syncfusion.com/downloads/support/directtrac/general/ze/PopupLayout112920991
Please check shared project and revert us if the reported issue is occurring in this sample too, if not check your project file maybe you installed more than one version of SfPopupLayout package.
Regards,
Pradeep Kumar B

How to determine valid NuGet package version combinations for NanoFramework

I am building a .NET NanoFramework demo using the ESP32_VROOM_32 board. I'm having trouble figuring our the correct combination of NuGet packages to avoid getting an assembly mismatch error when I try to debug my solution on the actual hardware. This error I keep getting when I push to the device is:
[Found assemblies mismatches when checking for deployment pre-check.]
The combination of packages I currently have installed are:
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="AMQPNetLite.nanoFramework" version="2.3.0.39" targetFramework="netnanoframework10" />
<package id="nanoFramework.CoreLibrary" version="1.7.3-preview.4" targetFramework="netnanoframework10" />
<package id="nanoFramework.Hardware.Esp32" version="1.2.1-preview.12" targetFramework="netnanoframework10" />
<package id="nanoFramework.ResourceManager" version="1.0.0-preview.15" targetFramework="netnanoframework10" />
<package id="nanoFramework.Runtime.Events" version="1.4.2-preview.8" targetFramework="netnanoframework10" />
<package id="nanoFramework.Runtime.Native" version="1.4.0-preview.1" targetFramework="netnanoframework10" />
<package id="nanoFramework.System.Collections" version="1.0.1-preview.7" targetFramework="netnanoframework10" />
<package id="nanoFramework.System.Math" version="1.2.0-preview.16" targetFramework="netnanoframework10" />
<package id="nanoFramework.System.Net" version="1.4.1-preview.21" targetFramework="netnanoframework10" />
<package id="nanoFramework.System.Text" version="1.0.0-preview.22" targetFramework="netnanoframework10" />
</packages>
My question is, is there a reliable systematic way to determine which combination of NuGet packages will work together with the firmware installed on the device?
I have tried many different combinations and can't get anything to work.
Currently, I have 1.4.0-preview.208 firmware installed on the ESP32, which appears to be the latest stable version.
There is no direct relation between the versioning of the C# libraries and the native firmware implementation. That's because each part has it's own separate development cycle.
The declaration is on which native version it requires. From managed to native, not the other way around.
This is showned on the NuGet description. If you want to learn more about this, take a look at this blog post here.
In the meantime know that stable releases have been published for all class libraries and firmware. The links for the firmware images have been updated.
Each NuGet package has a declaration on which other packages it depends on and which version. There is no other way to determine a valid package combination.
The fw version you have loaded it's not a stable version, therefore the "preview" in the version. But neither are the NuGets. Which is all OK: if you are using the "preview" firmware you have to use the "preview" NuGets.
Can you post here the error message about the version mismatch that you get? This will help determine what is wrong there.

Can't install NuGet package Serilog.Sinks.*

I am facing a problem to install packages of Serilog.Sinks in an old project, e.g. when I try installing Serilog.Sinks.MSSqlServer I get the following error:
An error occurred while retrieving package metadata for Serilog.2.6.0
I have already installed package Serilog.2.6.0 and the process went fine, I tried running the code that uses this library and it works okay, but in case I try to uninstall this package I get the error:
Object reference not set to an instance of an object
Thus, I think that something might be wrong with Serilog.2.6.0 in my machine, since I cannot uninstall it or install any of its sinks, but I can't figure out the problem.
Details:
Visual Studio 2015
.NET Framework 4.5 Web Forms
Hi this worked for me nugget install Serilog.Sinks
If you can't uninstall your nuget via package manager console or with Nuget Package Manager, you still have the option to uninstall it. Open your package.config file.
Looks like this:
<packages>
<package id="Respond" version="1.2.0" targetFramework="net461" />
<package id="Serilog" version="2.6.0" targetFramework="net461" />
<package id="WebGrease" version="1.5.2" targetFramework="net461" />
</packages>
There you will find the id of Serilog your dependency with the version associated. Remove that line. And then unload your project, edit it, there you will find the HintPath of Serilog:
Looks like this:
<Reference Include="Serilog, Version=2.0.0.0, Culture=neutral, PublicKeyToken=24c2f752a8e58a10, processorArchitecture=MSIL">
<HintPath>..\packages\Serilog.2.6.0\lib\net46\Serilog.dll</HintPath>
<Private>True</Private>
</Reference>
Then the package Serilog could be uninstalled complete by manually.
Besides, if you re-install that package still get the same error after uninstall it, this issue should be more related to the NuGet rather than the package Serilog.
In this case, please try to uninstall the NuGet Package Manager for Visual Studio 2015 from Tools->Extensions and Updates, restart Visual Studio. Then install the latest version NuGet:
https://dist.nuget.org/visualstudio-2015-vsix/latest/NuGet.Tools.vsix
After the installation is completed, Reopen the Visual Studio in Administrator mode (right-clicked Visual Studio and started in Administrator mode), try to install that package again, check if it works fine.
The thing that worked for this case, from those I tried, is copying the references (.dll files) from another project where they're working fine. Thank you for your answers! :)
It works fine with me with the following package.config setting:
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Serilog" version="2.6.0" targetFramework="net461" />
<package id="Serilog.Exceptions" version="4.1.0" targetFramework="net461" />
<package id="Serilog.Sinks.File" version="3.2.0" targetFramework="net461" />
</packages>

Xamarin Forms PCL to .NET Standard Upgrade - Seeing All NuGet Packages?

I have a Xamarin Forms app which was built with PCL.
When installing NuGet packages I would see all packages installed in NuGet Explorer.
Example Android Project:
Xam.Plugin.Geolocator **5.0.0.187-beta**
It might rely on the following NuGets:
However, when I install Xam.Plugin.Geolocator in the .NET Standard 2.0 solution I don't see the other plugins in the Nuget Package Explorer like I did in PCL project.
Regardless, the Forms App works just fine. Why don't the dependency package show up anymore? How can I know what version of the dependency packages I have installed?
I've gone ahead and manually installed them to the .NET Standard project, but that doesn't feel correct...
Additionally, I've noticed there is no longer a Packages folder in any of my Projects.
In my PCL Solution, I could see the dependencies. See Below:
There should be a Dependencies - NuGet folder for a .NET Standard SDK style project. There is no Packages folder for an SDK style project.
You can expand the Dependencies - NuGet folder items to see the dependencies. If there are no child nodes then there are no dependencies.
You can also see more detailed information in the project.assets.json file which is created in the obj directory after restoring the NuGet packages.
Xam.Plugin.Geolocator has just the .NET Standard.Library NuGet package as a dependency if you are installing it into a .NET Standard project. This NuGet package would be referenced by default in a .NET Standard project. When I install that into a .NET Standard 2.0 project in Visual Studio 2017 it shows no dependencies.
The full set of dependencies taken from the .nuspec file is:
<dependencies>
<group targetFramework=".NETFramework0.0" />
<group targetFramework="Windows0.0" />
<group targetFramework="WindowsPhone0.0" />
<group targetFramework="WindowsPhoneApp0.0" />
<group targetFramework=".NETStandard1.0">
<dependency id="NETStandard.Library" version="1.6.1" />
</group>
<group targetFramework="MonoAndroid1.0">
<dependency id="Xamarin.GooglePlayServices.Location" version="60.1142.0" />
<dependency id="Plugin.Permissions" version="2.2.1" />
</group>
<group targetFramework="Xamarin.iOS1.0">
<dependency id="Plugin.Permissions" version="2.2.1" />
</group>
<group targetFramework="Xamarin.Mac2.0" />
<group targetFramework=".NETPortable0.0-Profile259" />
<group targetFramework="UAP0.0" />
<group targetFramework=".NETPlatform5.0" />
<group targetFramework="Xamarin.TVOS0.0" />
<group targetFramework="Xamarin.WatchOS0.0" />
</dependencies>
If you try other NuGet packages, such as say AutoMapper, then you will dependencies when you expand the Dependencies - NuGet - AutoMapper item in the Solution Explorer.

EventToCommand not working when migrate to v4 for SL5

I have SL4 app with MVVMLight. I migrate it to SL 5 and got following error when compiling the app:
The tag 'EventToCommand' does not exist in XML namespace
'clr-namespace:GalaSoft.MvvmLight.Command;assembly=GalaSoft.MvvmLight.SL5
The xaml for this error is:
xmlns:i="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"
xmlns:cmd="clr-namespace:GalaSoft.MvvmLight.Command;assembly=GalaSoft.MvvmLight.SL5"
<i:Interaction.Triggers>
<i:EventTrigger EventName="MouseLeftButtonUp">
<cmd:EventToCommand Command="{Binding ResetPasswordCommand,Mode=OneWay}"
MustToggleIsEnabledValue="True" />
</i:EventTrigger>
</i:Interaction.Triggers>
quite confused. Have update all assemblies for new platform. How to resolve this problem?
Figure it out: should use assembly=GalaSoft.MvvmLight.Extras.SL5 instead of assembly=GalaSoft.MvvmLight.SL5.
Thanks.

Resources