Questions tagged [xamarin-linker]

The Xamarin Linker is used to reduce the size of the apps, it has three options in Visual Studio:

  • Don't Link (None in Visual Studio)
  • Link SDK Assemblies (Sdk Assemblies Only)
  • Link All Assemblies (Sdk and User Assemblies)

More info: https://learn.microsoft.com/en-us/xamarin/android/deploy-test/linker

44 questions
23
votes
1 answer

Xamarin Android linking cannot access file

I have a Xamarin Android project that I am trying to use Sdk and User Assembly linking with. If I set the Android project to Sdk Assembly Linking only, the APK is created and deployed successfully and works. However, when I set Sdk and User Assembly…
Steve
  • 9,335
  • 10
  • 49
  • 81
10
votes
3 answers

Xamarin iOS build error - Native linking failed (Link Framework SDKs Only)

Not able to run Xamarin iOS project after Visual studio update. Because updated IDE requires the latest Xcode (iOS 13.4 SDK shipped with Xcode 11.4) Environment Details OS Version : macOS Mojave, OS X 10.14.6 IDE : Visual Studio Community 2019 for…
Mable John
  • 4,518
  • 3
  • 22
  • 35
8
votes
0 answers

Xamarin iOS Release Build - Native linking failed

I cannot build my Xamarin iOS project. It works: In debug mode with physical device In debug mode with the emulator In release mode with the emulator But it won't work: In release mode with physical device! I tried: All Linker Behaviors: No…
Eezy
  • 83
  • 5
4
votes
2 answers

Xamarin iOS Linker causing AutoMapper issues

I am working on a Xamarin project that is using AutoMapper. When linking is set to "Link Framework SDKs Only" I get the following error when initializing the maps System.ArgumentNullException: Value cannot be null. Parameter name: method The…
Pat Long - Munkii Yebee
  • 3,592
  • 2
  • 34
  • 68
4
votes
2 answers

Xamarin Linker : Default constructor not found for type Cirrious.CrossCore.IoC.MvxPropertyInjector

With a skeleton project with FirstView from HotTuna package, and with Build linker behavior set to "Link all assemblies", I get the following error: System.MissingMethodException: Default constructor not found for type…
Rana Hossain
  • 415
  • 4
  • 11
3
votes
2 answers

Xamarin Android build just hangs when linker is enabled

I have a Xamarin.Android project that hangs when attempting to build the solution in Release configuration. I've narrowed it down to an issue with the linker - if the linker is switched off, it all builds fine. I've done the build with higher…
Mick Byrne
  • 14,394
  • 16
  • 76
  • 91
3
votes
0 answers

Xamarin (android) linker - System.NullReferenceException

My Xamarin Forms app (for Android) in release mode have size 39 Mb. I enabled option "Link All Assemblies". I read about this option and I understand that this is difficult. But the big way starts with the first step. I have this exception: 10-30…
FetFrumos
  • 5,388
  • 8
  • 60
  • 98
3
votes
3 answers

Linker error nach update auf neueste Xamarin Android libraries

Since I updated my Xamarin Forms project to the latest Android Libraries 25.1.1 I can no, longer build a release because of this linker error >>1>The "LinkAssemblies" task failed…
Thomas
  • 8,397
  • 7
  • 29
  • 39
3
votes
1 answer

Xamarin Linker removing reference to third party dll

When running my app in Release mode in Xamarin I get the following error with 'Link SDK assemblies only' on: /Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.targets: Error: Error executing task…
Byron
  • 1,313
  • 10
  • 22
2
votes
1 answer

Xamarin Forms iOS error MT5202: Native linking failed

for my Xamarin Forms iOS project I always set Linker Behavior to "Link Framework SDKs Only" and it worked in the past but suddenly I cannot use this anymore. I get the following errors when I try to compile. 2>C:\Program Files (x86)\Microsoft Visual…
Eric
  • 25
  • 6
2
votes
1 answer

Xamarin bug happens when linker is set to "Link All". Can't use DependencyService

Right now, I have to have my linker set to "Link All" in order to submit to the App Store because of the deprecated UIWebView. While doing this, I had to add [Preserve(AllMembers = true)] to my DataStores to make them work this way, but then I ran…
Sethmr
  • 3,046
  • 1
  • 24
  • 42
2
votes
1 answer

Xamarin.Android Exclude specific assembly from linking

I updated my xamarin.android packages to the latest version and make the target framework is AndroidQ but now I can't build the project when used Linker properties "SDK Assemblies only" how I can exclude monkeyCache.SqlLite from linking assemblies
AYKHO
  • 516
  • 1
  • 7
  • 20
2
votes
0 answers

Xamarin Linking Sdk Assemblies Only - using AssemblyName vs AssemblyName.Class.Method

I have a DLL MyAssemblyOne.dll which only contains one class with static methods: namespace MyAssemblyOne { public class MyClassOne { public static string MyStaticMethod() { ... } } } All is good so far, the…
Bogdan Daniel
  • 2,689
  • 11
  • 43
  • 76
2
votes
1 answer

Xamarin Linking in Release mode with Proguard

I'm working on a Xamarin Forms app for Android and iOS. We use a third-party SDK that comes as an .aar package, build action set to LibraryProjectZip. Then, we have calls from the forms, the iOS, and the Android parts of the code. Linking works just…
iBobb
  • 1,140
  • 1
  • 14
  • 35
2
votes
0 answers

Why does using Linker in Xamarin slows down application in release build?

Having used Linker in Xamarin to reduce the size of the release build of my android application, after having installed the application. The application runs much slower in the release build as compared to when I am debugging the application in…
George
  • 161
  • 1
  • 3
  • 11
1
2 3