Aspose.Email v22.6.0 in Xamarin Forms (iOS) - Can't resolve the reference 'System.Void System.Security.Cryptography.DSACng

Added Aspose.Email v2.66.0 via Nuget to Xamarin Forms v5 solution. Built and tested successfully for Windows, but fails to compile for iOS.

Error MT2101: Can’t resolve the reference ‘System.Void System.Security.Cryptography.DSACng::.ctor(System.Security.Cryptography.CngKey)’, referenced from the method ‘T Internal.Cryptography.Pal.Windows.PkcsPalWindows::GetPrivateKey(System.Security.Cryptography.X509Certificates.X509Certificate2,System.Boolean,System.Boolean)’ in ‘System.Security.Cryptography.Cng, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a’. (MT2101) (MyApplication.iOS)

Are there some additional steps, beyond referencing the nuget, required for using Aspose.Email in Xamarin Forms iOS projects? Is this something you’ve seen before?

Thanks

@louis.s

Could you please share the complete detail of your working environment e.g. operating system and .NET, and Visual Studio version?

This is in Visual Studio for Mac, full details here:

=== Visual Studio Community 2019 for Mac ===

Version 8.10.25 (build 2)
Installation UUID: 5548a591-39d3-47bc-9bfc-a6d6ab96f0e5
GTK+ 2.24.23 (Raleigh theme)
Xamarin.Mac 6.18.0.23 (d16-6 / 088c73638)

Package version: 612000182

=== Mono Framework MDK ===

Runtime:
Mono 6.12.0.182 (2020-02/6051b710727) (64-bit)
Package version: 612000182

=== Roslyn (Language Service) ===

3.10.0-4.21269.26+029847714208ebe49668667c60ea5b0a294e0fcb

=== NuGet ===

Version: 5.9.0.7134

=== .NET SDK (x64) ===

SDK: /usr/local/share/dotnet/sdk/5.0.408/Sdks
SDK Versions:
5.0.408
5.0.406
5.0.404
5.0.403
5.0.402
5.0.401
5.0.400
5.0.301
5.0.202
5.0.201
5.0.103
5.0.102
5.0.100
3.1.420
3.1.417
3.1.416
3.1.415
3.1.414
3.1.413
3.1.412
3.1.410
3.1.408
3.1.407
3.1.406
3.1.405
3.1.404
3.1.403
3.1.402
3.1.401
3.1.302
3.1.301
3.1.300
3.1.102
3.1.101
3.1.100
3.0.100
2.1.701
2.1.700
2.1.505
MSBuild SDKs: /Applications/Visual Studio.app/Contents/Resources/lib/monodevelop/bin/MSBuild/Current/bin/Sdks

=== .NET Core Runtime ===

Runtime: /usr/local/share/dotnet/dotnet
Runtime Versions:
5.0.17
5.0.15
5.0.13
5.0.12
5.0.11
5.0.10
5.0.9
5.0.7
5.0.5
5.0.4
5.0.3
5.0.2
5.0.0
3.1.26
3.1.23
3.1.22
3.1.21
3.1.20
3.1.19
3.1.18
3.1.16
3.1.14
3.1.13
3.1.12
3.1.11
3.1.10
3.1.9
3.1.8
3.1.7
3.1.6
3.1.5
3.1.4
3.1.2
3.1.1
3.1.0
3.0.0
2.1.23
2.1.22
2.1.21
2.1.20
2.1.19
2.1.18
2.1.15
2.1.14
2.1.13
2.1.12
2.1.11
2.1.9

=== .NET Core 3.1 SDK ===

SDK: 3.1.420

=== .NET 5.0 SDK ===

SDK: 5.0.408

=== Xamarin.Profiler ===

Version: 1.8.0.22
Location: /Applications/Xamarin Profiler.app/Contents/MacOS/Xamarin Profiler

=== Updater ===

Version: 11

=== Apple Developer Tools ===

Xcode 13.4.1 (20504)
Build 13F100

=== Xamarin.Mac ===

Version: 8.10.0.5 (Visual Studio Community)
Hash: 96b3edb6d
Branch: d17-2
Build date: 2022-05-18 07:32:06-0400

=== Xamarin.iOS ===

Version: 15.10.0.5 (Visual Studio Community)
Hash: 96b3edb6d
Branch: d17-2
Build date: 2022-05-18 07:32:07-0400

=== Xamarin Designer ===

Version: 16.11.0.60
Hash: 56f9b80b0
Branch: remotes/origin/d16-11
Build date: 2021-12-15 01:44:16 UTC

=== Xamarin.Android ===

Version: 12.2.8.3 (Visual Studio Community)
Commit: xamarin-android/d17-1/fafdba7
Android SDK: /Users/louissherwood/Library/Developer/Xamarin/android-sdk-macosx
Supported Android versions:
8.0 (API level 26)
8.1 (API level 27)

SDK Tools Version: 26.1.1
SDK Platform Tools Version: 30.0.4
SDK Build Tools Version: 30.0.2

Build Information:
Mono: dffa5ab
Java.Interop: xamarin/java.interop/d17-1@7ac33610
ProGuard: Guardsquare/proguard/v7.0.1@912d149
SQLite: xamarin/sqlite/3.37.1@0893b3b
Xamarin.Android Tools: xamarin/xamarin-android-tools/d17-1@db125a7

=== Eclipse Temurin JDK ===

Java SDK: /Library/Java/JavaVirtualMachines/temurin-8.jdk/Contents/Home
1.8.0.302
Android Designer EPL code available here:

=== Android SDK Manager ===

Version: 16.10.0.13
Hash: 1b81df5
Branch: remotes/origin/d16-10
Build date: 2021-11-12 00:17:32 UTC

=== Android Device Manager ===

Version: 16.10.0.15
Hash: 89dcc0b
Branch: remotes/origin/d16-10
Build date: 2021-11-12 00:17:52 UTC

=== Build Information ===

Release ID: 810250002
Git revision: 0620af530b5800e0eada4882ce1c3d4dad7e53d3
Build date: 2022-06-15 13:41:26-04
Build branch: release-8.10

=== Operating System ===

Mac OS X 12.2.1
Darwin 21.3.0 Darwin Kernel Version 21.3.0
Wed Jan 5 21:37:58 PST 2022
root:xnu-8019.80.24~20/RELEASE_X86_64 x86_64

Are there some additional steps, beyond referencing the nuget, required for using Aspose.Email in Xamarin Forms iOS projects? Is this something you’ve seen before?

Thanks

@louis.s

We have logged this problem in our issue tracking system as EMAILNET-40644. You will be notified via this forum thread once this issue is resolved.

We apologize for your inconvenience.

1 Like

Thank you for updating Tahir.

My company currently have a couple licences with Aspose for other products, my work here was just with the trial version in Nuget to see if it was a potential fit for our Xamarin apps. Would there be any way to expedite the issue if our account manager got in touch and referenced the issue in your tracking system?

Thanks

@louis.s

Please note that our issue tracking system is not public. However, you can check the status of issue at the right bottom of this forum thread as shown in attached image.

image.png (8.6 KB)

@louis.s

It is to inform you that this problem is not related to Aspose.Email rather it is related to your environment. Please try the solutions described in the following links:
Can’t resolve the reference 'System.Void System.Security.Cryptography.DSACng
Linking Xamarin.iOS Apps