3

I have just added a Windows Phone 8.1 project to my Xamarin app project, but now I can't figure out how to initialize XLabs in it, as it can't find XFormsAppWP, so I can't follow the guide at XLabs's website.
I am using XLabs v. 2.0.5783-pre01.
Can somebody help me?

Lasse Madsen
  • 592
  • 9
  • 30

1 Answers1

3

When installing Xlabs you must install the nuget in each project that you have. I've tested now with the Xamarin.Forms 2.2.0.31 with the XLabs.Forms 2.2.0-pre02 in a WP8.1 project.

In your App.xaml.cs place this:

var app = new XFormsAppWin();
app.Init(this); 

Below the line:

Xamarin.Forms.Forms.Init(e);

And add this:

using XLabs.Forms;
jzeferino
  • 7,700
  • 1
  • 39
  • 59
  • Is the problem with the removal of Android Resources fixed in pre2? – Lasse Madsen Jun 11 '16 at 21:30
  • Not totally sure but you could try it. I tested with the pre2 but you could use the pre1. You must install it in all of your projects. – jzeferino Jun 11 '16 at 21:32
  • When updating I get this error "Could not install package 'XLabs.Core 2.2.0-pre02'. You are trying to install this package into a project that targets 'WindowsPhone,Version=v8.1', but the package does not contain any assembly references or content files that are compatible with that framework. For more information, contact the package author." – Lasse Madsen Jun 11 '16 at 21:36
  • Remove all Xlabs dependencies. After that install Xlabs 2.2.0 pre02. Don't try to update the existing. – jzeferino Jun 11 '16 at 21:41
  • I figured out, it came from the Silverlight project. In some how I don't think, they are supporting it anymore. – Lasse Madsen Jun 11 '16 at 21:49