Forum Xamarin.iOS

error MT2101: 'System.ServiceModel.Channels.AsymmetricSecurityBindingElement'

Hello,
with these compilation parameters:

• SDK: Default
• Linker: Link Framework SDKs Only
• Architecture: ARMv7 + ARM64
• Httpclient: Managed (default)

and with this configuration:

• VS 2017 15.9.10
• Xamarin.iOS and Xamarin.Mac SDK 12.2.1.16
• Mini Mac (Mojave 10.14.4)
• Xcode 10.2
• Device iPhone 5c (10.3.3)
• Library for WCF access compiled with .NET Framework 4.6.1

when release on device I get this error:
error MT2101: Can't resolve the reference 'System.ServiceModel.Channels.AsymmetricSecurityBindingElement', referenced from the method 'System.Boolean Microsoft.Tools.ServiceModel.ClientBase`1 :: IsSecureMessageBinding (System.ServiceModel.Channels.Binding)' in 'System.ServiceModel, Version = 4.0.0.0, Culture = neutral, PublicKeyToken = b77a5c561934e089'.

Can someone help me?
Thanks in advance

Answers

  • ColeXColeX Member, Xamarin Team Xamurai

    It seems the error comes from the class Microsoft.Tools.ServiceModel.ClientBase which belongs to Library for WCF access compiled with .NET Framework 4.6.1.

    Check .NET Standard .

    The versions listed here represent the rules that NuGet uses to determine whether a given .NET Standard library is applicable. While NuGet considers .NET Framework 4.6.1 as supporting .NET Standard 1.5 through 2.0, there are several issues with consuming .NET Standard libraries that were built for those versions from .NET Framework 4.6.1 projects. For .NET Framework projects that need to use such libraries, we recommend that you upgrade the project to target .NET Framework 4.7.2 or higher.

Sign In or Register to comment.