Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 58056

Unable to compile app after 1.3 with Xamarin.Forms.Labs 1.2.1-pre2

$
0
0

I have been working on an app for a while with no issues. My Linker settings had been set to "Link SDK Assemblies Only". I recently updated to Xamarin Forms 1.3 and based on another post, I also updated Xamarin.Forms.Labs to 1.2.1-pre2.

After this update, I have not been able to compile the app. The Linker seems to be removing methods that it hadn't before. The errors noted below are all in the iOS app.

With the linker in "Link SDK Assemblies Only" I get the following:
Error MT2002: Failed to resolve "Xamarin.Forms.BindableProperty Xamarin.Forms.BindableProperty::Create(System.Linq.Expressions.Expression1<System.Func2<!!0,!!1>>,!!1,Xamarin.Forms.BindingMode,Xamarin.Forms.BindableProperty/ValidateValueDelegate1<!!1>,Xamarin.Forms.BindableProperty/BindingPropertyChangedDelegate1<!!1>,Xamarin.Forms.BindableProperty/BindingPropertyChangingDelegate1<!!1>,Xamarin.Forms.BindableProperty/CoerceValueDelegate1<!!1>)" reference from "Xamarin.Forms.Core, Version=1.2.1.0, Culture=neutral, PublicKeyToken=null" (MT2002)

I tried to use —linkskip=Xamarin.Forms.Core in the compiler options for iOS but the error was the same

With the linker set to "Link All Assemblies" it does compile, BUT:
...but app doesn’t work. It looks like a significant number of methods are stripped from the linking. I started trying to preserve the methods or assemblies that were required, but it quickly became cumbersome with the number that were stripped. I don’t do a lot with reflection, but I do have a number of entities that are only created via serialization which I understand is why they get removed by the linker. Also, many of the classes in Xamarin.Forms.Labs were also impacted by the linker. In the end, I gave up on this method because even after going through each piece of functionality one by one, I was going down a dark path and still didn't have a functioning app evev though it compiled.

With the link set to "Don't Link" it doesn't compile with the following:
Error MT3001: Could not AOT the assembly '...../obj/iPhone/Debug/mtouch-cache/Build/Acr.XamForms.dll' (MT3001)

Based on another suggestion from the forums, I tried changing the compiler to LLVM but got:
w/ LLVM : Error MT3001: Could not AOT the assembly '..../obj/iPhone/Debug/mtouch-cache/Build/Acr.XamForms.dll' (MT3001)

I understand the it couldn't complete the compilation because of the size of the output....

BUT... This leaves me without a working app. None of the linker options work and I can't NOT use the linker.!

In the end, I would like to use the "SDK Assemblies only" option to reduce the file size and remove unused code, but it has been extremely frustrating trying to get it to work.

The documentation on the linker is a little lacking.... I am hoping someone else that reads this may have another idea that I have not thought of or is able to point out something that I am doing incorrectly

Any suggestions would be appreciated.

Thanks!


Viewing all articles
Browse latest Browse all 58056

Trending Articles