Xamanimation icon indicating copy to clipboard operation
Xamanimation copied to clipboard

Xaml only animations fail to load Xamanimation.dll

Open blamejane opened this issue 8 years ago • 5 comments
trafficstars

After creating a new cross-platform project/solution and adding the Xamanimation reference (nuget) to the PCL, when deploying to iOS the application crashes with the following exception:

Xamarin.Forms.Xaml.XamlParseException: Position 8:14. Type xamanimation:FadeToAnimation not found in xmlns clr-namespace:Xamanimation;assembly=Xamanimation

If I add the following to the xaml code behind the application will load on iOS:

FadeBox.Animate(new FadeToAnimation());'

Using the Xamanimation Sample project you can test this same behavior by commenting out the code below IntializeComponent() in the AnimationsView.xaml.cs file. That is, comment out the AnimationExtensionButton click event handler code. By commenting out the code, the Xamanimation.dll will no longer load and the sample app will crash at startup.

blamejane avatar Sep 04 '17 20:09 blamejane

Hello,

I've got the same problem. I have to call my new animation in the xaml code behind one time, build & run it on simulator then remove the line in order to use it. After that, my custom animation is working.

Hope it helps

JeromeGsq avatar Feb 07 '18 09:02 JeromeGsq

I got this on Android because I forgot to add the Xamanimation package to my project.

PostImpatica avatar Feb 15 '18 14:02 PostImpatica

Hey, @JeromeGsq @blamejane I've got the same problem. But i correct forcing the project load with this line : var a = new Xamanimation.HeartAnimation(); on AppDelegate.cs before LoadApplication().

tarcisiosouzabr avatar Jun 14 '18 20:06 tarcisiosouzabr

Will include an option to avoid this issue. For now, just adding the reference to the .NET library and the platform projects must fix the problem.

jsuarezruiz avatar Aug 04 '19 16:08 jsuarezruiz

Search for LinkerPlzInclude, disable linking, or use the Preserve attribute.

This is not an issue with this lib.

softlion avatar Sep 23 '20 05:09 softlion